CVS patchset: 1681
CVS date: 1997/06/03 16:08:23
#define COMMENTCHAR '#'
#endif
-struct mntent *getmntent(FILE *filep) {
- static struct mntent item = { NULL };
+our_mntent *getmntent(FILE *filep) {
+ static our_mntent item = { NULL };
char buf[1024], * start;
char * chptr;
- if (item.mnt_dir) {
- free(item.mnt_dir);
+ if (item.our_mntdir) {
+ free(item.our_mntdir);
}
while (fgets(buf, sizeof(buf) - 1, filep)) {
while (!isspace(*chptr) && (*chptr)) chptr++;
*chptr = '\0';
- item.mnt_dir = strdup(start);
+ item.our_mntdir = strdup(start);
return &item;
#endif
}
#if HAVE_MNTENT_H || !(HAVE_GETMNTENT)
# if HAVE_MNTENT_H
# include <mntent.h>
+# define our_mntent struct mntent
+# define our_mntdir mnt_dir
# else
#include <stdio.h>
- struct mntent {
- char * mnt_dir;
+ struct our_mntent {
+ char * our_mntdir;
};
- struct mntent *getmntent(FILE *filep);
+ struct our_mntent *getmntent(FILE *filep);
+# define our_mntent struct our_mntent
# endif
# define GETMNTENT_ONE 1
# define GETMNTENT_TWO 0
-# define our_mntent struct mntent
-# define our_mntdir mnt_dir
#elif HAVE_SYS_MNTTAB_H
# include <stdio.h>
# include <sys/mnttab.h>