Index: diffutils/lib/cmpbuf.c diff -c diffutils/lib/cmpbuf.c:1.1.1.2 diffutils/lib/cmpbuf.c:1.3 *** diffutils/lib/cmpbuf.c:1.1.1.2 Sun Nov 12 14:16:52 2006 --- diffutils/lib/cmpbuf.c Sun Nov 12 14:19:58 2006 *************** *** 41,47 **** --- 41,49 ---- # include #endif + #if HAVE_SYS_TYPES_H #include + #endif #include "cmpbuf.h" /* Determine whether an integer type is signed, and its bounds. Index: diffutils/lib/error.h diff -c diffutils/lib/error.h:1.1.1.1 diffutils/lib/error.h:1.2 *** diffutils/lib/error.h:1.1.1.1 Sat Nov 04 01:11:46 2006 --- diffutils/lib/error.h Sat Nov 04 22:52:58 2006 *************** *** 25,36 **** #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ ! # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) # define __attribute__(Spec) /* empty */ # endif /* The __-protected variants of `format' and `printf' attributes are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ ! # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) # define __format__ format # define __printf__ printf # endif --- 25,36 ---- #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ ! # if 1 || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) # define __attribute__(Spec) /* empty */ # endif /* The __-protected variants of `format' and `printf' attributes are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */ ! # if 1 || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) # define __format__ format # define __printf__ printf # endif Index: diffutils/lib/malloc.c diff -c diffutils/lib/malloc.c:1.1.1.1 diffutils/lib/malloc.c:1.2 *** diffutils/lib/malloc.c:1.1.1.1 Sat Nov 04 01:11:46 2006 --- diffutils/lib/malloc.c Wed Nov 08 21:51:06 2006 *************** *** 22,28 **** --- 22,30 ---- #endif #undef malloc + #if HAVE_SYS_TYPES_H #include + #endif char *malloc (); Index: diffutils/lib/memchr.c diff -c diffutils/lib/memchr.c:1.1.1.1 diffutils/lib/memchr.c:1.2 *** diffutils/lib/memchr.c:1.1.1.1 Sat Nov 04 01:11:46 2006 --- diffutils/lib/memchr.c Wed Nov 08 21:51:06 2006 *************** *** 55,61 **** --- 55,63 ---- # define LONG_MAX LONG_MAX_32_BITS #endif + #if HAVE_SYS_TYPES_H #include + #endif #if HAVE_BP_SYM_H || defined _LIBC # include #else Index: diffutils/lib/prepargs.c diff -c diffutils/lib/prepargs.c:1.1.1.1 diffutils/lib/prepargs.c:1.2 *** diffutils/lib/prepargs.c:1.1.1.1 Sat Nov 04 01:11:46 2006 --- diffutils/lib/prepargs.c Wed Nov 08 21:51:06 2006 *************** *** 24,30 **** --- 24,32 ---- #endif #include "prepargs.h" #include + #if HAVE_SYS_TYPES_H #include + #endif #include #include Index: diffutils/lib/quotesys.c diff -c diffutils/lib/quotesys.c:1.1.1.1 diffutils/lib/quotesys.c:1.2 *** diffutils/lib/quotesys.c:1.1.1.1 Sat Nov 04 01:11:46 2006 --- diffutils/lib/quotesys.c Sat Nov 04 23:47:30 2006 *************** *** 22,28 **** --- 22,30 ---- # include #endif + #if HAVE_SYS_TYPES_H #include + #endif #include /* Place into QUOTED a quoted version of ARG suitable for `system'. Index: diffutils/lib/realloc.c diff -c diffutils/lib/realloc.c:1.1.1.1 diffutils/lib/realloc.c:1.2 *** diffutils/lib/realloc.c:1.1.1.1 Sat Nov 04 01:11:46 2006 --- diffutils/lib/realloc.c Wed Nov 08 21:51:06 2006 *************** *** 22,28 **** --- 22,30 ---- #endif #undef realloc + #if HAVE_SYS_TYPES_H #include + #endif char *malloc (); char *realloc (); Index: diffutils/lib/strcasecmp.c diff -c diffutils/lib/strcasecmp.c:1.1.1.1 diffutils/lib/strcasecmp.c:1.2 *** diffutils/lib/strcasecmp.c:1.1.1.1 Sat Nov 04 01:11:46 2006 --- diffutils/lib/strcasecmp.c Wed Nov 08 21:51:06 2006 *************** *** 29,35 **** --- 29,37 ---- # define LENGTH_LIMIT_EXPR(Expr) 0 #endif + #if HAVE_SYS_TYPES_H #include + #endif #include #define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) Index: diffutils/lib/strftime.c diff -c diffutils/lib/strftime.c:1.1.1.1 diffutils/lib/strftime.c:1.2 *** diffutils/lib/strftime.c:1.1.1.1 Sat Nov 04 01:11:46 2006 --- diffutils/lib/strftime.c Wed Nov 08 21:51:06 2006 *************** *** 41,47 **** --- 41,49 ---- #endif #include + #if HAVE_SYS_TYPES_H #include /* Some systems define `time_t' here. */ + #endif #ifdef TIME_WITH_SYS_TIME # include Index: diffutils/lib/tempname.c diff -c diffutils/lib/tempname.c:1.1.1.1 diffutils/lib/tempname.c:1.2 *** diffutils/lib/tempname.c:1.1.1.1 Sat Nov 04 01:11:46 2006 --- diffutils/lib/tempname.c Wed Nov 08 21:51:06 2006 *************** *** 19,25 **** --- 19,27 ---- # include #endif + #if HAVE_SYS_TYPES_H #include + #endif #include #include Index: diffutils/lib/xmalloc.c diff -c diffutils/lib/xmalloc.c:1.1.1.1 diffutils/lib/xmalloc.c:1.2 *** diffutils/lib/xmalloc.c:1.1.1.1 Sat Nov 04 01:11:46 2006 --- diffutils/lib/xmalloc.c Sat Nov 04 22:53:18 2006 *************** *** 19,25 **** --- 19,27 ---- # include #endif + #if HAVE_SYS_TYPES_H #include + #endif #if STDC_HEADERS # include Index: diffutils/src/config.h diff -c /dev/null diffutils/src/config.h:1.13 *** /dev/null Tue Nov 14 07:26:38 2006 --- diffutils/src/config.h Mon Nov 13 17:03:48 2006 *************** *** 0 **** --- 1,628 ---- + #ifndef CONFIG_H_INCLUDED + #define CONFIG_H_INCLUDED 1 + /* config.h. Generated by configure. */ + /* config.hin. Generated from configure.ac by autoheader. */ + + /* Define to 1 if the `closedir' function returns void instead of `int'. */ + /* #undef CLOSEDIR_VOID */ + + /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP + systems. This function is required for `alloca.c' support on those systems. + */ + /* #undef CRAY_STACKSEG_END */ + + /* Define to 1 if using `alloca.c'. */ + /* #undef C_ALLOCA */ + + /* Name of "diff" program, unless overridden. */ + #define DEFAULT_DIFF_PROGRAM "diff" + + /* Name of editor program, unless overridden. */ + #define DEFAULT_EDITOR_PROGRAM "ed" + + /* Define to 1 if translation of program messages to the user's native + language is requested. */ + /* #undef ENABLE_NLS */ + + /* Define on systems for which file names may have a so-called `drive letter' + prefix, define this to compute the length of that prefix, including the + colon. */ + #define FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX 1 + + /* Define if the backslash character may also serve as a file name component + separator. */ + #define FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR 1 + + #if FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX + # define FILESYSTEM_PREFIX_LEN(Filename) \ + ((Filename)[0] && (Filename)[1] == ':' ? 2 : 0) + #else + # define FILESYSTEM_PREFIX_LEN(Filename) 0 + #endif + + /* Define to 1 if you have `alloca', as a function or macro. */ + #define HAVE_ALLOCA 0 + + /* Define to 1 if you have and it should be used (not on Ultrix). + */ + /* #undef HAVE_ALLOCA_H */ + + /* Define to 1 if you have the `bcopy' function. */ + #define HAVE_BCOPY 0 + + /* Define to 1 if you have the `btowc' function. */ + /* #undef HAVE_BTOWC */ + + /* Define to 1 if you have the `bzero' function. */ + #define HAVE_BZERO 0 + + /* Define to 1 if you have the `clock_gettime' function. */ + /* #undef HAVE_CLOCK_GETTIME */ + + /* Define if backslash-a works in C strings. */ + #define HAVE_C_BACKSLASH_A 0 + + /* Define to 1 if C supports variable-length arrays. */ + #define HAVE_C_VARARRAYS 0 + + /* Define if the GNU dcgettext() function is already present or preinstalled. + */ + /* #undef HAVE_DCGETTEXT */ + + /* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if + you don't. */ + #define HAVE_DECL_CLEARERR_UNLOCKED 0 + + /* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you + don't. */ + #define HAVE_DECL_FEOF_UNLOCKED 0 + + /* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if + you don't. */ + #define HAVE_DECL_FERROR_UNLOCKED 0 + + /* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if + you don't. */ + #define HAVE_DECL_FFLUSH_UNLOCKED 0 + + /* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if + you don't. */ + #define HAVE_DECL_FGETS_UNLOCKED 0 + + /* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if + you don't. */ + #define HAVE_DECL_FPUTC_UNLOCKED 0 + + /* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if + you don't. */ + #define HAVE_DECL_FPUTS_UNLOCKED 0 + + /* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if + you don't. */ + #define HAVE_DECL_FREAD_UNLOCKED 0 + + /* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if + you don't. */ + #define HAVE_DECL_FWRITE_UNLOCKED 0 + + /* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if + you don't. */ + #define HAVE_DECL_GETCHAR_UNLOCKED 0 + + /* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you + don't. */ + #define HAVE_DECL_GETC_UNLOCKED 0 + + /* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. + */ + #define HAVE_DECL_GETENV 1 + + /* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if + you don't. */ + #define HAVE_DECL_PUTCHAR_UNLOCKED 0 + + /* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you + don't. */ + #define HAVE_DECL_PUTC_UNLOCKED 0 + + /* Define to 1 if you have the declaration of `strerror', and to 0 if you + don't. */ + #define HAVE_DECL_STRERROR 1 + + /* Define to 1 if you have the declaration of `strerror_r', and to 0 if you + don't. */ + #define HAVE_DECL_STRERROR_R 0 + + /* Define to 1 if you have the declaration of `strtoimax', and to 0 if you + don't. */ + #define HAVE_DECL_STRTOIMAX 0 + + /* Define to 1 if you have the declaration of `strtol', and to 0 if you don't. + */ + #define HAVE_DECL_STRTOL 1 + + /* Define to 1 if you have the declaration of `strtoul', and to 0 if you + don't. */ + #define HAVE_DECL_STRTOUL 1 + + /* Define to 1 if you have the declaration of `strtoull', and to 0 if you + don't. */ + #define HAVE_DECL_STRTOULL 0 + + /* Define to 1 if you have the declaration of `strtoll', and to 0 if you + don't. */ + #define HAVE_DECL_STRTOLL 0 + + /* Define to 1 if you have the declaration of `strtoumax', and to 0 if you + don't. */ + #define HAVE_DECL_STRTOUMAX 0 + + /* Define to 1 if you have the `diraccess' function. */ + /* #undef HAVE_DIRACCESS */ + + /* Define to 1 if you have the header file, and it defines `DIR'. + */ + #define HAVE_DIRENT_H 0 + + /* Define if the malloc check has been performed. */ + #define HAVE_DONE_WORKING_MALLOC_CHECK 1 + + /* Define if the realloc check has been performed. */ + #define HAVE_DONE_WORKING_REALLOC_CHECK 1 + + /* Define to 1 if you have the `doprnt' function. */ + /* #undef HAVE_DOPRNT */ + + /* Define to 1 if you have the `dup2' function. */ + #define HAVE_DUP2 0 + + /* Define to 1 if you have the header file. */ + #define HAVE_FCNTL_H 0 + + /* Define to 1 if your system has a working `fnmatch' function. */ + /* #undef HAVE_FNMATCH */ + + /* Define to 1 if you have the `fork' function. */ + #define HAVE_FORK 0 + + /* Define if the GNU gettext() function is already present or preinstalled. */ + /* #undef HAVE_GETTEXT */ + + /* Define to 1 if you have the `gettimeofday' function. */ + #define HAVE_GETTIMEOFDAY 0 + + /* Define if you have the iconv() function. */ + /* #undef HAVE_ICONV */ + + /* Define to 1 if you have the header file. */ + /* #undef HAVE_INTTYPES_H */ + + /* Define to 1 if you have the `isascii' function. */ + #define HAVE_ISASCII 0 + + /* Define to 1 if you have the `iswprint' function. */ + /* #undef HAVE_ISWPRINT */ + + /* Define to 1 if you have the header file. */ + /* #undef HAVE_LIBINTL_H */ + + /* Define to 1 if you have the header file. */ + #define HAVE_LIMITS_H 1 + + /* Define to 1 if you have the header file. */ + #define HAVE_LOCALE_H 1 + + /* Define to 1 if you have the `localtime_r' function. */ + /* #undef HAVE_LOCALTIME_R */ + + /* Define if you have the long long type. */ + #define HAVE_LONG_LONG 0 + + /* Define to 1 if you have the `mblen' function. */ + #define HAVE_MBLEN 1 + + /* Define to 1 if you have the `mbrlen' function. */ + /* #undef HAVE_MBRLEN */ + + /* Define to 1 if mbrtowc and mbstate_t are properly declared. */ + /* #undef HAVE_MBRTOWC */ + + /* Define to 1 if you have the `memchr' function. */ + #define HAVE_MEMCHR 1 + + /* Define to 1 if you have the `memcpy' function. */ + #define HAVE_MEMCPY 1 + + /* Define to 1 if you have the header file. */ + #define HAVE_MEMORY_H 0 + + /* Define to 1 if you have the `mempcpy' function. */ + /* #undef HAVE_MEMPCPY */ + + /* Define to 1 if you have the `memset' function. */ + #define HAVE_MEMSET 1 + + /* Define to 1 if you have the `mkstemp' function. */ + #define HAVE_MKSTEMP 0 + + /* Define to 1 if you have the header file, and it defines `DIR'. */ + /* #undef HAVE_NDIR_H */ + + /* Define to 1 if you have the `setlocale' function. */ + #define HAVE_SETLOCALE 1 + + /* Define to 1 if you have the DOS-style `setmode' function. */ + #define HAVE_SETMODE_DOS 0 + + /* Define to 1 if you have the `sigaction' function. */ + #define HAVE_SIGACTION 0 + + /* Define to 1 if the system has the type `siginfo_t'. */ + /* #undef HAVE_SIGINFO_T */ + + /* Define to 1 if you have the `sigprocmask' function. */ + #define HAVE_SIGPROCMASK 0 + + /* Define to 1 if the system has the type `stack_t'. */ + /* #undef HAVE_STACK_T */ + + /* Define to 1 if you have the header file. */ + #define HAVE_STDBOOL_H 0 + + /* Define to 1 if you have the header file. */ + #define HAVE_STDDEF_H 1 + + /* Define to 1 if you have the header file. */ + /* #undef HAVE_STDINT_H */ + + /* Define to 1 if you have the header file. */ + #define HAVE_STDLIB_H 1 + + /* Define to 1 if you have the `strcasecmp' function. */ + #define HAVE_STRCASECMP 0 + + /* Define to 1 if you have the `strchr' function. */ + #define HAVE_STRCHR 1 + + /* Define to 1 if you have the `strerror' function. */ + #define HAVE_STRERROR 1 + + /* Define to 1 if you have the `strerror_r' function. */ + /* #undef HAVE_STRERROR_R */ + + /* Define to 1 if you have the `strftime' function. */ + #define HAVE_STRFTIME 1 + + /* Define to 1 if you have the header file. */ + #define HAVE_STRINGS_H 0 + + /* Define to 1 if you have the header file. */ + #define HAVE_STRING_H 1 + + /* Define to 1 if you have the `strtoul' function. */ + #define HAVE_STRTOUL 1 + + /* Define to 1 if you have the `strtoull' function. */ + /* #undef HAVE_STRTOULL */ + + /* Define to 1 if you have the `strtoumax' function. */ + /* #undef HAVE_STRTOUMAX */ + + /* Define to 1 if `st_blksize' is member of `struct stat'. */ + #define HAVE_STRUCT_STAT_ST_BLKSIZE 0 + + /* Define to 1 if `st_rdev' is member of `struct stat'. */ + #define HAVE_STRUCT_STAT_ST_RDEV 0 + + /* Define to 1 if `tm_zone' is member of `struct tm'. */ + /* #undef HAVE_STRUCT_TM_TM_ZONE */ + + /* Define to 1 if you have the header file, and it defines `DIR'. + */ + /* #undef HAVE_SYS_DIR_H */ + + /* Define to 1 if you have the header file. */ + #define HAVE_SYS_FILE_H 0 + + /* Define to 1 if you have the header file, and it defines `DIR'. + */ + /* #undef HAVE_SYS_NDIR_H */ + + /* Define to 1 if you have the header file. */ + #define HAVE_SYS_STAT_H 0 + + /* Define to 1 if you have the header file. */ + #define HAVE_SYS_TIME_H 0 + + /* Define to 1 if you have the header file. */ + #define HAVE_SYS_TYPES_H 0 + + /* Define to 1 if you have that is POSIX.1 compatible. */ + #define HAVE_SYS_WAIT_H 0 + + /* Define to 1 if you have the header file. */ + #define HAVE_TIME_H 1 + + /* Define to 1 if you have the `tmpnam' function. */ + #define HAVE_TMPNAM 1 + + /* Define if struct tm has the tm_gmtoff member. */ + /* #undef HAVE_TM_GMTOFF */ + + /* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use + `HAVE_STRUCT_TM_TM_ZONE' instead. */ + /* #undef HAVE_TM_ZONE */ + + /* Define to 1 if you don't have `tm_zone' but do have the external array + `tzname'. */ + /* #undef HAVE_TZNAME */ + + /* Define to 1 if you have the `tzset' function. */ + #define HAVE_TZSET 0 + + /* Define to 1 if you have the header file. */ + #define HAVE_UNISTD_H 0 + + /* Define if you have the unsigned long long type. */ + #define HAVE_UNSIGNED_LONG_LONG 0 + + /* Define to 1 if you have the `vfork' function. */ + #define HAVE_VFORK 0 + + /* Define to 1 if you have the header file. */ + /* #undef HAVE_VFORK_H */ + + /* Define to 1 if you have the `vprintf' function. */ + #define HAVE_VPRINTF 1 + + /* Define to 1 if you have the `waitpid' function. */ + #define HAVE_WAITPID 0 + + /* Define to 1 if you have the header file. */ + /* #undef HAVE_WCHAR_H */ + + /* Define to 1 if you have the header file. */ + /* #undef HAVE_WCTYPE_H */ + + /* Define to 1 if `fork' works. */ + #define HAVE_WORKING_FORK 0 + + /* Define to 1 if `vfork' works. */ + #define HAVE_WORKING_VFORK 0 + + /* Define to 1 if extending the stack slightly past the limit causes a + SIGSEGV, and an alternate stack can be established with sigaltstack, and + the signal handler is passed a context that specifies the run time stack. + This behavior is defined by POSIX 1003.1-2001 with the X/Open System + Interface (XSI) option and is a standardized way to implement a SEGV-based + stack overflow detection heuristic. */ + /* #undef HAVE_XSI_STACK_OVERFLOW_HEURISTIC */ + + /* Define to 1 if you have the `__secure_getenv' function. */ + /* #undef HAVE___SECURE_GETENV */ + + #if FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR + # define ISSLASH(C) ((C) == '/' || (C) == '\\') + #else + # define ISSLASH(C) ((C) == '/') + #endif + + /* Name of package */ + #define PACKAGE "diffutils" + + /* Define to the address where bug reports for this package should be sent. */ + #define PACKAGE_BUGREPORT "address@hidden" + + /* Define to the full name of this package. */ + #define PACKAGE_NAME "GNU diffutils" + + /* Define to the full name and version of this package. */ + #define PACKAGE_STRING "GNU diffutils 2.8" + + /* Define to the one symbol short name of this package. */ + #define PACKAGE_TARNAME "diffutils" + + /* Define to the version of this package. */ + #define PACKAGE_VERSION "2.8" + + /* Define if compiler has function prototypes */ + #define PROTOTYPES 1 + + /* Name of "pr" program. */ + #define PR_PROGRAM "//E/CYGNUS/CYGWIN~1/H-I586~1/BIN/pr" + + /* Define to 1 to avoid alloca in the regular-expression implementation. */ + #define REGEX_MALLOC 1 + + /* Define as the return type of signal handlers (`int' or `void'). */ + #define RETSIGTYPE void + + /* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown */ + /* #undef STACK_DIRECTION */ + + /* Define to 1 if the `S_IS*' macros in do not work properly. */ + /* #undef STAT_MACROS_BROKEN */ + + /* Define to 1 if you have the ANSI C header files. */ + #define STDC_HEADERS 1 + + /* Define to 1 if strerror_r returns char *. */ + /* #undef STRERROR_R_CHAR_P */ + + /* Define to be the nanoseconds member of struct stat's st_mtim, if it exists. + */ + /* #undef ST_MTIM_NSEC */ + + /* Define to 1 if you can safely include both and . */ + #define TIME_WITH_SYS_TIME 0 + + /* Define to 1 if your declares `struct tm'. */ + /* #undef TM_IN_SYS_TIME */ + + /* Version number of package */ + #define VERSION "2.8" + + /* Number of bits in a file offset, on hosts where this is settable. */ + /* #undef _FILE_OFFSET_BITS */ + + #ifndef _GNU_SOURCE + # define _GNU_SOURCE + #endif + + /* Define for large files, on AIX-style hosts. */ + /* #undef _LARGE_FILES */ + + /* Enable Solaris extensions. */ + #define __EXTENSIONS__ 1 + + /* Define like PROTOTYPES; this can be used by system headers. */ + #define __PROTOTYPES 1 + + /* Define to empty if `const' does not conform to ANSI C. */ + /* #undef const */ + + /* Define as `__inline' if that's what the C compiler calls it, or to nothing + if it is not supported. */ + #define inline + + /* Define to widest signed type if doesn't define. */ + #define intmax_t long + + /* Define to rpl_malloc if the replacement function should be used. */ + /* #undef malloc */ + + /* Define to a type if does not define. */ + #define mbstate_t int + + /* Define to the name of the strftime replacement function. */ + #define my_strftime nstrftime + + /* Define to `int' if does not define. */ + #define pid_t int + + /* Define to `int' if does not define. */ + /* #undef ptrdiff_t */ + + /* Define to rpl_realloc if the replacement function should be used. */ + /* #undef realloc */ + + /* Define to `int' if does not define. */ + #define ssize_t int + + /* Define to widest unsigned type if doesn't define. */ + #define uintmax_t unsigned long + + /* Define as `fork' if `vfork' does not work. */ + /* #undef vfork */ + + #define LOCALEDIR "" + + #include "unixio.h" + + #define same_file(a,b) 0 + + #define NOPIPE 1 + + #define print_context_label pc_label + #define print_context_header pc_header + #define print_context_script pc_script + #define print_context_number_range pc_numrange + #define print_context_function pc_function + #define find_function_last_search ff_lsearch + #define find_function_last_match ff_lmatch + #define compare_files cfiles + #define compare_line_list clinlist + #define compare_names cnames + #define compare_names_for_qsort cnamqsort + #define print_ed_script pescript + #define print_ed_hunk pehunk + #define pr_forward_ed_script pfescript + #define pr_forward_ed_hunk pfehunk + #define print_rcs_script prscript + #define print_rcs_hunk prhunk + #define print_ifdef_script piscript + #define print_ifdef_hunk pihunk + #define print_ifdef_lines pilines + #define print_normal_script pnscript + #define print_normal_hunk pnhunk + #define print_sdiff_script psscript + #define print_sdiff_common_lines pscomlines + #define print_sdiff_hunk pshunk + #define translate_line_number trlinnum + #define translate_range trrange + #define msg_chain_end mchend + #define current_name0 cname0 + #define current_name1 cname1 + #define _getopt_initialize goinit + #define _getopt_internal gointern + #define getopt_long_only gol_only + #define prepend_args ppargs + #define prepend_default_options ppdefopts + #define re_error_msgid remsgid + #define re_error_msgid_idx rem_idx + #define re_syntax_table restab + #define re_syntax_options resopts + #define my_strftime_gmtime_r msgmr + #define my_strftime_localtime_r mslocr + #define bkm_scale_by_power bsbpower + #define program_error_message pemess + #define block_compare_and_count bcacount + #define add_exclude_file aefile + #define specify_comparison_type sp_c_type + #define specify_value sp_value + #define specify_style sp_style + #define group_format_option gfoption + #define line_format_option lfoption + #define function_regexp freg + #define function_regexp_list freglist + #define ignore_blank_lines i_bl_lines + #define ignore_regexp i_reg + #define ignore_regexp_list i_reglist + #define c_stack_action cs_action + #define c_stack_die cs_die + #define output_diff3_edscript od3ed + #define output_diff3_merge od3merge + #define output_diff3 odiff3 + #define process_diff_control pdcontrol + #define process_diff pdiff + #define byte_store_op1 bsop1 + #define byte_store_op2 bsop2 + #define byte_insert_op1 biop1 + #define byte_insert_op2 biop2 + #define byte_at_begline_loc_p babeglp + #define byte_at_endline_loc_p baendlp + #define byte_re_compile_fastmap brecfm + #define byte_re_search_2 brsrch2 + #define byte_compile_range bcrange + #define byte_common_op_match_null_string_p bcomnsp + #define re_search_2 resrch2 + #define re_match_2 remat2 + #define re_compile_fastmap recfm + #define re_compile_pattern recpat + #define byte_reg_unset_dummy brunsdum + #define byte_reg_info breginfo + #define byte_reg_info_dummy bridummy + #define byte_regex_grow_registers brgrregs + #define byte_regex_compile brgcomp + #define excluded_filename exclfile + + #include + + #ifndef EINVAL + #define EINVAL 900 + #endif + + #ifndef EINTR + #define EINTR 901 + #endif + + #ifndef EISDIR + #define EISDIR 902 + #endif + + #endif Index: diffutils/src/diff3.c diff -c diffutils/src/diff3.c:1.1.1.2 diffutils/src/diff3.c:1.5 *** diffutils/src/diff3.c:1.1.1.2 Sun Nov 12 14:16:52 2006 --- diffutils/src/diff3.c Sun Nov 12 19:01:20 2006 *************** *** 178,183 **** --- 178,188 ---- /* If nonzero, output a merged file. */ static bool merge; + #if NOPIPE + static char *prediff1; + static char *prediff2; + #endif + char *program_name; static char *read_diff (char const *, char const *, char **); *************** *** 331,338 **** --- 336,351 ---- { if (argc - optind < 3) try_help ("missing operand after `%s'", argv[argc - 1]); + #if NOPIPE + else if ((argc - optind) == 5) + { + prediff1 = argv[optind + 3]; + prediff2 = argv[optind + 4]; + } + #else else try_help ("extra operand `%s'", argv[optind + 3]); + #endif } file = &argv[optind]; *************** *** 1190,1195 **** --- 1203,1225 ---- close (fds[1]); /* Prevent erroneous lack of EOF */ fd = fds[0]; + #elif NOPIPE + pid_t pid; + static int called = 0; + char *prefile; + + if (!called) + { + called = 1; + prefile = prediff2; + } + else + { + prefile = prediff1; + } + fd = open (prefile, O_RDONLY); + if (fd == 0) perror_with_exit ("open"); + #else FILE *fpipe; *************** *** 1243,1249 **** *output_placement = diff_result; ! #if ! (HAVE_WORKING_FORK || HAVE_WORKING_VFORK) wstatus = pclose (fpipe); if (wstatus == -1) --- 1273,1279 ---- *output_placement = diff_result; ! #if ! (HAVE_WORKING_FORK || HAVE_WORKING_VFORK) && !NOPIPE wstatus = pclose (fpipe); if (wstatus == -1) Index: diffutils/src/sdiff.c diff -c diffutils/src/sdiff.c:1.1.1.1 diffutils/src/sdiff.c:1.3 *** diffutils/src/sdiff.c:1.1.1.1 Sat Nov 04 01:11:48 2006 --- diffutils/src/sdiff.c Sat Nov 04 23:30:16 2006 *************** *** 84,90 **** --- 84,92 ---- SIGXFSZ, #endif SIGINT, + #ifdef SIGPIPE SIGPIPE + #endif }; #define handler_index_of_SIGINT (NUM_SIGS - 2) #define handler_index_of_SIGPIPE (NUM_SIGS - 1) *************** *** 114,120 **** # define SIG_SETMASK (! SIG_BLOCK) # endif # define sigprocmask(how, n, o) \ ! ((how) == SIG_BLOCK ? *(o) = sigblock (*(n)) : sigsetmask (*(n))) #endif static bool diraccess (char const *); --- 116,122 ---- # define SIG_SETMASK (! SIG_BLOCK) # endif # define sigprocmask(how, n, o) \ ! /*((how) == SIG_BLOCK ? *(o) = sigblock (*(n)) : sigsetmask (*(n)))*/ #endif static bool diraccess (char const *); Index: diffutils/src/system.h diff -c diffutils/src/system.h:1.1.1.2 diffutils/src/system.h:1.3 *** diffutils/src/system.h:1.1.1.2 Sun Nov 12 14:16:52 2006 --- diffutils/src/system.h Sun Nov 12 14:19:58 2006 *************** *** 58,65 **** --- 58,69 ---- # define TYPE_MAXIMUM(t) ((t) (~ (t) 0 - TYPE_MINIMUM (t))) #endif + #if HAVE_SYS_TYPES_H #include + #endif + #if HAVE_SYS_STAT_H #include + #endif #if STAT_MACROS_BROKEN # undef S_ISBLK Index: diffutils/src/unixio.c diff -c /dev/null diffutils/src/unixio.c:1.7 *** /dev/null Tue Nov 14 07:26:38 2006 --- diffutils/src/unixio.c Mon Nov 13 17:06:26 2006 *************** *** 0 **** --- 1,222 ---- + /*********************************************************************/ + /* */ + /* This Program Written By Paul Edwards. */ + /* Released to the public domain. */ + /* */ + /*********************************************************************/ + /*********************************************************************/ + /* */ + /* unixio - Unix I/O functions written in terms of standard C */ + /* functions. */ + /* */ + /*********************************************************************/ + + #include + #include + + #ifdef fileno + #undef fileno + #endif + + #include "unixio.h" + + static FILE *files[FOPEN_MAX]; + /*char *environ[] = { NULL };*/ + + int open(const char *fnm, int mode, ...) + { + int x; + char *modestr; + + for (x = 3; x < FOPEN_MAX; x++) + { + if (files[x] == NULL) + { + break; + } + } + if (x == FOPEN_MAX) + { + return (-1); + } + if (mode == O_RDONLY) + { + modestr = "r"; + } + else if (mode == O_WRONLY) + { + modestr = "w"; + } + else if (mode == O_RDWR) + { + modestr = "r+"; + } + files[x] = fopen(fnm, modestr); + if (files[x] == NULL) + { + return (-1); + } + return (x); + } + + int read(int fno, void *buf, size_t bytes) + { + size_t rb; + + if (fno < 3) + { + rb = fread(buf, 1, bytes, stdin); + } + else + { + rb = fread(buf, 1, bytes, files[fno]); + } + return ((int)rb); + } + + int write(int fno, const void *buf, size_t bytes) + { + size_t wb; + + if (fno == 1) + { + fwrite(buf, 1, bytes, stdout); + } + else if (fno == 2) + { + fwrite(buf, 1, bytes, stderr); + } + else if (fno > 2) + { + wb = fwrite(buf, 1, bytes, files[fno]); + } + return ((int)wb); + } + + int close(int fno) + { + if (fno >= 3) + { + fclose(files[fno]); + files[fno] = NULL; + } + return (0); + } + + long lseek(int fno, long int offset, int whence) + { + return (fseek(files[fno], offset, whence)); + } + + FILE *fdopen(int fno, const char *mode) + { + return (files[fno]); + } + + char *getcwd(char *buf, int len) + { + if (len != 0) + { + *buf = '\0'; + } + return (buf); + } + + void unlink(char *f) + { + remove(f); + return; + } + + int stat(char *f, struct stat *buf) + { + memset(buf, '\0', sizeof *buf); + buf->st_mode = S_IFREG; + return (0); + } + + int fileno(FILE *fp) + { + return (0); + } + + int access(char *f, int n) + { + return (1); + } + + int fstat(int fh, struct stat *buf) + { + memset(buf, '\0', sizeof *buf); + return (0); + } + + int pwait(int a, int *b, int c) + { + return (0); + } + + int putenv(const char *x) + { + return (0); + } + + char *mktemp(char *s) + { + return (tmpnam(s)); + } + + int chdir(char *path) + { + return (0); + } + + int rmdir(char *path) + { + return (0); + } + + int mkdir(char *path, int permissions) + { + return (0); + } + + FILE *popen(const char *s, const char *t) + { + return (NULL); + } + + int pclose(FILE *f) + { + return (0); + } + + int kill(int a, int b) + { + return (0); + } + + int mkstemp(char *buf) + { + return (open(tmpnam(buf), O_WRONLY)); + } + + DIR *opendir(char *dirname) + { + return (NULL); + } + + struct dirent *readdir(DIR *dir) + { + return (NULL); + } + + int closedir(DIR *dir) + { + return (0); + } + + int execvp(char *path, char **argv) + { + return (0); + } Index: diffutils/src/unixio.h diff -c /dev/null diffutils/src/unixio.h:1.9 *** /dev/null Tue Nov 14 07:26:38 2006 --- diffutils/src/unixio.h Mon Nov 13 17:03:28 2006 *************** *** 0 **** --- 1,75 ---- + /* written by Paul Edwards */ + /* released to the public domain */ + + #ifndef UNIXIO_INCLUDED + #define UNIXIO_INCLUDED + + #include + #include + #include + #include + #include + + #define S_IFBLK 0x3000 + #define S_IFDIR 0x4000 + #define S_IFREG 0x8000 + #define S_IFMT 0xf000 + + #ifndef ENOENT + #define ENOENT 2002 + #endif + #ifndef ENOTDIR + #define ENOTDIR 2045 + #endif + + #define O_RDONLY 1 + #define O_WRONLY 2 + #define O_RDWR 4 + #define O_CREAT 0x100 + #define O_TRUNC 0x200 + + struct stat { + long st_size; + long st_mode; + long st_ino; + long st_dev; + long st_mtime; + int st_nlink; + int st_uid; + int st_gid; + int st_ctime; + }; + + typedef struct { + int whatever; + } DIR; + + struct dirent { + int whatever; + }; + + struct direct { + char *d_name; + int d_namlen; + }; + + typedef long off_t; + + #define waitpid(a,b,c) (*(b) = 0) + #define getpid() (0) + #define _exit(a) (exit((a))) + + int open(const char *fnm, int mode, ...); + int read(int fno, void *buf, size_t bytes); + int write(int fno, const void *buf, size_t bytes); + int close(int fno); + long lseek(int fno, long int offset, int whence); + char *mktemp(char *s); + FILE *popen(const char *s, const char *t); + int kill(int a, int b); + DIR *opendir(char *dirname); + struct dirent *readdir(DIR *dir); + int closedir(DIR *dir); + int execvp(char *path, char **argv); + + #endif