.
authorclaus
Tue, 19 Sep 1995 02:55:04 +0200
changeset 439 01a0c0902b67
parent 438 6c03b347369f
child 440 017c88672c98
.
Unix.st
--- a/Unix.st	Sun Sep 17 19:57:55 1995 +0200
+++ b/Unix.st	Tue Sep 19 02:55:04 1995 +0200
@@ -22,35 +22,45 @@
 COPYRIGHT (c) 1988 by Claus Gittinger
 	     All Rights Reserved
 
-$Header: /cvs/stx/stx/libbasic/Attic/Unix.st,v 1.56 1995-09-17 17:57:55 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/Unix.st,v 1.57 1995-09-19 00:55:04 claus Exp $
 '!
 
 !OperatingSystem primitiveDefinitions!
 
 %{
 #ifdef _AIX
-# define WANT_REALPATH
-
-# include <sys/param.h>
-# define _SYS_PARAM_H_INCLUDED_
-# include <errno.h>
-# define _ERRNO_H_INCLUDED_
-# include <sys/stat.h>
-# define _SYS_STAT_H_INCLUDED_
+# ifndef WANT_REALPATH
+#  define WANT_REALPATH
+# endif
 #endif
 
 #ifdef LINUX
-# define WANT_SYSTEM
+# ifndef WANT_SYSTEM
+#  define WANT_SYSTEM
+# endif
 #endif
 
+#ifdef WANT_REALPATH
+# include <sys/param.h>
+# define _SYS_PARAM_H_INCLUDED_
+
+# include <errno.h>
+# define _ERRNO_H_INCLUDED_
+
+# include <sys/stat.h>
+# define _SYS_STAT_H_INCLUDED_
+#endif /* WANT_REALPATH */
+
 #ifdef WANT_SHM
 # include <sys/types.h>
 # define _SYS_TYPES_H_INCLUDED_
+
 # include <sys/ipc.h>
 # define _SYS_IPC_H_INCLUDED_
+
 # include <sys/shm.h>
 # define _SYS_SHM_H_INCLUDED_
-#endif
+#endif /* WANT_SHM */
 
 #ifdef IRIX5
 # include <sys/syssgi.h>
@@ -249,7 +259,11 @@
 #  define NULL (char *)0
 # endif
 
-#define MAX_READLINKS 32
+# define MAX_READLINKS 32
+
+# ifndef MAXPATHLEN
+#  define MAXPATHLEN     1024
+# endif
 
 static
 char *realpath(path, resolved_path)
@@ -573,7 +587,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libbasic/Attic/Unix.st,v 1.56 1995-09-17 17:57:55 claus Exp $
+$Header: /cvs/stx/stx/libbasic/Attic/Unix.st,v 1.57 1995-09-19 00:55:04 claus Exp $
 "
 !
 
@@ -1115,7 +1129,7 @@
 	not all systems support this."
 
 %{  /* NO_CONTEXT */
-#ifdef IRIX5
+#if defined(IRIX5) && !defined(HAS_GETHOSTID)
     char idBuffer[MAXSYSIDSIZE];
     int retVal;
     OBJ arr;
@@ -1127,7 +1141,7 @@
 	RETURN (arr);
     }
 #endif
-#ifdef sunos
+#if defined(HAS_GETHOSTID)
     int runningId;
     OBJ arr;
     extern OBJ __BYTEARRAY_UNINITIALIZED_NEW_INT();
@@ -4854,5 +4868,3 @@
 %}.
     self primitiveFailed
 ! !
-
-