NeXT doesn't have FD_CLOEXEC (suggested by Hans Mulder)
authorGurusamy Sarathy <gsar@cpan.org>
Mon, 5 Jul 1999 02:46:18 +0000 (02:46 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Mon, 5 Jul 1999 02:46:18 +0000 (02:46 +0000)
p4raw-id: //depot/perl@3581

util.c

diff --git a/util.c b/util.c
index 582a7977b89d0b83ad4a7212677413a83d1176ed..687c5a3d68c3aafa16d76bbb4ee2f0a2c0bf501b 100644 (file)
--- a/util.c
+++ b/util.c
@@ -66,6 +66,10 @@ long lastxycount[MAXXCOUNT][MAXYCOUNT];
 
 #endif
 
+#if defined(HAS_FCNTL) && defined(F_SETFD) && !defined(FD_CLOEXEC)
+#  define FD_CLOEXEC 1                 /* NeXT needs this */
+#endif
+
 /* paranoid version of system's malloc() */
 
 /* NOTE:  Do not call the next three routines directly.  Use the macros
@@ -80,8 +84,9 @@ Perl_safesysmalloc(MEM_SIZE size)
     Malloc_t ptr;
 #ifdef HAS_64K_LIMIT
        if (size > 0xffff) {
-               PerlIO_printf(PerlIO_stderr(), "Allocation too large: %lx\n", size) FLUSH;
-               WITH_THX(my_exit(1));
+           PerlIO_printf(PerlIO_stderr(),
+                         "Allocation too large: %lx\n", size) FLUSH;
+           WITH_THX(my_exit(1));
        }
 #endif /* HAS_64K_LIMIT */
 #ifdef DEBUGGING