Annotation of embedaddon/ntp/include/l_stdlib.h, revision 1.1.1.1

1.1       misho       1: /*
                      2:  * Proto types for machines that are not ANSI and POSIX         compliant.
                      3:  * This is optional
                      4:  */
                      5: 
                      6: #ifndef _l_stdlib_h
                      7: #define _l_stdlib_h
                      8: 
                      9: #ifdef HAVE_CONFIG_H
                     10: #include <config.h>
                     11: #endif
                     12: 
                     13: #ifdef HAVE_STDLIB_H
                     14: # include <stdlib.h>
                     15: #endif
                     16: 
                     17: #include <stdarg.h>
                     18: #include <sys/types.h>
                     19: 
                     20: /* Needed for speed_t. */
                     21: #ifdef HAVE_TERMIOS_H
                     22: # include <termios.h>
                     23: #endif
                     24: 
                     25: #ifdef HAVE_ERRNO_H
                     26: # include <errno.h>
                     27: #endif
                     28: 
                     29: #include "ntp_types.h"
                     30: #include "ntp_proto.h"
                     31: 
                     32: /* Let's try to keep this more or less alphabetized... */
                     33: 
                     34: #ifdef DECL_ADJTIME_0
                     35: struct timeval;
                     36: extern int     adjtime         (struct timeval *, struct timeval *);
                     37: #endif
                     38: 
                     39: #ifdef DECL_BCOPY_0
                     40: #ifndef bcopy
                     41: extern void    bcopy           (const char *, char *, int);
                     42: #endif
                     43: #endif
                     44: 
                     45: #ifdef DECL_BZERO_0
                     46: #ifndef bzero
                     47: extern void    bzero           (char *, int);
                     48: #endif
                     49: #endif
                     50: 
                     51: #ifdef DECL_CFSETISPEED_0
                     52: struct termios;
                     53: extern int     cfsetispeed     (struct termios *, speed_t);
                     54: extern int     cfsetospeed     (struct termios *, speed_t);
                     55: #endif
                     56: 
                     57: extern char *  getpass         (const char *);
                     58: 
                     59: #ifdef DECL_HSTRERROR_0
                     60: extern const char * hstrerror  (int);
                     61: #endif
                     62: 
                     63: #ifdef DECL_INET_NTOA_0
                     64: struct in_addr;
                     65: extern char *  inet_ntoa       (struct in_addr);
                     66: #endif
                     67: 
                     68: #ifdef DECL_IOCTL_0
                     69: extern int     ioctl           (int, u_long, char *);
                     70: #endif
                     71: 
                     72: #ifdef DECL_IPC_0
                     73: struct sockaddr;
                     74: extern int     bind            (int, struct sockaddr *, int);
                     75: extern int     connect         (int, struct sockaddr *, int);
                     76: extern int     recv            (int, char *, int, int);
                     77: extern int     recvfrom        (int, char *, int, int, struct sockaddr *, int *);
                     78: extern int     send            (int, char *, int, int);
                     79: extern int     sendto          (int, char *, int, int, struct sockaddr *, int);
                     80: extern int     setsockopt      (int, int, int, char *, int);
                     81: extern int     socket          (int, int, int);
                     82: #endif
                     83: 
                     84: #ifdef DECL_MEMMOVE_0
                     85: extern void *  memmove         (void *, const void *, size_t);
                     86: #endif
                     87: 
                     88: #ifdef DECL_MEMSET_0
                     89: extern char *  memset          (char *, int, int);
                     90: #endif
                     91: 
                     92: #ifdef DECL_MKSTEMP_0
                     93: extern int     mkstemp         (char *);
                     94: #endif
                     95: 
                     96: #ifdef DECL_MKTEMP_0
                     97: extern char   *mktemp          (char *);       
                     98: #endif
                     99: 
                    100: #ifdef DECL_NLIST_0
                    101: struct nlist;
                    102: extern int     nlist           (const char *, struct nlist *);
                    103: #endif
                    104: 
                    105: #ifdef DECL_PLOCK_0
                    106: extern int     plock           (int);
                    107: #endif
                    108: 
                    109: #ifdef DECL_RENAME_0
                    110: extern int     rename          (const char *, const char *);
                    111: #endif
                    112: 
                    113: #ifdef DECL_SELECT_0
                    114: #ifdef _ntp_select_h
                    115: extern int     select          (int, fd_set *, fd_set *, fd_set *, struct timeval *);
                    116: #endif
                    117: #endif
                    118: 
                    119: #ifdef DECL_SETITIMER_0
                    120: struct itimerval;
                    121: extern int     setitimer       (int , struct itimerval *, struct itimerval *);
                    122: #endif
                    123: 
                    124: #ifdef PRIO_PROCESS
                    125: #ifdef DECL_SETPRIORITY_0
                    126: extern int     setpriority     (int, int, int);
                    127: #endif
                    128: #ifdef DECL_SETPRIORITY_1
                    129: extern int     setpriority     (int, id_t, int);
                    130: #endif
                    131: #endif
                    132: 
                    133: #ifdef DECL_SIGVEC_0
                    134: struct sigvec;
                    135: extern int     sigvec          (int, struct sigvec *, struct sigvec *);
                    136: #endif
                    137: 
                    138: #ifndef HAVE_SNPRINTF
                    139: /* PRINTFLIKE3 */
                    140: extern int     snprintf        (char *, size_t, const char *, ...);
                    141: #endif
                    142: 
                    143: /* HMS: does this need further protection? */
                    144: #ifndef HAVE_VSNPRINTF
                    145: extern int     vsnprintf       (char *, size_t, const char *, va_list);
                    146: #endif
                    147: 
                    148: #ifdef DECL_STDIO_0
                    149: #if defined(FILE) || defined(BUFSIZ)
                    150: extern int     _flsbuf         (int, FILE *);
                    151: extern int     _filbuf         (FILE *);
                    152: extern int     fclose          (FILE *);
                    153: extern int     fflush          (FILE *);
                    154: extern int     fprintf         (FILE *, const char *, ...);
                    155: extern int     fscanf          (FILE *, const char *, ...);
                    156: extern int     fputs           (const char *, FILE *);
                    157: extern int     fputc           (int, FILE *);
                    158: extern int     fread           (char *, int, int, FILE *);
                    159: extern void    perror          (const char *);
                    160: extern int     printf          (const char *, ...);
                    161: extern int     setbuf          (FILE *, char *);
                    162: # ifdef HAVE_SETLINEBUF
                    163: extern int     setlinebuf      (FILE *);
                    164: # endif
                    165: extern int     setvbuf         (FILE *, char *, int, int);
                    166: extern int     scanf           (const char *, ...);
                    167: extern int     sscanf          (const char *, const char *, ...);
                    168: extern int     vfprintf        (FILE *, const char *, ...);
                    169: extern int     vsprintf        (char *, const char *, ...);
                    170: #endif
                    171: #endif
                    172: 
                    173: #ifdef DECL_STIME_0
                    174: extern int     stime           (const time_t *);
                    175: #endif
                    176: 
                    177: #ifdef DECL_STIME_1
                    178: extern int     stime           (long *);
                    179: #endif
                    180: 
                    181: #ifdef DECL_STRERROR_0
                    182: extern char *  strerror                (int errnum);
                    183: #endif
                    184: 
                    185: #ifdef DECL_STRTOL_0
                    186: extern long    strtol          (const char *, char **, int);
                    187: #endif
                    188: 
                    189: #ifdef DECL_SYSCALL
                    190: extern int     syscall         (int, ...);
                    191: #endif
                    192: 
                    193: #ifdef DECL_SYSLOG_0
                    194: extern void    closelog        (void);
                    195: #ifndef LOG_DAEMON
                    196: extern void    openlog         (const char *, int);
                    197: #else
                    198: extern void    openlog         (const char *, int, int);
                    199: #endif
                    200: extern int     setlogmask      (int);
                    201: extern void    syslog          (int, const char *, ...);
                    202: #endif
                    203: 
                    204: #ifdef DECL_TIME_0
                    205: extern time_t  time            (time_t *);
                    206: #endif
                    207: 
                    208: #ifdef DECL_TIMEOFDAY_0
                    209: #ifdef SYSV_TIMEOFDAY
                    210: extern int     gettimeofday    (struct timeval *);
                    211: extern int     settimeofday    (struct timeval *);
                    212: #else /* not SYSV_TIMEOFDAY */
                    213: struct timezone;
                    214: extern int     gettimeofday    (struct timeval *, struct timezone *);
                    215: extern int     settimeofday    (struct timeval *, void *);
                    216: #endif /* not SYSV_TIMEOFDAY */
                    217: #endif
                    218: 
                    219: #ifdef DECL_TOLOWER_0
                    220: extern int     tolower         (int);
                    221: #endif
                    222: 
                    223: #ifdef DECL_TOUPPER_0
                    224: extern int     toupper         (int);
                    225: #endif
                    226: 
                    227: /*
                    228:  * Necessary variable declarations.
                    229:  */
                    230: #ifdef DECL_ERRNO
                    231: extern int     errno;
                    232: #endif
                    233: 
                    234: #if defined(DECL_H_ERRNO) && !defined(h_errno)
                    235: extern int     h_errno;
                    236: #endif
                    237: 
                    238: #endif /* l_stdlib_h */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>