rpm  5.4.10
system.h
Go to the documentation of this file.
1 
5 #ifndef H_SYSTEM
6 #define H_SYSTEM
7 
8 #ifdef HAVE_CONFIG_H
9 #include "config.h"
10 #endif
11 
12 #include <sys/types.h>
13 
14 #if defined(__LCLINT__)
15 /*@-redef@*/
16 typedef unsigned int u_int32_t;
17 typedef unsigned short u_int16_t;
18 typedef unsigned char u_int8_t;
19 /*@-incondefs@*/ /* LCLint 3.0.0.15 */
20 typedef int int32_t;
21 /*@=incondefs@*/
22 /* XXX from /usr/include/bits/sigset.h */
23 /*@-sizeoftype@*/
24 # define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int)))
25 typedef struct
26  {
27  unsigned long int __val[_SIGSET_NWORDS];
28  } __sigset_t;
29 /*@=sizeoftype@*/
30 /*@=redef@*/
31 #endif
32 
33 #include <sys/stat.h>
34 /* XXX retrofit the *BSD constant if not present. */
35 #if !defined(HAVE_S_ISTXT) && defined(HAVE_S_ISVTX)
36 #define S_ISTXT S_ISVTX
37 #endif
38 #if !defined(HAVE_STRUCT_STAT_ST_BIRTHTIME)
39 #if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) && defined(st_birthtime)
40 #undef st_birthtime
41 #endif
42 #define st_birthtime st_ctime /* Use st_ctime if no st_birthtime. */
43 #endif
44 /* XXX retrofit the *BSD st_[acm]timespec names if not present. */
45 #if !defined(HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC) && defined(HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC)
46 #define st_atimespec st_atim
47 #define st_ctimespec st_ctim
48 #define st_mtimespec st_mtim
49 #endif
50 
51 #include <stdio.h>
52 
53 #ifdef HAVE_SYS_PARAM_H
54 #include <sys/param.h>
55 #endif
56 /* XXX retrofit the *BSD constant if not present. */
57 #if !defined(MAXPHYS)
58 #define MAXPHYS (128 * 1024) /* max raw I/O transfer size */
59 #endif
60 
61 /* <unistd.h> should be included before any preprocessor test
62  of _POSIX_VERSION. */
63 #ifdef HAVE_UNISTD_H
64 #define uuid_t unistd_uuid_t /* XXX Mac OS X dares to be different. */
65 #include <unistd.h>
66 #undef unistd_uuid_t /* XXX Mac OS X dares to be different. */
67 #if defined(__LCLINT__)
68 /*@-superuser -declundef -incondefs @*/ /* LCL: modifies clause missing */
69 extern int chroot (const char *__path)
70  /*@globals errno, systemState @*/
71  /*@modifies errno, systemState @*/;
72 /*@=superuser =declundef =incondefs @*/
73 #endif
74 #if !defined(__GLIBC__) && !defined(__LCLINT__)
75 #ifdef __APPLE__
76 #include <crt_externs.h>
77 #define environ (*_NSGetEnviron())
78 #else
79 extern char ** environ;
80 #endif /* __APPLE__ */
81 #endif
82 #endif
83 
84 #ifdef TIME_WITH_SYS_TIME
85 # include <sys/time.h>
86 # include <time.h>
87 #else
88 # ifdef HAVE_SYS_TIME_H
89 # include <sys/time.h>
90 # else
91 # include <time.h>
92 # endif
93 #endif
94 
95 /* XXX retrofit the (POSIX? GNU? *BSD?) macros if not present. */
96 #if !defined(TIMEVAL_TO_TIMESPEC)
97 # define TIMEVAL_TO_TIMESPEC(tv, ts) { \
98  (ts)->tv_sec = (tv)->tv_sec; \
99  (ts)->tv_nsec = (tv)->tv_usec * 1000; \
100 }
101 #endif
102 #if !defined(TIMESPEC_TO_TIMEVAL)
103 # define TIMESPEC_TO_TIMEVAL(tv, ts) { \
104  (tv)->tv_sec = (ts)->tv_sec; \
105  (tv)->tv_usec = (ts)->tv_nsec / 1000; \
106 }
107 #endif
108 
109 /* Since major is a function on SVR4, we can't use `ifndef major'. */
110 #if defined(MAJOR_IN_MKDEV)
111 #include <sys/mkdev.h>
112 #define HAVE_MAJOR
113 #endif
114 #if defined(MAJOR_IN_SYSMACROS)
115 #include <sys/sysmacros.h>
116 #define HAVE_MAJOR
117 #endif
118 #ifdef major /* Might be defined in sys/types.h. */
119 #define HAVE_MAJOR
120 #endif
121 
122 #ifndef HAVE_MAJOR
123 #define major(dev) (((dev) >> 8) & 0xff)
124 #define minor(dev) ((dev) & 0xff)
125 #define makedev(maj, min) (((maj) << 8) | (min))
126 #endif
127 #undef HAVE_MAJOR
128 
129 #ifdef HAVE_UTIME_H
130 #include <utime.h>
131 #endif
132 
133 #ifdef HAVE_STRING_H
134 # if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H)
135 # include <memory.h>
136 # endif
137 # include <string.h>
138 #else
139 # include <strings.h>
140 char *memchr ();
141 #endif
142 
143 #if !defined(HAVE_STPCPY)
144 char * stpcpy(/*@out@*/ char * dest, const char * src);
145 #endif
146 
147 #if !defined(HAVE_STPNCPY)
148 char * stpncpy(/*@out@*/ char * dest, const char * src, size_t n);
149 #endif
150 
151 #include <errno.h>
152 #ifndef errno
153 /*@-declundef @*/
154 extern int errno;
155 /*@=declundef @*/
156 #endif
157 
158 #if defined(__LCLINT__)
159 /*@-declundef @*/
160 /*@exits@*/
161 extern void error(int status, int errnum, const char *format, ...)
162  __attribute__ ((__format__ (__printf__, 3, 4)))
163  /*@globals fileSystem @*/
164  /*@modifies fileSystem @*/;
165 /*@=declundef @*/
166 #else
167 #if defined(HAVE_ERROR) && defined(HAVE_ERROR_H)
168 #include <error.h>
169 #endif
170 #endif
171 
172 #if defined(HAVE___SECURE_GETENV) && !defined(__LCLINT__)
173 #define getenv(_s) __secure_getenv(_s)
174 #endif
175 
176 #ifdef STDC_HEADERS
177 /*@-macrounrecog -incondefs -globuse -mustmod @*/ /* FIX: shrug */
178 #define getopt system_getopt
179 /*@=macrounrecog =incondefs =globuse =mustmod @*/
180 /*@-skipansiheaders@*/
181 #include <stdlib.h>
182 /*@=skipansiheaders@*/
183 #undef getopt
184 #if defined(__LCLINT__)
185 /*@-declundef -incondefs @*/ /* LCL: modifies clause missing */
186 extern char * realpath (const char * file_name, /*@out@*/ char * resolved_name)
187  /*@globals errno, fileSystem @*/
188  /*@requires maxSet(resolved_name) >= (PATH_MAX - 1); @*/
189  /*@modifies *resolved_name, errno, fileSystem @*/;
190 /*@=declundef =incondefs @*/
191 #endif
192 #else /* not STDC_HEADERS */
193 char *getenv (const char *name);
194 #if !defined(HAVE_REALPATH)
195 char *realpath(const char *path, char resolved_path []);
196 #endif
197 #endif /* STDC_HEADERS */
198 
199 /* XXX solaris2.5.1 has not */
200 #if !defined(EXIT_FAILURE)
201 #define EXIT_FAILURE 1
202 #endif
203 
204 #ifdef HAVE_FCNTL_H
205 #include <fcntl.h>
206 #else
207 #include <sys/file.h>
208 #endif
209 
210 #if !defined(SEEK_SET) && !defined(__LCLINT__)
211 #define SEEK_SET 0
212 #define SEEK_CUR 1
213 #define SEEK_END 2
214 #endif
215 #if !defined(F_OK) && !defined(__LCLINT__)
216 #define F_OK 0
217 #define X_OK 1
218 #define W_OK 2
219 #define R_OK 4
220 #endif
221 
222 #ifdef HAVE_SIGNAL_H
223 # include <signal.h>
224 #endif
225 
226 #ifdef HAVE_DIRENT_H
227 # include <dirent.h>
228 # define NLENGTH(direct) (strlen((direct)->d_name))
229 #else /* not HAVE_DIRENT_H */
230 # define dirent direct
231 # define NLENGTH(direct) ((direct)->d_namlen)
232 # ifdef HAVE_SYS_NDIR_H
233 # include <sys/ndir.h>
234 # endif /* HAVE_SYS_NDIR_H */
235 # ifdef HAVE_SYS_DIR_H
236 # include <sys/dir.h>
237 # endif /* HAVE_SYS_DIR_H */
238 # ifdef HAVE_NDIR_H
239 # include <ndir.h>
240 # endif /* HAVE_NDIR_H */
241 #endif /* HAVE_DIRENT_H */
242 
243 #if defined(__LCLINT__)
244 /*@-declundef -incondefs @*/ /* LCL: missing annotation */
245 /*@only@*/ /*@out@*/ void * alloca (size_t __size)
246  /*@ensures maxSet(result) == (__size - 1) @*/
247  /*@*/;
248 /*@=declundef =incondefs @*/
249 #endif
250 
251 #ifdef __GNUC__
252 # undef alloca
253 # define alloca __builtin_alloca
254 #else
255 # ifdef HAVE_ALLOCA_H
256 # include <alloca.h>
257 # else
258 # ifndef _AIX
259 /* AIX alloca decl has to be the first thing in the file, bletch! */
260 char *alloca ();
261 # endif
262 # endif
263 #endif
264 
265 #if defined (__GLIBC__) && defined(__LCLINT__)
266 /*@-declundef@*/
267 /*@unchecked@*/
268 extern __const __int32_t *__ctype_tolower;
269 /*@unchecked@*/
270 extern __const __int32_t *__ctype_toupper;
271 /*@=declundef@*/
272 #endif
273 
274 #include <ctype.h>
275 
276 #if defined (__GLIBC__) && defined(__LCLINT__)
277 /*@-exportlocal@*/
278 extern int isalnum(int) __THROW /*@*/;
279 extern int iscntrl(int) __THROW /*@*/;
280 extern int isgraph(int) __THROW /*@*/;
281 extern int islower(int) __THROW /*@*/;
282 extern int ispunct(int) __THROW /*@*/;
283 extern int isxdigit(int) __THROW /*@*/;
284 extern int isascii(int) __THROW /*@*/;
285 extern int toascii(int) __THROW /*@*/;
286 extern int _toupper(int) __THROW /*@*/;
287 extern int _tolower(int) __THROW /*@*/;
288 /*@=exportlocal@*/
289 
290 #endif
291 
292 #if defined(HAVE_SYS_MMAN_H) && !defined(__LCLINT__)
293 #include <sys/mman.h>
294 #endif
295 
296 #if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)
297 #define MAP_ANONYMOUS MAP_ANON
298 #endif
299 
300 /* XXX FIXME: popt on sunos4.1.3: <sys/resource.h> requires <sys/time.h> */
301 #if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_SYS_TIME_H)
302 #include <sys/resource.h>
303 #endif
304 
305 #if defined(HAVE_SYS_UTSNAME_H)
306 #include <sys/utsname.h>
307 #endif
308 
309 #if defined(HAVE_SYS_WAIT_H)
310 #include <sys/wait.h>
311 #endif
312 
313 #if defined(HAVE_GETOPT_H)
314 /*@-noparams@*/
315 #include <getopt.h>
316 /*@=noparams@*/
317 #endif
318 
319 #if defined(HAVE_GRP_H)
320 #include <grp.h>
321 #endif
322 
323 #if defined(HAVE_LIMITS_H)
324 #include <limits.h>
325 #endif
326 
327 #if defined(HAVE_ERR_H)
328 #include <err.h>
329 #endif
330 
331 #if defined(HAVE_LIBGEN_H)
332 #include <libgen.h>
333 #endif
334 
335 #ifdef __cplusplus
336 extern "C" {
337 #endif
338 
339 /*@-declundef -incondefs @*/ /* FIX: these are macros */
342 /*@mayexit@*/ /*@only@*/ /*@out@*/ void * xmalloc (size_t size)
343  /*@globals errno @*/
344  /*@ensures maxSet(result) == (size - 1) @*/
345  /*@modifies errno @*/;
346 
349 /*@mayexit@*/ /*@only@*/ void * xcalloc (size_t nmemb, size_t size)
350  /*@ensures maxSet(result) == (nmemb - 1) @*/
351  /*@*/;
352 
356 /*@mayexit@*/ /*@only@*/ void * xrealloc (/*@null@*/ /*@only@*/ void * ptr,
357  size_t size)
358  /*@ensures maxSet(result) == (size - 1) @*/
359  /*@modifies *ptr @*/;
360 
363 /*@mayexit@*/ /*@only@*/ char * xstrdup (const char *str)
364  /*@*/;
365 /*@=declundef =incondefs @*/
366 
369 /*@unused@*/ /*@exits@*/ /*@only@*/ void * vmefail(size_t size)
370  /*@*/;
371 
372 #ifdef __cplusplus
373 }
374 #endif
375 
376 #if defined(HAVE_MCHECK_H)
377 #include <mcheck.h>
378 #if defined(__LCLINT__)
379 /*@-declundef -incondefs @*/ /* LCL: missing annotations */
380 #if 0
381 enum mcheck_status
382  {
383  MCHECK_DISABLED = -1, /* Consistency checking is not turned on. */
384  MCHECK_OK, /* Block is fine. */
385  MCHECK_FREE, /* Block freed twice. */
386  MCHECK_HEAD, /* Memory before the block was clobbered. */
387  MCHECK_TAIL /* Memory after the block was clobbered. */
388  };
389 #endif
390 
391 extern int mcheck (void (*__abortfunc) (enum mcheck_status))
392  /*@globals internalState@*/
393  /*@modifies internalState @*/;
394 extern int mcheck_pedantic (void (*__abortfunc) (enum mcheck_status))
395  /*@globals internalState@*/
396  /*@modifies internalState @*/;
397 extern void mcheck_check_all (void)
398  /*@globals internalState@*/
399  /*@modifies internalState @*/;
400 extern enum mcheck_status mprobe (void *__ptr)
401  /*@globals internalState@*/
402  /*@modifies internalState @*/;
403 extern void mtrace (void)
404  /*@globals internalState@*/
405  /*@modifies internalState @*/;
406 extern void muntrace (void)
407  /*@globals internalState@*/
408  /*@modifies internalState @*/;
409 /*@=declundef =incondefs @*/
410 #endif /* defined(__LCLINT__) */
411 
412 /* Memory allocation via macro defs to get meaningful locations from mtrace() */
413 #if defined(__GNUC__)
414 #define xmalloc(_size) (malloc(_size) ? : vmefail(_size))
415 #define xcalloc(_nmemb, _size) (calloc((_nmemb), (_size)) ? : vmefail(_size))
416 #define xrealloc(_ptr, _size) (realloc((_ptr), (_size)) ? : vmefail(_size))
417 #define xstrdup(_str) (strcpy((char *)(malloc(strlen(_str)+1) ? : vmefail(strlen(_str)+1)), (_str)))
418 #endif /* defined(__GNUC__) */
419 #endif /* HAVE_MCHECK_H */
420 
421 /* Retrofit glibc __progname */
422 #if defined __GLIBC__ && __GLIBC__ >= 2
423 #if __GLIBC_MINOR__ >= 1
424 #define __progname __assert_program_name
425 #endif
426 #define setprogname(pn)
427 #else
428 #define __progname program_name
429 #define setprogname(pn) \
430  { if ((__progname = strrchr(pn, '/')) != NULL) __progname++; \
431  else __progname = pn; \
432  }
433 #endif
434 /*@unchecked@*/
435 extern const char *__progname;
436 
437 /* XXX limit the fiddle up to linux for now. */
438 #if !defined(HAVE_SETPROCTITLE) && defined(__linux__)
439 extern int finiproctitle(void)
440  /*@globals environ @*/
441  /*@modifies environ @*/;
442 extern int initproctitle(int argc, char *argv[], char *envp[])
443  /*@globals environ @*/
444  /*@modifies environ @*/;
445 
446 extern int setproctitle (const char *fmt, ...)
447  __attribute__ ((__format__ (__printf__, 1, 2)))
448  /*@*/;
449 #endif
450 
451 #if defined(HAVE_NETDB_H)
452 #include <netdb.h>
453 #endif
454 
455 #if defined(HAVE_NETINET_IN_H)
456 #include <netinet/in.h>
457 #endif
458 #if defined(HAVE_ARPA_INET_H)
459 #include <arpa/inet.h>
460 #endif
461 
462 #if defined(HAVE_PWD_H)
463 #include <pwd.h>
464 #endif
465 
466 /* Take care of NLS matters. */
467 
468 #if defined(HAVE_LOCALE_H)
469 # include <locale.h>
470 #endif
471 #if !defined(HAVE_SETLOCALE)
472 # define setlocale(Category, Locale) /* empty */
473 #endif
474 
475 #if defined(ENABLE_NLS) && !defined(__LCLINT__)
476 # include <libintl.h>
477 # define _(Text) dgettext (PACKAGE, Text)
478 # define D_(Text) Text
479 #else
480 # undef bindtextdomain
481 # define bindtextdomain(Domain, Directory) /* empty */
482 # undef textdomain
483 # define textdomain(Domain) /* empty */
484 # define _(Text) Text
485 # define D_(Text) Text
486 # undef dgettext
487 # define dgettext(DomainName, Text) Text
488 #endif
489 
490 #define N_(Text) Text
491 
492 /* ============== from misc/miscfn.h */
493 
494 /*@-noparams@*/
495 #include "rpmio/glob.h"
496 #include "rpmio/fnmatch.h"
497 /*@=noparams@*/
498 
499 #if defined(__LCLINT__)
500 /*@-declundef -incondefs @*/ /* LCL: missing annotation */
501 #if 0
502 typedef /*@concrete@*/ struct
503  {
504  size_t gl_pathc;
505  char **gl_pathv;
506  size_t gl_offs;
507  int gl_flags;
508 
509  void (*gl_closedir) (void *);
510 #ifdef _GNU_SOURCE
511  struct dirent *(*gl_readdir) (void *);
512 #else
513  void *(*gl_readdir) (void *);
514 #endif
515  ptr_t (*gl_opendir) (const char *);
516 #ifdef _GNU_SOURCE
517  int (*gl_lstat) (const char *restrict, struct stat *restrict);
518  int (*gl_stat) (const char *restrict, struct stat *restrict);
519 #else
520  int (*gl_lstat) (const char *restrict, void *restrict);
521  int (*gl_stat) (const char *restrict, void *restrict);
522 #endif
523  } glob_t;
524 #endif
525 
526 #if 0
527 /*@-constuse@*/
528 /*@constant int GLOB_ERR@*/
529 /*@constant int GLOB_MARK@*/
530 /*@constant int GLOB_NOSORT@*/
531 /*@constant int GLOB_DOOFFS@*/
532 /*@constant int GLOB_NOCHECK@*/
533 /*@constant int GLOB_APPEND@*/
534 /*@constant int GLOB_NOESCAPE@*/
535 /*@constant int GLOB_PERIOD@*/
536 
537 #ifdef _GNU_SOURCE
538 /*@constant int GLOB_MAGCHAR@*/
539 /*@constant int GLOB_ALTDIRFUNC@*/
540 /*@constant int GLOB_BRACE@*/
541 /*@constant int GLOB_NOMAGIC@*/
542 /*@constant int GLOB_TILDE@*/
543 /*@constant int GLOB_ONLYDIR@*/
544 /*@constant int GLOB_TILDE_CHECK@*/
545 #endif
546 
547 /*@constant int GLOB_FLAGS@*/
548 
549 /*@constant int GLOB_NOSPACE@*/
550 /*@constant int GLOB_ABORTED@*/
551 /*@constant int GLOB_NOMATCH@*/
552 /*@constant int GLOB_NOSYS@*/
553 #ifdef _GNU_SOURCE
554 /*@constant int GLOB_ABEND@*/
555 #endif
556 /*@=constuse@*/
557 #endif
558 
559 /*@-protoparammatch -redecl@*/
560 /*@-type@*/ /* XXX glob64_t */
561 extern int glob (const char *__pattern, int __flags,
562  int (*__errfunc) (const char *, int),
563  /*@out@*/ glob_t *__pglob)
564  /*@globals errno, fileSystem @*/
565  /*@modifies *__pglob, errno, fileSystem @*/;
566  /* XXX only annotation is a white lie */
567 extern void globfree (/*@only@*/ glob_t *__pglob)
568  /*@modifies *__pglob @*/;
569 /*@=type@*/
570 #ifdef _GNU_SOURCE
571 extern int glob_pattern_p (const char *__pattern, int __quote)
572  /*@*/;
573 #endif
574 /*@=protoparammatch =redecl@*/
575 
576 #if 0
577 /*@-constuse@*/
578 /*@constant int FNM_PATHNAME@*/
579 /*@constant int FNM_NOESCAPE@*/
580 /*@constant int FNM_PERIOD@*/
581 
582 #ifdef _GNU_SOURCE
583 /*@constant int FNM_FILE_NAME@*/ /* GNU extension */
584 /*@constant int FNM_LEADING_DIR@*/ /* GNU extension */
585 /*@constant int FNM_CASEFOLD@*/ /* GNU extension */
586 /*@constant int FNM_EXTMATCH@*/ /* GNU extension */
587 #endif
588 
589 /*@constant int FNM_NOMATCH@*/
590 
591 #ifdef _XOPEN_SOURCE
592 /*@constant int FNM_NOSYS@*/ /* X/Open */
593 #endif
594 /*@=constuse@*/
595 #endif
596 
597 /*@-redecl@*/
598 extern int fnmatch (const char *__pattern, const char *__name, int __flags)
599  /*@*/;
600 /*@=redecl@*/
601 /*@=declundef =incondefs @*/
602 #endif
603 
604 #if !defined(__cplusplus)
605 #if !defined(HAVE_S_IFSOCK)
606 #define S_IFSOCK (0xc000)
607 #endif
608 
609 #if !defined(HAVE_S_ISLNK)
610 #define S_ISLNK(mode) ((mode & 0xf000) == S_IFLNK)
611 #endif
612 
613 #if !defined(HAVE_S_ISSOCK)
614 #define S_ISSOCK(mode) ((mode & 0xf000) == S_IFSOCK)
615 #endif
616 #endif /* !defined(__cplusplus) */
617 
618 #if defined(NEED_STRINGS_H)
619 #include <strings.h>
620 #endif
621 
622 #if defined(NEED_MYREALLOC)
623 #define realloc(ptr,size) myrealloc(ptr,size)
624 extern void *myrealloc(void *, size_t);
625 #endif
626 
627 #if !defined(HAVE_SETENV)
628 extern int setenv(const char *name, const char *value, int replace);
629 extern void unsetenv(const char *name);
630 #endif
631 
632 #if defined(HAVE_SYS_SOCKET_H)
633 #include <sys/types.h>
634 #include <sys/socket.h>
635 #endif
636 
637 #if defined(HAVE_POLL_H)
638 #include <poll.h>
639 #else
640 #if defined(HAVE_SYS_SELECT_H) && !defined(__LCLINT__)
641 #include <sys/select.h>
642 #endif
643 #endif
644 
645 /* Solaris <= 2.6 limits getpass return to only 8 chars */
646 #if defined(HAVE_GETPASSPHRASE)
647 #define getpass getpassphrase
648 #endif
649 
650 #if !defined(HAVE_LCHOWN)
651 #define lchown chown
652 #endif
653 
654 #if defined(HAVE_GETMNTINFO) || defined(HAVE_GETMNTINFO_R) || defined(HAVE_MNTCTL)
655 # define GETMNTENT_ONE 0
656 # define GETMNTENT_TWO 0
657 # if defined(HAVE_SYS_MNTCTL_H)
658 # include <sys/mntctl.h>
659 # endif
660 # if defined(HAVE_SYS_VMOUNT_H)
661 # include <sys/vmount.h>
662 # endif
663 # if defined(HAVE_SYS_MOUNT_H)
664 # include <sys/mount.h>
665 # endif
666 #elif defined(HAVE_MNTENT_H) || !defined(HAVE_GETMNTENT) || defined(HAVE_STRUCT_MNTTAB)
667 # if defined(HAVE_MNTENT_H)
668 # include <stdio.h>
669 # include <mntent.h>
670 # define our_mntent struct mntent
671 # define our_mntdir mnt_dir
672 # elif defined(HAVE_STRUCT_MNTTAB)
673 # include <stdio.h>
674 # include <mnttab.h>
675  struct our_mntent {
676  char * our_mntdir;
677  };
678  struct our_mntent *getmntent(FILE *filep);
679 # define our_mntent struct our_mntent
680 # else
681 # include <stdio.h>
682  struct our_mntent {
683  char * our_mntdir;
684  };
685  struct our_mntent *getmntent(FILE *filep);
686 # define our_mntent struct our_mntent
687 # endif
688 # define GETMNTENT_ONE 1
689 # define GETMNTENT_TWO 0
690 #elif defined(HAVE_SYS_MNTTAB_H)
691 # include <stdio.h>
692 # include <sys/mnttab.h>
693 # define GETMNTENT_ONE 0
694 # define GETMNTENT_TWO 1
695 # define our_mntent struct mnttab
696 # define our_mntdir mnt_mountp
697 #else /* if !HAVE_MNTCTL */
698 # error Neither mntent.h, mnttab.h, or mntctl() exists. I cannot build on this system.
699 #endif
700 
701 #ifndef MOUNTED
702 #define MOUNTED "/etc/mnttab"
703 #endif
704 
705 #if defined(__LCLINT__)
706 #define FILE_RCSID(id)
707 #else
708 #define FILE_RCSID(id) \
709 static inline const char *rcsid(const char *p) { \
710  return rcsid(p = id); \
711 }
712 #endif
713 
714 #if defined(HAVE_SEARCH_H)
715 #include <search.h>
716 #endif
717 
723 #if defined(__QNXNTO__)
724 #include <sys/netmgr.h>
725 #define Makedev(x,y) makedev(ND_LOCAL_NODE,(x),(y))
726 #else
727 #define Makedev(x,y) makedev((x),(y))
728 #endif
729 
730 #if defined(WITH_PTHREADS)
731 #if defined(HAVE_PTHREAD_H) && !defined(__LCLINT__)
732 #include <pthread.h>
733 #endif
734 #endif
735 
739 #define SUPPORT_IMPLICIT_TAG_DATA_TYPES 1
740 
744 #define SUPPORT_I18NSTRING_TYPE 0
745 
749 #define SUPPORT_NOSIGNATURES 1
750 
754 #undef SUPPORT_AR_PAYLOADS
755 
756 #endif /* H_SYSTEM */