diff options
author | Alain Magloire <alainm@rcsm.ee.mcgill.ca> | 2001-02-08 15:56:55 +0000 |
---|---|---|
committer | Alain Magloire <alainm@rcsm.ee.mcgill.ca> | 2001-02-08 15:56:55 +0000 |
commit | 419871126d5b380fb417a7992ddb07f1ac962c6b (patch) | |
tree | 7686c51866a1c5d04481a0c0480ed3cbfba46e45 /m4 | |
parent | 93f73931614269c5d915614f4d4e4fc6850af811 (diff) | |
download | grep-419871126d5b380fb417a7992ddb07f1ac962c6b.tar.gz |
CRLF handling.
Do CRLF munging only if HAVE_DOS_FILE_CONTENTS, instead of
having it depend on O_BINARY (which leads to incorrect results
on BeOS, VMS, and MacOS).
* bootstrap/Makefile.try (DEFS): Add -DHAVE_DOS_FILE_CONTENTS.
* src/system.h (SET_BINARY): Define only if HAVE_DOS_FILE_CONTENTS.
(O_BINARY): Do not define.
* m4/dosfile.m4: Define HAVE_DOS_FILE_CONTENTS if it appears we're
using DOS.
* src/grep.c (undossify_input, fillbuf, dosbuf.c, prline, main):
Depend on HAVE_DOS_FILE_CONTENTS, not O_BINARY, when handling CRLF
matters.
(grepfile, main): Depend on SET_BINARY, not O_BINARY, when
handling binary files on hosts that care about text versus binary.
* lib/getpagesize.h (getpagesize): Define to B_PAGE_SIZE if
__BEOS__ is defined. Based on a fix by Bruno Haible
<haible@clisp.cons.org>.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/dosfile.m4 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/m4/dosfile.m4 b/m4/dosfile.m4 index 1e85900c..609d042d 100644 --- a/m4/dosfile.m4 +++ b/m4/dosfile.m4 @@ -1,10 +1,13 @@ # Check to see if we use dir\file name conventtion # If so, set macro HAVE_DOS_FILE_NAMES +# Also set the macro HAVE_DOS_FILE_CONTENTS for now, +# since don't know of a good way to independently check this. dnl AC_DOSFILE() AC_DEFUN(AC_DOSFILE, [AC_CACHE_CHECK([for dos file convention], ac_cv_dosfile, [if test -d ".\."; then ac_cv_dosfile=yes + AC_DEFINE(HAVE_DOS_FILE_CONTENTS, , [Define if text file lines end in CRLF.]) AC_DEFINE(HAVE_DOS_FILE_NAMES) else ac_cv_dosfile=no |