From ccf874816b57b9b91848a81cf43371bf7b3f17c8 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Sat, 16 Jun 2001 22:47:40 +0000 Subject: Add workaround for Darwin's (Mac OS X's) INT32_MIN (and INT64_MIN) brokenness. p4raw-id: //depot/perl@10649 --- hints/darwin.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'hints/darwin.sh') diff --git a/hints/darwin.sh b/hints/darwin.sh index bf5e487751..d99af92f5d 100644 --- a/hints/darwin.sh +++ b/hints/darwin.sh @@ -41,6 +41,25 @@ optimize='-O3'; # We have a prototype for telldir. ccflags="${ccflags} -pipe -fno-common -DHAS_TELLDIR_PROTOTYPE"; +# At least OS X 10.0.3: +# +# # define INT32_MIN -2147483648 +# int main () { +# double a = INT32_MIN; +# printf ("INT32_MIN=%g\n", a); +# return 0; +# } +# will output: +# INT32_MIN=2.14748e+09 +# Note that the INT32_MIN has become positive. +# INT32_MIN is set in /usr/include/stdint.h by: +# #define INT32_MIN -2147483648 +# which seems to break the gcc. Defining INT32_MIN as (-2147483647-1) +# seems to work. INT64_MIN seems to be similarly broken. +# -- Nicholas Clark, Ken Williams, and Edward Moy +# +ccflags="${ccflags} -DINT32_MIN_BROKEN -DINT64_MIN_BROKEN" + # For Errno. cppflags='-traditional-cpp'; -- cgit v1.2.1