1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
|
/* $Id: misc.h,v 1.7 1993/11/02 00:03:04 chip Exp $
*
* Miscellaneous definitions.
*
* $Log: misc.h,v $
* Revision 1.7 1993/11/02 00:03:04 chip
* Use __GNUC_MINOR__ to trigger attribute keyword.
*
* Revision 1.6 1993/10/28 16:49:51 chip
* Declare function return types, including void.
*
* Revision 1.5 1991/08/27 17:41:21 chip
* Use DECLARE_*.
*
* Revision 1.4 1991/08/27 15:39:57 chip
* Add asctime(). Remove malloc(), realloc(), free().
*
* Revision 1.3 1991/08/21 22:15:33 chip
* Careful creation for NFS.
*
* Revision 1.2 1991/06/04 18:16:28 chip
* Feature-based configuration.
*
* Revision 1.1 1991/05/13 18:36:55 chip
* Initial revision
*
*/
/*
* Constants
*/
#undef NULL
#define NULL 0 /* The One True NULL */
#define FALSE 0
#define TRUE 1
/*
* Macros.
*/
/* Function parameter definition macro. */
#if ANSI_C
# define P(x) x
#else
# define P(x) ()
#endif
/* Length parameter for fgets() on given buffer. */
#define GETSIZE(buf) (int) (sizeof(buf) - 1)
/* How to declare functions that don't return
and functions that are like printf. */
#ifdef __GNUC__
# if __GNUC__ < 2 || __GNUC_MINOR__ < 5
# define NORETURN volatile
# define ATTRIBUTE(x) /**/
# else
# define NORETURN /**/
# define ATTRIBUTE(x) __attribute__(x)
# endif
#else /* not GCC */
# define NORETURN /**/
# define ATTRIBUTE(x) /**/
#endif /* GCC */
/*
* Public data.
*/
extern char **environ;
#ifdef DECLARE_TZNAME
extern char *tzname[2];
#endif
#ifdef DECLARE_ERRNO
extern int errno;
#endif
/*
* Declare library functions.
*/
extern char *ctime();
extern char *asctime();
extern char *getenv();
extern char *getlogin();
extern char *mktemp();
extern int putenv();
extern long lseek();
extern long time();
extern void exit();
#ifdef DECLARE_SIGNAL
extern SIGTYPE(*signal()) ();
#endif
|