summaryrefslogtreecommitdiff
path: root/src/system.h
Commit message (Collapse)AuthorAgeFilesLines
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* build: ccache works better without embedded version stringsJim Meyering2011-06-131-0/+1
| | | | | | | | | | | | | * src/Makefile.am: Generate version.c and version.h and put the new symbol in a tiny library to be used by each program. (LDADD): Add the new library. * src/cmp.c (main): Use Version, not PACKAGE_VERSION, so the .o file does not change with each commit-derived version increment. * src/diff.c (main): Likewise. * src/diff3.c (main): Likewise. * src/sdiff.c (main): Likewise. * src/system.h: Include "version.h". * .gitignore: Add version.[ch]
* maint: remove all uses of vfork: use fork insteadJim Meyering2011-01-241-9/+0
| | | | | | | | | | | | | Our use of vfork now provokes warnings from gcc-4.6.0. Also, vfork is no longer even specified by POSIX.1-2008. * src/diff3.c (read_diff): Change each use of vfork to "fork". Remove #ifdef'd code. * src/util.c (begin_output, finish_output): Likewise. * src/sdiff.c (cleanup, main, edit): Likewise. (handler_index_of_SIGPIPE): Remove now-unused definition. * src/system.h: Don't include <vfork.h>. (vfork): Remove definition. * ms/config.site: Remove reference to vfork cache variable.
* maint: update copyright year ranges to include 2011Jim Meyering2011-01-031-1/+1
| | | | Run "make update-copyright", so "make syntax-check" works in 2011.
* build: don't define macros that gnulib providesJim Meyering2010-05-091-13/+0
| | | | | | | | | * bootstrap.conf (gnulib_modules): Add signal, stdint. * lib/cmpbuf.c (SA_RESTART, SA_INTERRUPT): Remove definitions. (SIZE_MAX, PTRDIFF_MAX): Likewise. Include <stdint.h>. * src/system.h (WEXITSTATUS, WIFEXITED): Remove definitions. (SA_RESTART, SA_INTERRUPT): Likewise.
* maint: remove now-useless #if HAVE_HEADER_H guardsJim Meyering2010-04-301-3/+1
| | | | | | * src/system.h: Include <sys/wait.h> unconditionally, now that gnulib guarantees its presence. * lib/cmpbuf.c: Likewise for <unistd.h> and <inttypes.h>.
* maint: update all FSF copyright year lists to include 2010Jim Meyering2010-01-011-1/+1
| | | | | | Use this command: git ls-files |grep -vE '^(\..*|COPYING|gnulib)$' |xargs \ env UPDATE_COPYRIGHT_USE_INTERVALS=1 build-aux/update-copyright
* build: suppress warnings about bindtextdomain and textdomainJim Meyering2009-11-201-0/+6
| | | | * src/system.h (bindtextdomain, textdomain) [!ENABLE_NLS]: Define away.
* maint: define/use PROGRAM_NAME and AUTHORS; use propername moduleJim Meyering2009-11-161-0/+1
| | | | | | | | | | * bootstrap.conf (gnulib_modules): Add propername. * src/cmp.c (PROGRAM_NAME, AUTHORS): Define. (main): Use them in use of version_etc. * src/diff.c (PROGRAM_NAME, AUTHORS, main): Likewise. * src/diff3.c (PROGRAM_NAME, AUTHORS, main): Likewise. * src/sdiff.c (PROGRAM_NAME, AUTHORS, main): Likewise. * src/system.h: Include "propername.h".
* maint: no longer define *_FILENO constantsJim Meyering2009-11-161-9/+0
| | | | | * src/system.h (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Remove definitions. Now guaranteed by gnulib.
* admin: update all copyright notices to include the year 2009Jim Meyering2009-11-111-2/+2
|
* maint/sc: use STREQ, not strcmp(a,b) == 0Jim Meyering2009-11-111-0/+2
| | | | | | | | | | | | | Run this command: git grep -l 'strcmp *([^=]*== *0'|xargs \ perl -pi -e 's/\bstrcmp( *\(.*?\)) *== *0/STREQ$1/g' and then add the new definition. * src/system.h (STREQ): Define. * src/cmp.c (main): Use STREQ, not strcmp. * src/diff.c (main, compare_files): Likewise. * src/diff3.c (main): Likewise. * src/sdiff.c (expand_name): Likewise. * cfg.mk (local-checks-to-skip): Add sc_prohibit_strcmp.
* maint/sc: enforce "file system" spellingJim Meyering2009-11-111-4/+4
| | | | | | * src/system.h: Spell it as two words, not one. * ms/config.sed: Likewise. * cfg.mk (local-checks-to-skip): Remove sc_file_system.
* * COPYING: New file.Paul Eggert2007-07-191-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * AUTHORS: Update from GPLv2 to GPLv3. * Makefile.am: Likewise. * NEWS: Likewise. * README: Likewise. * README-hacking: Likewise. * bootstrap: Likewise. * bootstrap.conf: Likewise. * configure.ac: Likewise. * exgettext: Likewise. * doc/Makefile.am: Likewise. * lib/Makefile.am: Likewise. * lib/cmpbuf.c: Likewise. * lib/cmpbuf.h: Likewise. * lib/prepargs.c: Likewise. * m4/vararrays.m4: Likewise. * man/Makefile.am: Likewise. * ms/Makefile.am: Likewise. * ms/README: Likewise. * ms/config.bat: Likewise. * ms/config.sed: Likewise. * ms/config.site: Likewise. * po/POTFILES.in: Likewise. * src/Makefile.am: Likewise. * src/analyze.c: Likewise. * src/cmp.c: Likewise. * src/context.c: Likewise. * src/diff.c: Likewise. * src/diff.h: Likewise. * src/diff3.c: Likewise. * src/dir.c: Likewise. * src/ed.c: Likewise. * src/io.c: Likewise. * src/normal.c: Likewise. * src/sdiff.c: Likewise. * src/system.h: Likewise. * src/util.c: Likewise.
* Modernize bootstrap procedure to match current gnulib.Paul Eggert2006-09-051-109/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bootstrap: Sync with coreutils bootstrap, except check that the directory build-aux exists before trying to copy to it. * bootstrap.conf: New file. (gnulib_modules): Add config-h, dup2, extensions, fcntl, fdl, stat-macros, unistd. * configure.ac: Invoke gl_EARLY and gl_INIT rather than GNULIB_AUTOCONF_SNIPPET. (AC_CONFIG_HEADER): Rename config.h to lib/config.h. (AC_CHECK_HEADERS_ONCE): Don't check for fcntl.h, locale.h, sys/file.h, unistd.h. We now use the fcntl and unistd modules, and locale.h can be assumed for any C89 compiler. (DIFFUTILS_PREREQUISITES): Remove. No longer needed now that we use the stdint module. (AC_CHECK_FUNCS_ONCE): Remove dup2, which is no longer needed now that we use the dup2 module. (AM_GNU_GETTEXT): Use need-formatstring-macros, and ... (AM_GNU_GETTEXT_VERSION): specify version 0.15 instead of 0.14.5, to be consistent with coreutils. * lib/Makefile.am (noinst_LIBRARIES): (lib_SOURCES, libdiffutils_a_LIBADD): (libdiffutils_a_DEPENDENCIES, BUILT_SOURCES, EXTRA_DIST): (MOSTLYCLEANFILES): Remove; now computed automatically. (noinst_HEADERS, libdiffutils_a_SOURCES): Just append our special files now. * lib/cmpbuf.c: Include config.h unconditionally, since we no longer define HAVE_CONFIG_H. * lib/prepargs.c: Likewise. * src/Makefile.am (LDADD): Use $(LIBINTL), not @LIBINTL@. (diff_LDADD): Use $(LIB_CLOCK_GETTIME), not @LIB_CLOCK_GETTIME@. * src/dir.c (dir_read): Use _D_EXACT_NAMLEN, not NAMELEN. * src/system.h (volatile): Remove, since we assume C89 or better. Include stat-macros.h. (S_IRWXU, S_IRWXG, S_IRWXO, S_IRUSR, S_IWUSR): Remove, since we now use stat-macros.h. (SEEK_SET, SEEK_CUR): Remove, since we assume C89 or better. Include unistd.h unconditionally, since we use unistd. Likewise for fcntl.h. (dup2): Remove, since we now use dup2. (O_RDONLY, O_RWDR, O_BINARY): Remove, since we now use fcntl. Include dirent.h unconditionally. (NAMLEN): Remove, replacing with.... (_D_EXACT_NAMLEN): New macro. Include inttypes.h unconditionally. (PTRDIFF_MAX, SIZE_MAX, UINTMAX_MAX, strtoumax): Remove, since we now use inttypes. Include locale.h unconditionally. (setlocale): Remove, since we now assume locale.h.
* * src/system.h (PARAMS, PROTOTYPES): Remove; no longer needed.Paul Eggert2006-03-131-5/+6
| | | | | | | | | (IF_LINT): New macro, to pacify GCC. * src/analyze.c (diag, compareseq): Use IF_LINT. * src/cmp.c (cmp): Likewise. * src/diff3.c (process_diff): Likewise. Also, prefer NULL to 0. * src/ifdef.c (do_printf_spec, scan_char_literal): Likewise. * src/sdiff.c (edit): Likewise.
* Update FSF address.Paul Eggert2006-01-051-1/+1
|
* * src/cmp.c: Don't include <setmode.h>.Paul Eggert2006-01-051-24/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (specify_ignore_initial): Reword to avoid gcc -W warnings. (main): Use freopen instead of setmode, since freopen is in POSIX. * src/context.c: Revert most 2004-09-01 changes. Then: (TIMESPEC_NS): Remove. All uses replaced by get_stat_mtime_ns. Include stat-time.h, strftime.h. (nstrtime): Remove decl. * src/diff.c: Revert most 2004-09-01 changes. Then: Don't include <posixver.h>, <quotesys.h>, <setmode.h>. Include <sh-quote.h>, <stat-time.h>, <timespec.h>. All uses of quotesys replaced by sh-quote. (main, compare_files): Use freopen instead of setmode, since freopen is in POSIX. (main): Don't complain about "diff -NUM'. (main, set_mtime_to_now): Adjust to stat-time.h macros when accessing nanoseconds. * src/diff3.c: Include sh-quote.h rather than quotesys. All uses changed. * src/dir.c (dir_read): excluded_filename renamed to excluded_file_name. * src/io.c: Don't include <setmode.h>. (sip, read_files): Remove binary file stuff, leaving a FIXME behind. A DOS expert needs to look at this. * src/diff.c: Include sh-quote.h rather than quotesys.h. All uses changed. * src/system.h: Include verify.h. (verify): Remove. All uses changed to verify.h version. Include <intprops.h>. (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove. Now uses intprops.h versions. (O_BINARY): New defns, taken from coreutils. * src/util.c: Include sh-quote.h rather than quotesys.h. All uses changed.
* (S_IRWXU, S_IRWXG, S_IRWXO): Define if not defined.Paul Eggert2004-04-121-70/+21
| | | | | | | | | | | | | | | (S_IXUSR, S_IXGRP, S_IXOTH): Remove. Include <time.h> unconditionally, since we can assume C89 now. Likewise for <stdlib.h>, <string.h>. (getenv, EXIT_SUCCESS, EXIT_FAILURE, SSIZE_MAX, strchr, strrchr, memcmp, memcpy): Remove decl; no longer needed. (strcasecoll, strcasecmp): Define if not built in. (CTYPE_DOMAIN, ISPRINT, ISSPACE, TOLOWER, _tolower, errno): Remove; we now assume C89 or better. All uses changed. Include <stdbool.h> unconditionally now, since gnulib supports it if the C compiler doesn't. All boolean uses of 0 and 1 now changed to false and true. (lin_is_printable_as_long_int): Renamed from lin_is_printable_as_long.
* *** empty log message ***Paul Eggert2002-06-111-26/+0
|
* (SSIZE_MAX): Define if limits.h doesn't.Paul Eggert2002-04-051-0/+3
|
* Don't use alloca or include <alloca.h>.Paul Eggert2002-02-281-26/+24
| | | | | | | | unsigned -> unsigned int (EXIT_SUCCESS, EXIT_FAILURE, EXIT_TROUBLE): Define if not defined. Include signal.h. (SA_RESTART): Define if not defined. (SIGCHLD): Likewise.
* (UINTMAX_MAX): New macro.Paul Eggert2002-01-241-4/+7
| | | | | Include gettext.h, not libgettext.h. (N_): Do not wrap arg in parentheses. Fix from Bruno Haible.
* (S_IXUSR, S_IXGRP, S_IXOTH): New macros.Paul Eggert2001-12-111-33/+13
| | | | | Include <libgettext.h> rather than rolling it ourselves. (file_name_lastdirchar, HAVE_SETMODE, set_binary_mode): Remove.
* (STAT_BLOCKSIZE): Use HAVE_STRUCT_STAT_ST_BLKSIZE, not HAVE_ST_BLKSIZE.Paul Eggert2001-12-031-14/+29
| | | | | | (vfork): New macro. (HAVE_FORK): Remove. (set_binary_mode): New macro.
* Assume C89 or better.Paul Eggert2001-11-251-113/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (_GNU_SOURCE): Remove; config.h now defines it. (alloca): Declare like coreutils does it. (verify, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, O_RDWR, S_IRUSR, S_IWUSR): New macros. (STAT_BLOCKSIZE): Parenthesize definiens. <inttypes.h>: Include if HAVE_INTTYPES_H. (CHAR_MAX, INT_MAX): Remove. (PTRDIFF_MAX, SIZE_MAX): New macros. (strtoumax): New decl. Include stddef.h. (bzero): Remove. (bindtextdomain, textdomain, N_): New macros. (ISPRINT, ISSPACE): Remove ifndef wrappers. (ISUPPER, ISDIGIT): Remove. (TOLOWER): New macro. (MIN): Renamed from min; all callers changed. (MAX): Likewise, from max. (lin): New type. (LIN_MAX): New macro. (file_name_cmp): Renamed from filename_cmp. All callers changed. (file_name_lastdirchar): Renamed from file_name_lastdirchar. All callers changed. (could_be_mvfs_stat_bug, could_be_nfs_stat_bug, dev_may_have_duplicate_ino): Remove. (HAVE_SETMODE, NULL_DEVICE): New macros. (same_file): Do not check attributes. (same_file_attributes): New macro.
* (__attribute__): New macro.Paul Eggert1998-09-141-1/+1
| | | | | | | | | | (getenv): Don't declare if HAVE_STDLIB_H. (CHAR_MAX): New macro. (<locale.h>): New include. (<locale.h>): Include before <libintl.h>. (could_be_mvfs_stat_bug, could_be_nfs_stat_bug, dev_may_have_duplicate_ino, same_special_file): New macros. (same_file): Use them.
* (__attribute__): New macro.Paul Eggert1998-09-131-63/+123
| | | | | | | | | | (getenv): Don't declare if HAVE_STDLIB_H. (CHAR_MAX): New macro. (<locale.h>): New include. (<locale.h>): Include before <libintl.h>. (could_be_mvfs_stat_bug, could_be_nfs_stat_bug, dev_may_have_duplicate_ino, same_special_file): New macros. (same_file): Use them.
* (gettext): Declare; use a stub if ! HAVE_LIBINTL_H.Paul Eggert1994-11-141-0/+12
| | | | (setlocale): Declare; use a stub if ! HAVE_LOCALE_H.
* (system_quote_arg): New function; replaces SYSTEM_QUOTE_ARG macro.Paul Eggert1994-10-311-18/+2
|
* (_tolower): Define if not already defined.Paul Eggert1994-10-151-8/+9
| | | | (malloc, realloc): Remove unused declarations.
* (<sys/wait.h>, WEXITSTATUS): Use simpler scheme now that HAVE_SYS_WAIT_HPaul Eggert1994-10-011-10/+1
| | | | is turned off on hosts that are incompatible with Posix applications.
* <string.h>: Include if HAVE_STRING_H, too.Paul Eggert1994-09-221-5/+41
| | | | | | | (CTYPE_DOMAIN, ISDIGIT, ISPRINT, ISSPACE, ISUPPER): New macros that work around common <ctype.h> problems. (O_BINARY): Remove. (SYSTEM_QUOTE_ARG): New macros.
* (memcmp): Define in terms of bcmp.Paul Eggert1994-09-131-2/+3
| | | | Use HAVE_MEMCHR to test for all mem* routines.
* Use more modern autoconf approach to standard C headers.Paul Eggert1994-09-121-24/+17
|
* Use Autoconf 2 style HAVE_DIRENT_H etc. macros for directories.Paul Eggert1994-09-081-15/+14
|
* Include <sys/file.h> only if HAVE_SYS_FILE_H.Paul Eggert1994-09-021-11/+43
| | | | | | | | (S_IXGRP, S_IXOTH, S_IXUSR): Remove unused macros. (STAT_BLOCKSIZE): Don't define if already defined. (min, max): Undef if already defined. (filename_cmp, filename_lastdirchar, HAVE_FORK, HAVE_SETMODE, initialize_main O_BINARY, same_file): New macros, for porting to non-Posix systems like DOS.
* diffutils 2.6Paul Eggert1993-12-131-3/+3
|
* (malloc, realloc): Declare only if !HAVE_STDLIB_H.Paul Eggert1993-09-271-8/+4
| | | | | (memchr): Declare only if !HAVE_MEMCHR. These changes are needed to keep some nonstandard hosts happy.
* (volatile, const): Define these before including any system headers,Paul Eggert1993-09-181-9/+36
| | | | | | | | so that they're used consistently in all system includes. (S_IS{BLK,CHR,DIR,FIFO,REG,SOCK}): Fix defns if STAT_MACROS_BROKEN. (getenv, malloc, realloc): Declare even if HAVE_STDLIB_H, since some <stdlib.h>s don't declare them. (memchr): Likewise for <string.h>.
* #include <config.h>, not "config.h", to allowPaul Eggert1993-09-151-1/+1
| | | | | configuring in a separate directory when the source directory has already been configured.
* (PARAMS, VOID): Define earlier so that malloc decl can use VOID.Paul Eggert1993-09-131-49/+44
| | | | | | | | (STAT_BLOCKSIZE): Simplify ersatz defn; just use 8K. (dirent): Renamed from direct; dirent makes the code more standard. <limits.h>, <stdlib.h>, <string.h>: Include only if corresponding HAVE_*_H. (memcmp, memcpy, strchr, strrchr): Prefer these standard names to traditional names.
* (S_IXOTH, S_IXGRP, S_IXUSR,Paul Eggert1993-08-271-0/+38
| | | | | | | | | SEEK_SET, SEEK_CUR, STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): New macros, if system doesn't define them. (volatile): Don't define if already defined. (PARAMS): New macro. (VOID): Move here from diff.h.
* entered into RCSPaul Eggert1993-05-211-1/+1
|
* *** empty log message ***Roland McGrath1993-03-221-0/+6
|
* *** empty log message ***Roland McGrath1993-02-251-21/+38
|
* *** empty log message ***Paul Eggert1992-09-061-0/+6
|
* Initial revisionDavid MacKenzie1992-07-071-0/+130