1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
--- povray-3.6.1/acinclude.m4~ 2004-08-03 00:16:14.000000000 +0100
+++ povray-3.6.1/acinclude.m4 2006-11-15 15:29:33.000000000 +0000
@@ -353,13 +353,36 @@
[
AC_LANG_SOURCE(
[#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include "$5"
int main (void)
{
const char *version = $6;
+ char wanted[[]] = "$2";
+ char *version_tok, *wanted_tok = wanted;
+ char *version_tmp, *wanted_tmp;
fprintf (stderr, "%s\n", version);
- return ! (strcmp (version ? version : "", "$2") >= 0);
+ if (!version) return EXIT_FAILURE;
+ version_tok = strdup(version);
+ for (version_tok = strtok_r(version_tok, ".", &version_tmp),
+ wanted_tok = strtok_r(wanted_tok, ".", &wanted_tmp);
+ version_tok != NULL && wanted_tok != NULL;
+ version_tok = strtok_r(NULL, ".", &version_tmp),
+ wanted_tok = strtok_r(NULL, ".", &wanted_tmp)) {
+ char *version_endptr, *wanted_endptr;
+ unsigned long version_bit = strtoul(version_tok, &version_endptr, 10);
+ unsigned long wanted_bit = strtoul(wanted_tok, &wanted_endptr, 10);
+ if (version_bit < wanted_bit)
+ return EXIT_FAILURE;
+ if (version_bit > wanted_bit)
+ return EXIT_SUCCESS;
+ if (strcmp(version_endptr, wanted_endptr) > 0)
+ return EXIT_SUCCESS;
+ if (strcmp(version_endptr, wanted_endptr) < 0)
+ return EXIT_FAILURE;
+ }
+ return wanted_tok == NULL ? EXIT_SUCCESS : EXIT_FAILURE;
}]
)
],
--- povray-3.6.1/source/png_pov.cpp~ 2004-08-03 00:11:37.000000000 +0100
+++ povray-3.6.1/source/png_pov.cpp 2006-11-15 16:48:33.000000000 +0000
@@ -782,7 +782,7 @@
{
// finished prematurely - trick into thinking done
png_ptr->num_rows = png_ptr->row_number;
- png_write_finish_row(png_ptr);
+ png_write_row(png_ptr, row_ptr);
}
#ifdef POV_COMMENTS // temporarily skip comment writing code
|