Mercurial > hg > octave-kai > gnulib-hg
comparison lib/mountlist.c @ 3621:56f442359b0d
Include unlocked-io.h after all system headers.
Remove explicit declarations of xmalloc, xrealloc,
and xstrdup. Instead, include "xalloc.h".
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Sat, 17 Nov 2001 13:50:40 +0000 |
parents | 72422d1e9181 |
children | ab906cd2631e |
comparison
equal
deleted
inserted
replaced
3620:16386f80321b | 3621:56f442359b0d |
---|---|
19 # include <config.h> | 19 # include <config.h> |
20 #endif | 20 #endif |
21 | 21 |
22 #include <stdio.h> | 22 #include <stdio.h> |
23 #include <sys/types.h> | 23 #include <sys/types.h> |
24 #include "mountlist.h" | 24 |
25 #include "unlocked-io.h" | |
26 | 25 |
27 #ifdef STDC_HEADERS | 26 #ifdef STDC_HEADERS |
28 # include <stdlib.h> | 27 # include <stdlib.h> |
29 #else | 28 #else |
30 void free (); | 29 void free (); |
32 #if defined STDC_HEADERS || defined HAVE_STRING_H | 31 #if defined STDC_HEADERS || defined HAVE_STRING_H |
33 # include <string.h> | 32 # include <string.h> |
34 #else | 33 #else |
35 # include <strings.h> | 34 # include <strings.h> |
36 #endif | 35 #endif |
36 #include "xalloc.h" | |
37 | 37 |
38 #ifndef strstr | 38 #ifndef strstr |
39 char *strstr (); | 39 char *strstr (); |
40 #endif | 40 #endif |
41 char *xmalloc (); | |
42 char *xrealloc (); | |
43 char *xstrdup (); | |
44 | 41 |
45 #include <errno.h> | 42 #include <errno.h> |
46 #ifndef errno | 43 #ifndef errno |
47 extern int errno; | 44 extern int errno; |
48 #endif | 45 #endif |
142 #if defined MNTOPT_IGNORE && defined HAVE_HASMNTOPT | 139 #if defined MNTOPT_IGNORE && defined HAVE_HASMNTOPT |
143 # define MNT_IGNORE(M) hasmntopt ((M), MNTOPT_IGNORE) | 140 # define MNT_IGNORE(M) hasmntopt ((M), MNTOPT_IGNORE) |
144 #else | 141 #else |
145 # define MNT_IGNORE(M) 0 | 142 # define MNT_IGNORE(M) 0 |
146 #endif | 143 #endif |
144 | |
145 #include "mountlist.h" | |
146 #include "unlocked-io.h" | |
147 | 147 |
148 #ifdef MOUNTED_GETMNTENT1 /* 4.3BSD, SunOS, HP-UX, Dynix, Irix. */ | 148 #ifdef MOUNTED_GETMNTENT1 /* 4.3BSD, SunOS, HP-UX, Dynix, Irix. */ |
149 /* Return the value of the hexadecimal number represented by CP. | 149 /* Return the value of the hexadecimal number represented by CP. |
150 No prefix (like '0x') or suffix (like 'h') is expected to be | 150 No prefix (like '0x') or suffix (like 'h') is expected to be |
151 part of CP. */ | 151 part of CP. */ |