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

SCM Repository

[smlnj] Annotation of /sml/trunk/src/runtime/include/ml-osdep.h
ViewVC logotype

Annotation of /sml/trunk/src/runtime/include/ml-osdep.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 810 - (view) (download) (as text)

1 : monnier 249 /* ml-osdep.h
2 :     *
3 :     * COPYRIGHT (c) 1995 AT&T Bell Laboratories.
4 :     *
5 :     * This file contains definitions to hide a few OS dependencies. It
6 :     * should be portable across both UNIX and non-UNIX systems (unlike the
7 :     * UNIX specific "ml-unixdep.h" header file).
8 :     *
9 :     * GETPAGESIZE() return the machine's pagesize in bytes
10 :     * PATH_ARC_SEP the pathname arc separator character
11 :     * SYSCALL_RET_ERR this is set, if system calls typically
12 :     * return an error code status (unlike UNIX,
13 :     * where the global errno is used).
14 :     */
15 :    
16 :     #ifndef _ML_OSDEP_
17 :     #define _ML_OSDEP_
18 :    
19 :     #if defined(OPSYS_UNIX)
20 : george 810 # if (defined(OPSYS_SUNOS) || defined(OPSYS_IRIX4) || defined(OPSYS_LINUX) || defined(OPSYS_AIX) || defined(OPSYS_FREEBSD) || defined(OPSYS_NETBSD) || defined(OPSYS_DARWIN))
21 : monnier 249 # define GETPAGESIZE() (getpagesize())
22 :     # else
23 :     /* POSIX 1003.1b interface */
24 :     # include "ml-unixdep.h"
25 :     # ifdef _SC_PAGESIZE
26 :     # define GETPAGESIZE() (sysconf(_SC_PAGESIZE))
27 :     # else
28 :     /* HPUX engineers can't read specs */
29 :     # define GETPAGESIZE() (sysconf(_SC_PAGE_SIZE))
30 :     # endif
31 :     # endif
32 :    
33 :     # define PATH_ARC_SEP '/'
34 :     # define HAS_GETTIMEOFDAY
35 :    
36 :     #elif defined(OPSYS_MACOS)
37 :     # define PATH_ARC_SEP ':'
38 :     # define SYSCALL_RET_ERR
39 :    
40 :     #elif defined(OPSYS_OS2)
41 :     # define PATH_ARC_SEP '\\'
42 :    
43 :     #elif defined(OPSYS_WIN32)
44 :     # define PATH_ARC_SEP '\\'
45 :    
46 :     extern int GetPageSize (void);
47 :    
48 :     # define GETPAGESIZE() GetPageSize()
49 :     # define HAS_GETTIMEOFDAY
50 :    
51 :     #endif
52 :    
53 :     #endif /* !_ML_OSDEP_ */
54 :    

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