more g++ in Tru64
authorJarkko Hietaniemi <jhi@iki.fi>
Thu, 3 Aug 2006 09:04:45 +0000 (12:04 +0300)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Thu, 3 Aug 2006 08:15:51 +0000 (08:15 +0000)
Message-ID: <44D191FD.9030902@iki.fi>

p4raw-id: //depot/perl@28654

hints/dec_osf.sh
perlio.c
pp_sys.c

index a5c1aad..92cb1c3 100644 (file)
@@ -161,9 +161,9 @@ esac
 # Be nauseatingly ANSI
 ccflags="$ccflags $_ccflags_strict_ansi"
 
-# g++ needs -D_XOPEN_SOURCE -D_OSF_SOURCE to get much use of <unistd.h>.
+# g++ needs -D_XOPEN_SOURCE -D_OSF_SOURCE -D_AES_SOURCE -D_BSD to get much use of <unistd.h>.
 case "$cc" in
-*g++*) ccflags="$ccflags -D_XOPEN_SOURCE -D_OSF_SOURCE" ;;
+*g++*) ccflags="$ccflags -D_XOPEN_SOURCE -D_OSF_SOURCE -D_AES_SOURCE -D_BSD" ;;
 esac
 
 # for gcc the Configure knows about the -fpic:
@@ -375,7 +375,7 @@ $define|true|[yY]*)
 extern int foo;        
 EOF
        $cc -c pthread.c 2> pthread.err
-       if grep -q "unrecognized compiler" pthread.err; then
+       if egrep -q "unrecognized compiler|syntax error" pthread.err; then
            cat >&4 <<EOF
 ***
 *** I'm sorry but your C compiler ($cc) cannot be used to
index 30e3e6c..817026f 100644 (file)
--- a/perlio.c
+++ b/perlio.c
@@ -114,6 +114,11 @@ int mkstemp(char*);
        else                                                    \
                SETERRNO(EBADF, SS_IVCHAN)
 
+#if defined(__osf__) && _XOPEN_SOURCE < 500
+extern int   fseeko(FILE *, off_t, int);
+extern off_t ftello(FILE *);
+#endif
+
 #ifndef USE_SFIO
 int
 perlsio_binmode(FILE *fp, int iotype, int mode)
index 4465988..34ddf8c 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -197,6 +197,11 @@ void setservent(int);
 void endservent(void);
 #endif
 
+#if defined(__osf__) && !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