File: verify_POV_LONG_is_64bit.patch

package info (click to toggle)
povray 1%3A3.7.0.8-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 146,780 kB
  • sloc: cpp: 845,005; ansic: 122,118; sh: 34,206; pascal: 6,420; asm: 3,355; ada: 1,681; makefile: 1,387; cs: 879; awk: 590; perl: 245; xml: 95
file content (19 lines) | stat: -rw-r--r-- 559 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description: ensure that POV_LONG is a 64bit integer
Author: Andreas Beckmann <anbe@debian.org>
Bug-Debian: https://bugs.debian.org/745448

--- a/vfe/unix/unixconsole.cpp
+++ b/vfe/unix/unixconsole.cpp
@@ -355,6 +355,12 @@ static void CleanupBenchmark(vfeUnixSess
 
 int main (int argc, char **argv)
 {
+	assert(sizeof(POV_LONG) == 8);
+	if (sizeof(POV_LONG) != 8) {
+		fprintf(stderr, "sizeof(POV_LONG) = %d != 8\n", (int)sizeof(POV_LONG));
+		return -sizeof(POV_LONG);
+	}
+
 	vfeUnixSession   *session;
 	vfeStatusFlags    flags;
 	vfeRenderOptions  opts;