diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-16 22:47:40 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-16 22:47:40 +0000 |
commit | ccf874816b57b9b91848a81cf43371bf7b3f17c8 (patch) | |
tree | 99f4b748bafae3555a323e6ba54b08fbf3ad6658 /hints | |
parent | 72f7b9a1041f8cd00a817b387850fef64f11d90e (diff) | |
download | perl-ccf874816b57b9b91848a81cf43371bf7b3f17c8.tar.gz |
Add workaround for Darwin's (Mac OS X's) INT32_MIN
(and INT64_MIN) brokenness.
p4raw-id: //depot/perl@10649
Diffstat (limited to 'hints')
-rw-r--r-- | hints/darwin.sh | 19 |
1 files changed, 19 insertions, 0 deletions
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'; |