summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2006-08-18 16:03:17 +0300
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-08-21 10:15:30 +0000
commit45d3b5469846d045649a3f1b7d0f06e1edd30ad7 (patch)
tree96b7a341b56a9202d40ccb63a9b31952e3a33453
parent587eea6cfed2506a7cd9c3dadb2bdbd6fcc7382f (diff)
downloadperl-45d3b5469846d045649a3f1b7d0f06e1edd30ad7.tar.gz
g++/Tru64: got perl linking once got the linkage right
Message-Id: <200608181003.k7IA3Hso276655@kosh.hut.fi> p4raw-id: //depot/perl@28741
-rw-r--r--hints/dec_osf.sh5
-rw-r--r--perl.h7
-rw-r--r--pp_sys.c5
3 files changed, 12 insertions, 5 deletions
diff --git a/hints/dec_osf.sh b/hints/dec_osf.sh
index c0f2bfc2d8..336e0ef99e 100644
--- a/hints/dec_osf.sh
+++ b/hints/dec_osf.sh
@@ -163,6 +163,11 @@ ccflags="$ccflags $_ccflags_strict_ansi"
# g++ needs a lot of definitions to see the same set of
# prototypes from <unistd.h> et alia as cxx/cc see.
+# Note that we cannot define _XOPEN_SOURCE_EXTENDED or
+# its moral equivalent, _XOPEN_SOURCE=500 (which would
+# define a lot of the required prototypes for us), because
+# the gcc-processed version of <sys/wait.h> contains fatally
+# conflicting prototypes for wait3().
case "$cc" in
*g++*) ccflags="$ccflags -D_XOPEN_SOURCE -D_OSF_SOURCE -D_AES_SOURCE -D_BSD -D_POSIX_C_SOURCE=199309L -D_POSIX_PII_SOCKET" ;;
esac
diff --git a/perl.h b/perl.h
index b2b9a9cfed..7d7e2574b2 100644
--- a/perl.h
+++ b/perl.h
@@ -1150,6 +1150,13 @@ int sockatmark(int);
# endif
#endif
+#if defined(__osf__) && defined(__cplusplus) && !defined(_XOPEN_SOURCE_EXTENDED)
+EXTERN_C int fchdir(int);
+EXTERN_C int flock(int, int);
+EXTERN_C int fseeko(FILE *, off_t, int);
+EXTERN_C off_t ftello(FILE *);
+#endif
+
#ifdef SETERRNO
# undef SETERRNO /* SOCKS might have defined this */
#endif
diff --git a/pp_sys.c b/pp_sys.c
index 909f5f75b2..95914106ba 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -197,11 +197,6 @@ void setservent(int);
void endservent(void);
#endif
-#if defined(__osf__) && defined(__cplusplus) && !defined(_XOPEN_SOURCE_EXTENDED)
-extern int readlink(const char *, char *, size_t);
-extern int fchdir(int);
-#endif
-
#undef PERL_EFF_ACCESS /* EFFective uid/gid ACCESS */
/* AIX 5.2 and below use mktime for localtime, and defines the edge case