Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/branches/num64/runtime/include/ml-unixdep.h
ViewVC logotype

Diff of /sml/branches/num64/runtime/include/ml-unixdep.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5228, Thu May 30 17:51:06 2019 UTC revision 5229, Thu May 30 18:15:17 2019 UTC
# Line 70  Line 70 
70  #define INCLUDE_TYPES_H         <sys/types.h>  #define INCLUDE_TYPES_H         <sys/types.h>
71  #define INCLUDE_TIME_H          <sys/time.h>  #define INCLUDE_TIME_H          <sys/time.h>
72    
73  #if (defined(OPSYS_ULTRIX) || defined(OPSYS_AIX))  #if defined(OPSYS_AIX)
74  #define INCLUDE_FCNTL_H         <fcntl.h>  #define INCLUDE_FCNTL_H         <fcntl.h>
   
 #elif defined(OPSYS_MACH)  
 /* MACH doesn't have <fcntl.h>; the following defininitions are extracted from  
  * <sys/file.h>.  This isn't included directly, because it conflicts with  
  * <unistd.h>.  
  */  
 #  define INCLUDE_FCNTL_H               "/dev/null"  
 #  define FNDELAY       00004           /* no delay */  
 #  define FAPPEND       00010           /* append on each write */  
 #  define FCREAT        01000           /* create if nonexistant */  
 #  define FTRUNC        02000           /* truncate to zero length */  
 #  define FEXCL         04000           /* error if already created */  
 #  define O_RDONLY      000             /* open for reading */  
 #  define O_WRONLY      001             /* open for writing */  
 #  define O_RDWR        002             /* open for read & write */  
 #  define O_NDELAY      FNDELAY         /* non-blocking open */  
 #  define O_APPEND      FAPPEND         /* append on each write */  
 #  define O_CREAT       FCREAT          /* open with file create */  
 #  define O_TRUNC       FTRUNC          /* open with truncation */  
 #  define O_EXCL        FEXCL           /* error on create if file exists */  
   
75  #else  #else
76  #define INCLUDE_FCNTL_H         <sys/fcntl.h>  #define INCLUDE_FCNTL_H         <sys/fcntl.h>
77  #endif  #endif
78    
79  #if defined(OPSYS_OSF1) || defined(OPSYS_DUNIX) || defined(OPSYS_AIX) || defined(OPSYS_LINUX) || defined(OPSYS_MKLINUX) || defined(OPSYS_FREEBSD) || defined(OPSYS_NETBSD) || defined(OPSYS_NETBSD2) || defined(OPSYS_OPENBSD) || defined(OPSYS_CYGWIN)  #if defined(OPSYS_AIX) || defined(OPSYS_LINUX) || defined(OPSYS_FREEBSD) || defined(OPSYS_NETBSD) || defined(OPSYS_OPENBSD) || defined(OPSYS_CYGWIN)
80  #  define INCLUDE_DIRENT_H      <dirent.h>  #  define INCLUDE_DIRENT_H      <dirent.h>
 #elif defined(OPSYS_MACH)  
 #  define INCLUDE_DIRENT_H      <sys/dir.h>  
81  #else  #else
82  #  define INCLUDE_DIRENT_H      <sys/dirent.h>  #  define INCLUDE_DIRENT_H      <sys/dirent.h>
83  #endif  #endif
84    
85    #if defined(OPSYS_AIX)  /** AIX 3.2 **/
 #if defined(OPSYS_SUNOS) /** SunOS 4.1 **/  
 #  define OS_NAME       "SunOS"  
 #  define HAS_POSIX_LIBRARIES  
 #  define HAS_BSD_SIGS  
 #  define HAS_GETRUSAGE  
 #  define HAS_SETITIMER  
 #  define HAS_MMAP  
 #  define HAS_PARTIAL_MUNMAP  
 #  define HAS_SCALBN  
 #  define HAS_ILOGB  
 #  define HAS_SELECT  
 #  define HAS_SIGCONTEXT  
 #  define INT_GIDLIST   /* second argument to getgroups is int[] */  
   
 /* SunOS is not quite full POSIX */  
 typedef int ssize_t;  
   
 /* These declarations are not in <errno.h> */  
 extern int      sys_nerr;  
 extern char     *sys_errlist[];  
   
 #elif defined(OPSYS_SOLARIS) /** SunOS 5.x **/  
 #  define OS_NAME       "Solaris"  
 #  define HAS_POSIX_LIBRARIES  
 #  define HAS_POSIX_SIGS  
 #  define HAS_SETITIMER  
 #  define HAS_MMAP  
 #  define HAS_PARTIAL_MUNMAP  
 #  define HAS_SCALBN  
 #  define HAS_ILOGB  
 #  define HAS_POLL  
 #  define HAS_UCONTEXT  
 #  define INCLUDE_SIGINFO_H <siginfo.h>  
 #  define HAS_STRERROR  
 #  define HAS_MKSTEMP  
   
 /* These declarations are not in <errno.h> */  
 extern int      sys_nerr;  
 extern char     *sys_errlist[];  
   
 #elif defined(OPSYS_IRIX4)  /** IRIX 4.0.x **/  
 #  define OS_NAME       "Irix"  
 #  define HAS_POSIX_LIBRARIES  
 #  define HAS_POSIX_SIGS  
 #  define HAS_GETRUSAGE  
 #  define HAS_SETITIMER  
 #  define HAS_MMAP  
 #  define HAS_SELECT  
 #  define HAS_SIGCONTEXT  
 #  define HAS_STRERROR  
 #  define PROT_EXEC PROT_EXECUTE  
   
 /* IRIX 4.0 is not quite full POSIX */  
 typedef int ssize_t;  
   
 #elif defined(OPSYS_IRIX5)  /** IRIX 5.x **/  
 #  define OS_NAME       "Irix"  
 #  define HAS_POSIX_LIBRARIES  
 #  define HAS_POSIX_SIGS  
 #  define HAS_GETRUSAGE  
 #  define HAS_SETITIMER  
 #  define HAS_MMAP  
 #  define HAS_POLL  
 #  define HAS_UCONTEXT  
 #  define INCLUDE_SIGINFO_H <siginfo.h>  
 #  define HAS_STRERROR  
   
 #elif (defined(OPSYS_OSF1) || defined(OPSYS_DUNIX)) /** OSF/1 aka Digital Unix **/  
 #  define OS_NAME       "OSF/1"  
 #  define HAS_POSIX_LIBRARIES  
 #  define HAS_POSIX_SIGS  
 #  define HAS_GETRUSAGE  
 #  define HAS_SETITIMER  
 #  define HAS_ANON_MMAP  
 #  define HAS_POLL  
 #  define HAS_SIGCONTEXT  
 #  define HAS_STRERROR  
 /* what about HAS_PARTIAL_MUNMAP? - Ken Cline */  
   
 #elif defined(OPSYS_AIX)  /** AIX 3.2 **/  
86  #  define OS_NAME       "AIX"  #  define OS_NAME       "AIX"
87  #  define HAS_POSIX_LIBRARIES  #  define HAS_POSIX_LIBRARIES
88  #  define HAS_POSIX_SIGS  #  define HAS_POSIX_SIGS
# Line 214  Line 111 
111  #  define HAS_MKSTEMP  #  define HAS_MKSTEMP
112  #  define STAT_HAS_TIMESPEC  #  define STAT_HAS_TIMESPEC
113    
114  #elif defined(OPSYS_HPUX9)  /** HPUX 9.0 **/  #elif defined(OPSYS_SOLARIS) /** SunOS 5.x **/
115  #  define OS_NAME       "HPUX"  #  define OS_NAME       "Solaris"
 #  define HAS_POSIX_LIBRARIES  
 #  define HAS_POSIX_SIGS  
 #  define HAS_SETITIMER  
 #  define HAS_ANON_MMAP  
 #  define HAS_SELECT  
 #  define HAS_SIGCONTEXT  
 #  define HAS_STRERROR  
 #  define _INCLUDE_POSIX_SOURCE  
 #  define _INCLUDE_HPUX_SOURCE  
 #  define _INCLUDE_XOPEN_SOURCE  
 #  define _INCLUDE_AES_SOURCE  
 #  define _AID_T  
   
 /* These declarations are not in <errno.h> */  
 extern int      sys_nerr;  
 extern char     *sys_errlist[];  
   
 #elif defined(OPSYS_HPUX)  /** HPUX 10.0 **/  
 #  define OS_NAME       "HPUX"  
116  #  define HAS_POSIX_LIBRARIES  #  define HAS_POSIX_LIBRARIES
117  #  define HAS_POSIX_SIGS  #  define HAS_POSIX_SIGS
118  #  define HAS_SETITIMER  #  define HAS_SETITIMER
119  #  define HAS_ANON_MMAP  #  define HAS_MMAP
120    #  define HAS_PARTIAL_MUNMAP
121    #  define HAS_SCALBN
122    #  define HAS_ILOGB
123  #  define HAS_POLL  #  define HAS_POLL
124  #  define HAS_SIGCONTEXT  #  define HAS_UCONTEXT
125    #  define INCLUDE_SIGINFO_H <siginfo.h>
126  #  define HAS_STRERROR  #  define HAS_STRERROR
127  #  define _HPUX_SOURCE  #  define HAS_MKSTEMP
 #  define _INCLUDE_POSIX_SOURCE  
 #  define _INCLUDE_POSIX4_SOURCE  
 #  define _INCLUDE_XOPEN_SOURCE  
 #  define _INCLUDE_XOPEN_SOURCE_EXTENDED  
 #  define _INCLUDE_AES_SOURCE  
 #  define _AID_T  
128    
129  /* These declarations are not in <errno.h> */  /* These declarations are not in <errno.h> */
130  extern int      sys_nerr;  extern int      sys_nerr;
# Line 323  Line 199 
199  /* FreeBSD uses MAP_ANON for MAP_ANONYMOUS */  /* FreeBSD uses MAP_ANON for MAP_ANONYMOUS */
200  #  define MAP_ANONYMOUS MAP_ANON  #  define MAP_ANONYMOUS MAP_ANON
201    
 #elif defined(OPSYS_NETBSD2) /* version 2.x */  
 #  define OS_NAME       "BSD"  
 #  define HAS_POSIX_LIBRARIES  
 #  define HAS_BSD_SIGS  
 #  define HAS_GETRUSAGE  
 #  define HAS_SETITIMER  
 #  define HAS_MMAP  
 #  define HAS_SELECT  
 #  define HAS_SCALBN  
 #  define HAS_ILOGB  
 #  define HAS_SIGCONTEXT  
 #  define HAS_STRERROR  
   
202  #elif defined(OPSYS_NETBSD) /* version 3.x */  #elif defined(OPSYS_NETBSD) /* version 3.x */
203  #  define OS_NAME       "BSD"  #  define OS_NAME       "BSD"
204  #  define HAS_POSIX_LIBRARIES  #  define HAS_POSIX_LIBRARIES
# Line 383  Line 246 
246    
247  #endif  #endif
248    
   
 /** Extra #defines **/  
 #if (defined(HOST_SPARC) && defined(OPSYS_SUNOS) && (! defined(sparc)))  
 #  define sparc  
 #elif ((defined(OPSYS_IRIX4) || defined(OPSYS_IRIX5)) && (! defined(LANGUAGE_C)))  
 #  define LANGUAGE_C  
 #endif  
   
 #if (defined(HOST_MIPS))  
 #  include "ml-sizes.h"  /* for endianess */  
 #  if (defined(BYTE_ORDER_BIG) && (! defined(MIPSEB)))  
 #    define MIPSEB  
 #  elif (defined(BYTE_ORDER_LITTLE) && (! defined(MIPSEL)))  
 #    define MIPSEL  
 #  endif  
 #endif  
   
 #if ((defined(OPSYS_IRIX4) || defined(OPSYS_IRIX5)) && (! defined(__EXTENSIONS__)))  
 #  define __EXTENSIONS__  
 #endif  
   
 #include INCLUDE_TYPES_H  
249  #include <unistd.h>  #include <unistd.h>
250  #include <string.h>  #include <string.h>
251  #include <errno.h>  #include <errno.h>

Legend:
Removed from v.5228  
changed lines
  Added in v.5229

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0