This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Subject: [PATCH: Configure] Fix prototype detection for C++
authorH.Merijn Brand <merijn@nb09.procura.nl>
Mon, 27 Oct 2008 18:34:20 +0000 (19:34 +0100)
committerH.Merijn Brand <merijn@nb09.procura.nl>
Mon, 27 Oct 2008 18:34:20 +0000 (19:34 +0100)
From: Marcus Holland-Moritz <mhx-perl@gmx.net>
Date: Sun, 26 Oct 2008 21:41:13 +0100
Message-ID: <20081026214113.0a5dc1a3@r2d2>

U/threads/d_localtime_r.U

index 94be218..f7f3aa0 100644 (file)
@@ -9,7 +9,7 @@
 ?RCS:
 ?MAKE:d_localtime_r d_localtime_r_needs_tzset localtime_r_proto: Inlibc \
        cat run Protochk Hasproto i_systypes usethreads i_time i_systime \
-       rm_try Compile extern_C
+       rm_try Compile extern_C i_stdlib i_unistd i_string i_malloc
 ?MAKE: -pick add $@ %<
 ?S:d_localtime_r:
 ?S:    This variable conditionally defines the HAS_LOCALTIME_R symbol,
@@ -109,11 +109,32 @@ REENTRANT_PROTO*)
 /*  Does our libc's localtime_r call tzset ?
  *  return 0 if so, 1 otherwise.
  */
-#include <sys/types.h>
-#include <unistd.h>
-#include <time.h>
-#include <string.h>
-#include <malloc.h>
+#$i_systypes   I_SYS_TYPES
+#$i_unistd     I_UNISTD
+#$i_time       I_TIME
+#$i_stdlib     I_STDLIB
+#$i_string     I_STRING
+#$i_malloc     I_MALLOC
+#ifdef I_SYS_TYPES
+#  include <sys/types.h>
+#endif
+#ifdef I_UNISTD
+#  include <unistd.h>
+#endif
+#ifdef I_TIME
+#  include <time.h>
+#endif
+#ifdef I_STDLIB
+#include <stdlib.h>
+#endif
+#ifdef I_STRING
+#  include <string.h>
+#else
+#  include <strings.h>
+#endif
+#ifdef I_MALLOC
+#  include <malloc.h>
+#endif
 int main()
 {
     time_t t = time(0L);