| 1 | /* System dependent declarations.
|
|---|
| 2 |
|
|---|
| 3 | Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1998, 2001, 2002
|
|---|
| 4 | Free Software Foundation, Inc.
|
|---|
| 5 |
|
|---|
| 6 | This file is part of GNU DIFF.
|
|---|
| 7 |
|
|---|
| 8 | GNU DIFF is free software; you can redistribute it and/or modify
|
|---|
| 9 | it under the terms of the GNU General Public License as published by
|
|---|
| 10 | the Free Software Foundation; either version 2, or (at your option)
|
|---|
| 11 | any later version.
|
|---|
| 12 |
|
|---|
| 13 | GNU DIFF is distributed in the hope that it will be useful,
|
|---|
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|---|
| 16 | GNU General Public License for more details.
|
|---|
| 17 |
|
|---|
| 18 | You should have received a copy of the GNU General Public License
|
|---|
| 19 | along with this program; see the file COPYING.
|
|---|
| 20 | If not, write to the Free Software Foundation,
|
|---|
| 21 | 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|---|
| 22 |
|
|---|
| 23 | #include <config.h>
|
|---|
| 24 |
|
|---|
| 25 | /* Don't bother to support K&R C compilers any more; it's not worth
|
|---|
| 26 | the trouble. These macros prevent some library modules from being
|
|---|
| 27 | compiled in K&R C mode. */
|
|---|
| 28 | #define PARAMS(Args) Args
|
|---|
| 29 | #define PROTOTYPES 1
|
|---|
| 30 |
|
|---|
| 31 | /* Define `__attribute__' and `volatile' first
|
|---|
| 32 | so that they're used consistently in all system includes. */
|
|---|
| 33 | #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6) || __STRICT_ANSI__
|
|---|
| 34 | # define __attribute__(x)
|
|---|
| 35 | #endif
|
|---|
| 36 | #if defined const && !defined volatile
|
|---|
| 37 | # define volatile
|
|---|
| 38 | #endif
|
|---|
| 39 |
|
|---|
| 40 | /* Verify a requirement at compile-time (unlike assert, which is runtime). */
|
|---|
| 41 | #define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; }
|
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 | /* Determine whether an integer type is signed, and its bounds.
|
|---|
| 45 | This code assumes two's (or one's!) complement with no holes. */
|
|---|
| 46 |
|
|---|
| 47 | /* The extra casts work around common compiler bugs,
|
|---|
| 48 | e.g. Cray C 5.0.3.0 when t == time_t. */
|
|---|
| 49 | #ifndef TYPE_SIGNED
|
|---|
| 50 | # define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
|
|---|
| 51 | #endif
|
|---|
| 52 | #ifndef TYPE_MINIMUM
|
|---|
| 53 | # define TYPE_MINIMUM(t) ((t) (TYPE_SIGNED (t) \
|
|---|
| 54 | ? ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1) \
|
|---|
| 55 | : (t) 0))
|
|---|
| 56 | #endif
|
|---|
| 57 | #ifndef TYPE_MAXIMUM
|
|---|
| 58 | # define TYPE_MAXIMUM(t) ((t) (~ (t) 0 - TYPE_MINIMUM (t)))
|
|---|
| 59 | #endif
|
|---|
| 60 |
|
|---|
| 61 | #include <sys/types.h>
|
|---|
| 62 | #include <sys/stat.h>
|
|---|
| 63 |
|
|---|
| 64 | #if STAT_MACROS_BROKEN
|
|---|
| 65 | # undef S_ISBLK
|
|---|
|
|---|