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