Merge branch 'vendor/LIBARCHIVE'
[dragonfly.git] / contrib / grep / src / system.h
1 /* Portability cruft.  Include after config.h and sys/types.h.
2    Copyright 1996, 1998-2000, 2007, 2009-2010 Free Software Foundation, Inc.
3
4    This program is free software; you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation; either version 3, or (at your option)
7    any later version.
8
9    This program is distributed in the hope that it will be useful,
10    but WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12    GNU General Public License for more details.
13
14    You should have received a copy of the GNU General Public License
15    along with this program; if not, write to the Free Software
16    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
17    02110-1301, USA.  */
18
19 #include <fcntl.h>
20 #include <unistd.h>
21 #include <errno.h>
22
23 #include "binary-io.h"
24 #include "configmake.h"
25 #include "dirname.h"
26 #include "minmax.h"
27
28 #if O_BINARY
29 # define HAVE_DOS_FILE_CONTENTS 1
30 #endif
31
32 #ifdef EISDIR
33 # define is_EISDIR(e, f) ((e) == EISDIR)
34 #else
35 # define is_EISDIR(e, f) 0
36 #endif
37
38 #include <stdlib.h>
39 #include <stddef.h>
40 #include <limits.h>
41 #include <string.h>
42 #include <ctype.h>
43
44 enum { EXIT_TROUBLE = 2 };
45
46 #include <gettext.h>
47 #define N_(String) gettext_noop(String)
48 #define _(String) gettext(String)
49
50 #include <locale.h>
51
52 #ifndef initialize_main
53 #define initialize_main(argcp, argvp)
54 #endif
55
56 #include "unlocked-io.h"