tweaks for lynxos build (from Ed Mooring <mooring@lynx.com>)
Gurusamy Sarathy [Sat, 11 Mar 2000 09:45:10 +0000 (09:45 +0000)]
p4raw-id: //depot/perl@5642

doio.c
hints/lynxos.sh
perl.h

diff --git a/doio.c b/doio.c
index 5c86537..e22902f 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -1794,8 +1794,11 @@ Perl_do_ipcctl(pTHX_ I32 optype, SV **mark, SV **sp)
        {
            struct semid_ds semds;
            union semun semun;
-
+#ifdef EXTRA_F_IN_SEMUN_BUF
+            semun.buff = &semds;
+#else
             semun.buf = &semds;
+#endif
            getinfo = (cmd == GETALL);
            if (Semctl(id, 0, IPC_STAT, semun) == -1)
                return -1;
@@ -1850,7 +1853,11 @@ Perl_do_ipcctl(pTHX_ I32 optype, SV **mark, SV **sp)
 #ifdef Semctl
             union semun unsemds;
 
+#ifdef EXTRA_F_IN_SEMUN_BUF
+            unsemds.buff = (struct semid_ds *)a;
+#else
             unsemds.buf = (struct semid_ds *)a;
+#endif
            ret = Semctl(id, n, cmd, unsemds);
 #else
            Perl_croak(aTHX_ "%s not implemented", PL_op_desc[optype]);
index bde461f..0023e83 100644 (file)
@@ -4,11 +4,16 @@
 # These hints were submitted by:
 #   Greg Seibert
 #   seibert@Lynx.COM
+# and
+#   Ed Mooring
+#   mooring@lynx.com
 #
 
 cc='gcc'
 so='none'
 usemymalloc='n'
+d_union_semun='define'
+ccflags="$ccflags -DEXTRA_F_IN_SEMUN_BUF -D__NO_INCLUDE_WARN__"
 
 # When LynxOS runs a script with "#!" it sets argv[0] to the script name
 toke_cflags='ccflags="$ccflags -DARG_ZERO_IS_SCRIPT"'
diff --git a/perl.h b/perl.h
index 911b998..b0100e1 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -3204,7 +3204,11 @@ typedef struct am_table_short AMTS;
 #       define Semctl(id, num, cmd, semun) semctl(id, num, cmd, semun)
 #   else
 #       ifdef USE_SEMCTL_SEMID_DS
-#           define Semctl(id, num, cmd, semun) semctl(id, num, cmd, semun.buf)
+#           ifdef EXTRA_F_IN_SEMUN_BUF
+#               define Semctl(id, num, cmd, semun) semctl(id, num, cmd, semun.buff)
+#           else
+#               define Semctl(id, num, cmd, semun) semctl(id, num, cmd, semun.buf)
+#           endif
 #       endif
 #   endif
 #endif