diff options
author | Gregory P. Smith <greg@krypto.org> | 2011-05-15 19:18:23 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@krypto.org> | 2011-05-15 19:18:23 (GMT) |
commit | 3b1f2c35f47b4ad87ddc998d91f2a041dd27bdb2 (patch) | |
tree | 411907a7a14084e210e84c1a7b565909f7ec89ea /configure.in | |
parent | 4d58fdb1a6bbb404910e7964c763b67f46244bba (diff) | |
download | cpython-3b1f2c35f47b4ad87ddc998d91f2a041dd27bdb2.zip cpython-3b1f2c35f47b4ad87ddc998d91f2a041dd27bdb2.tar.gz cpython-3b1f2c35f47b4ad87ddc998d91f2a041dd27bdb2.tar.bz2 |
issue #1746656: Fix for OS X. configure and #include changes so that the socket
module compiles again on OS X with its more annoying #include requirements.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/configure.in b/configure.in index 3ae9a34..3bf46b0 100644 --- a/configure.in +++ b/configure.in @@ -1293,11 +1293,28 @@ sys/lock.h sys/mkdev.h sys/modem.h \ sys/param.h sys/poll.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \ sys/stat.h sys/termio.h sys/time.h \ sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \ -libutil.h sys/resource.h net/if.h netpacket/packet.h sysexits.h bluetooth.h \ +libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \ bluetooth/bluetooth.h linux/tipc.h spawn.h util.h) AC_HEADER_DIRENT AC_HEADER_MAJOR +# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first. +AC_CHECK_HEADERS([net/if.h], [], [], +[#include <stdio.h> +#ifdef STDC_HEADERS +# include <stdlib.h> +# include <stddef.h> +#else +# ifdef HAVE_STDLIB_H +# include <stdlib.h> +# endif +#endif +#ifdef HAVE_SYS_SOCKET_H +# include <sys/socket.h> +#endif +]) + + # On Solaris, term.h requires curses.h AC_CHECK_HEADERS(term.h,,,[ #ifdef HAVE_CURSES_H |