root/src/externs.h

/* [previous][next][first][last][top][bottom][index][help]  */

INCLUDED FROM


   1 /* Copyright 1993,1994 by Paul Vixie
   2  * All rights reserved
   3  */
   4 
   5 /*
   6  * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
   7  * Copyright (c) 1997,2000 by Internet Software Consortium, Inc.
   8  *
   9  * Permission to use, copy, modify, and distribute this software for any
  10  * purpose with or without fee is hereby granted, provided that the above
  11  * copyright notice and this permission notice appear in all copies.
  12  *
  13  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
  14  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  15  * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
  16  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  17  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  18  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
  19  * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  20  */
  21 
  22 /* reorder these #include's at your peril */
  23 
  24 #ifndef CRONIE_EXTERNS_H
  25 #define CRONIE_EXTERNS_H
  26 
  27 #if defined(LOGIN_CAP)
  28 # include <login_cap.h>
  29 #endif /*LOGIN_CAP*/
  30 
  31 #if defined(BSD_AUTH)
  32 # include <bsd_auth.h>
  33 #endif /*BSD_AUTH*/
  34 
  35 #define DIR_T   struct dirent
  36 #define WAIT_T  int
  37 #define SIG_T   sig_t
  38 #define TIME_T  time_t
  39 #define PID_T   pid_t
  40 
  41 #ifndef TZNAME_ALREADY_DEFINED
  42 extern char *tzname[2];
  43 #endif
  44 #define TZONE(tm) tzname[(tm).tm_isdst]
  45 
  46 #if (defined(BSD)) && (BSD >= 199103) || defined(__linux) || defined(__sun) || defined(_AIX)
  47 # define HAVE_SAVED_UIDS
  48 #endif
  49 
  50 #define MY_UID(pw) getuid()
  51 #define MY_GID(pw) getgid()
  52 
  53 /* getopt() isn't part of POSIX.  some systems define it in <stdlib.h> anyway.
  54  * of those that do, some complain that our definition is different and some
  55  * do not.  to add to the misery and confusion, some systems define getopt()
  56  * in ways that we cannot predict or comprehend, yet do not define the adjunct
  57  * external variables needed for the interface.
  58  */
  59 #if (!defined(BSD) || (BSD < 198911))
  60 int     getopt(int, char * const *, const char *);
  61 #endif
  62 
  63 #if (!defined(BSD) || (BSD < 199103))
  64 extern  char *optarg;
  65 extern  int optind, opterr, optopt;
  66 #endif
  67 
  68 /* digital unix needs this but does not give us a way to identify it.
  69  */
  70 extern  int             flock(int, int);
  71 
  72 /* not all systems who provide flock() provide these definitions.
  73  */
  74 #ifndef LOCK_SH
  75 # define LOCK_SH 1
  76 #endif
  77 #ifndef LOCK_EX
  78 # define LOCK_EX 2
  79 #endif
  80 #ifndef LOCK_NB
  81 # define LOCK_NB 4
  82 #endif
  83 #ifndef LOCK_UN
  84 # define LOCK_UN 8
  85 #endif
  86 
  87 #ifndef WCOREDUMP
  88 # define WCOREDUMP(st)          (((st) & 0200) != 0)
  89 #endif
  90 
  91 #endif /* CRONIE_EXTERNS_H */

/* [previous][next][first][last][top][bottom][index][help]  */