This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
While awaiting a good test program to detect the broken gcc.
authorThomas Conté <tom@fr.uu.net>
Wed, 6 Oct 1999 19:56:29 +0000 (21:56 +0200)
committerJarkko Hietaniemi <jhi@iki.fi>
Sat, 9 Oct 1999 05:31:26 +0000 (05:31 +0000)
To: <jhi@iki.fi>
Cc: <perl5-porters@perl.org>
Subject: Re: [ID 19990825.007] test t/lib/ipc_sysv.t failing under irix 6.4
Message-ID: <000a01bf1024$1d938f20$252ad0d4@eng.iway.fr>

p4raw-id: //depot/cfgperl@4322

hints/irix_6.sh
perl.h

index 2881385..2c14041 100644 (file)
@@ -130,6 +130,8 @@ malloc_cflags='ccflags="-DSTRICT_ALIGNMENT $ccflags"'
                ldflags="$ldflags -mabi=64 -L/usr/lib64"
                lddlflags="$lddlflags -mabi=64"
                ;;
+       *)      ccflags="$ccflags -DIRIX32_SEMUN_BROKEN_BY_GCC"
+               ;;
        esac
        ;;
 *)
diff --git a/perl.h b/perl.h
index 60881c0..e8c9c1e 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -3154,12 +3154,21 @@ typedef struct am_table_short AMTS;
 #   include <sys/sem.h>
 #   ifndef HAS_UNION_SEMUN     /* Provide the union semun. */
     union semun {
-       int val;
-       struct semid_ds *buf;
-       unsigned short *array;
+       int             val;
+       struct semid_ds *buf;
+       unsigned short  *array;
     };
 #   endif
 #   ifdef USE_SEMCTL_SEMUN
+#      ifdef IRIX32_SEMUN_BROKEN_BY_GCC
+            union gccbug_semun {
+               int             val;
+               struct semid_ds *buf;
+               unsigned short  *array;
+               char            __dummy[5];
+           };
+#           define semun gccbug_semun
+#      endif
 #       define Semctl(id, num, cmd, semun) semctl(id, num, cmd, semun)
 #   else
 #       ifdef USE_SEMCTL_SEMID_DS