source: trunk/third/sysinfo/mcdefs.h @ 12269

Revision 12269, 1.1 KB checked in by ghudson, 26 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r12268, which included commits to RCS files with non-trunk default branches.
Line 
1/*
2 * Copyright (c) 1992-1998 Michael A. Cooper.
3 * This software may be freely used and distributed provided it is not
4 * sold for profit or used in part or in whole for commercial gain
5 * without prior written agreement, and the author is credited
6 * appropriately.
7 */
8
9/*
10 * $Revision: 1.1.1.1 $
11 */
12
13/*
14 * MagniComp common definetions
15 *
16 * You should almost always include "mconfig.h" directly instead of this file.
17 * "mconfig.h" will in turn make sure things like IS_POSIX_SOURCE are defined.
18 */
19#include "options.h"            /* Need to include options.h before errno.h */
20#include "strutil.h"
21#include <sys/errno.h>
22
23/*
24 * How to get system error string
25 */
26#if     defined(SYSERR)
27#       undef SYSERR
28#endif  /* SYSERR */
29#if     defined(IS_POSIX_SOURCE)
30extern          int errno;
31#define         SYSERR                  strerror(errno)
32#else   /* !IS_POSIX_SOURCE */
33extern          int                     errno;
34extern          int                     sys_nerr;
35extern          char                    *sys_errlist[];
36#define         SYSERR \
37((errno>0 && errno<sys_nerr) ? sys_errlist[errno] : "(unknown system error)")
38#endif  /* IS_POSIX_SOURCE */
39
40/*
41 * NULL
42 */
43#define CNULL                   '\0'
44#define C_NULL                  CNULL
Note: See TracBrowser for help on using the repository browser.