diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2009-11-26 18:59:32 +0100 |
---|---|---|
committer | Paolo Bonzini <bonzini@gnu.org> | 2009-11-26 18:59:32 +0100 |
commit | c6a5ea308f00ad89b2f8b90d174f2591bcac3b02 (patch) | |
tree | e03a727463910129e1ad83c5454f18f01ca004e9 /src/system.h | |
parent | 9b5e7d42e0abd88bb6c01a145f5171bc0fb7d84c (diff) | |
download | grep-c6a5ea308f00ad89b2f8b90d174f2591bcac3b02.tar.gz |
replace AC_DOSFILE with gnulib modules
* bootstrap.conf: Add binary-io, dirname.
* configure.ac: Remove check for setmode, AC_DOSFILE.
* m4/dosfile.m4: Remove.
* src/grep.c: Adjust for dirname.h.
* src/system.h: Adjust for new gnulib modules.
Diffstat (limited to 'src/system.h')
-rw-r--r-- | src/system.h | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/src/system.h b/src/system.h index 5bb06262..a03ddcea 100644 --- a/src/system.h +++ b/src/system.h @@ -35,30 +35,11 @@ #include <unistd.h> #include <errno.h> -/* Some operating systems treat text and binary files differently. */ -#ifdef __BEOS__ -# undef O_BINARY /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */ -#endif -#ifdef HAVE_DOS_FILE_CONTENTS -# include <io.h> -# ifdef HAVE_SETMODE -# define SET_BINARY(fd) setmode (fd, O_BINARY) -# else -# define SET_BINARY(fd) _setmode (fd, O_BINARY) -# endif -#endif - -#ifdef HAVE_DOS_FILE_NAMES -# define IS_SLASH(c) ((c) == '/' || (c) == '\\') -# define FILESYSTEM_PREFIX_LEN(f) ((f)[0] && (f)[1] == ':' ? 2 : 0) -#endif - -#ifndef IS_SLASH -# define IS_SLASH(c) ((c) == '/') -#endif +#include "binary-io.h" +#include "dirname.h" -#ifndef FILESYSTEM_PREFIX_LEN -# define FILESYSTEM_PREFIX_LEN(f) 0 +#if O_BINARY +# define HAVE_DOS_FILE_CONTENTS 1 #endif int isdir PARAMS ((char const *)); |