diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-07-14 21:02:01 +0000 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2005-07-14 21:02:01 +0000 |
commit | 4032f92867e5570f130e4175b3b4fb61240f9752 (patch) | |
tree | 4e56172ca9f3f586d85d912a487357d9fe3496ed /src/fs.c | |
parent | 7a6b6a56dabe1e62a0fbc6222c090aa077bcadc7 (diff) | |
download | librcc-4032f92867e5570f130e4175b3b4fb61240f9752.tar.gz librcc-4032f92867e5570f130e4175b3b4fb61240f9752.tar.bz2 librcc-4032f92867e5570f130e4175b3b4fb61240f9752.tar.xz librcc-4032f92867e5570f130e4175b3b4fb61240f9752.zip |
0.1.0
Diffstat (limited to 'src/fs.c')
-rw-r--r-- | src/fs.c | 24 |
1 files changed, 20 insertions, 4 deletions
@@ -1,10 +1,24 @@ #include <stdio.h> #include <string.h> #include <errno.h> -#include <unistd.h> -#include <sys/types.h> -#include <sys/stat.h> -#include <mntent.h> + +#include "../config.h" + +#ifdef HAVE_UNISTD_H +# include <unistd.h> +#endif /* HAVE_UNISTD_H */ + +#ifdef HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif /* HAVE_SYS_TYPES_H */ + +#ifdef HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif /* HAVE_SYS_STAT_H */ + +#ifdef HAVE_MNTENT_H +# include <mntent.h> +#endif /* HAVE_MNTENT_H */ #include "internal.h" #include "rcciconv.h" @@ -75,6 +89,7 @@ int rccFS0(rcc_language_config config, const char *fspath, const char *filename, if (!len) return 1; if (!strncmp(filename, fspath, len)) tmp = filename + strlen(fspath); +#ifdef HAVE_MNTENT_H } else { lastprefix = config->ctx->lastprefix; @@ -102,6 +117,7 @@ int rccFS0(rcc_language_config config, const char *fspath, const char *filename, } endmntent(mtab); } +#endif /* HAVE_MNTENT_H */ } if (!tmp) return 1; |