X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pref.h.orig;h=6ae2299720c115667a136d430f554b796aad1d81;hb=26a2fc80cb850d182030635c3720fbb6db40ae70;hp=1577094721e50bdb68a18a413cdba0cb92bd916a;hpb=4944c86a9318bc5b5578ab145a95c116ffd2c9fd;p=pspp-builds.git diff --git a/pref.h.orig b/pref.h.orig index 15770947..6ae22997 100644 --- a/pref.h.orig +++ b/pref.h.orig @@ -25,37 +25,6 @@ /* Compilers. */ -/* Fix Windows lossage. */ -#ifdef __WIN32__ -#undef __WIN32__ -#define __WIN32__ 1 -#undef __MSDOS__ -#define __MSDOS__ 1 -#endif - -/* Fix DJGPP lossage. */ -#if __DJGPP__ -#undef unix -#undef __unix__ -#endif - -/* Fix Cygnus Windows lossage. */ -#if defined (__CYGWIN32__) -#define unix 1 -#endif - -/* Ensure that unix and __unix__ are equivalent. */ -#if defined (unix) || defined (__unix__) || defined (__unix) -#undef unix -#define unix 1 - -#undef __unix__ -#define __unix__ 1 - -#undef __unix -#define __unix 1 -#endif - /* Make sure to use the proper keywords. */ #if __GNUC__ > 1 && !defined (inline) #define inline __inline__ @@ -65,57 +34,24 @@ printf-like arguments, never return, etc. Conditionalize these declarations on whether gcc is in use. */ #if __GNUC__ > 1 -#define __attribute__(X) __attribute__ (X) +#define ATTRIBUTE(X) __attribute__ (X) #else -#define __attribute__(X) +#define ATTRIBUTE(X) #endif -/* GNU C allows unused variables and parameters to be declared as - such. */ -#if __GNUC__ >= 2 -#define unused __attribute__ ((__unused__)) -#else -#define unused -#endif +#define UNUSED ATTRIBUTE ((unused)) +#define NO_RETURN ATTRIBUTE ((noreturn)) +#define PRINTF_FORMAT(FMT, FIRST) ATTRIBUTE ((format (printf, FMT, FIRST))) +#define SCANF_FORMAT(FMT, FIRST) ATTRIBUTE ((format (scanf, FMT, FIRST))) /* CPUs. */ -/* Check that the floating-point representation is one that we - understand. */ -#if FPREP==FPREP_IEEE754 - #if SIZEOF_DOUBLE == 8 #define second_lowest_flt64 second_lowest_value #else #error Must define second_lowest_flt64 for your architecture. #endif -/* This trick borrowed from gcc-lib/.../include/float.h. */ -#if __GNUC__ && (ENDIAN==BIG || ENDIAN==LITTLE) -#ifndef __DBL_UNION__ -#define __DBL_UNION__ -union blp_convert_double { - unsigned char convert_double_i[8]; - double convert_double_d; -}; -#endif /* !defined __DBL_UNION__ */ -#if ENDIAN==LITTLE -#define SECOND_LOWEST_VALUE \ - (__extension__ ((union blp_convert_double) \ - {{0xfe,0xff,0xff,0xff, 0xff,0xff,0xef,0xff}}) \ - .convert_double_d) -#elif ENDIAN==BIG -#define SECOND_LOWEST_VALUE \ - (__extension__ ((union blp_convert_double) \ - {{0xff,0xef,0xff,0xff, 0xff,0xff,0xff,0xfe}}) \ - .convert_double_d) -#endif /* endianness */ -#endif /* __GNUC__ and known endianness */ - -#else /* FPREP != FPREP_IEEE754 */ -#error Floating point representation must be known at compile time. -#endif /* fprep */ - /* Figure out which integer type on this system is a signed 32-bit integer. */ #if SIZEOF_SHORT==4 @@ -153,77 +89,27 @@ union blp_convert_double { which causes gcc not to do its checking on printf() format types. */ #undef gettext -#define gettext(STRING) \ - STRING +#define gettext(STRING) STRING #endif -#define _(STRING) \ - gettext(STRING) - -#define N_(STRING) \ - STRING - -/* Even C emulation of alloca counts as an alloca implementation. */ -#if C_ALLOCA -#define HAVE_ALLOCA 1 -#endif - -/* Define PAGED_STACK if alloca() is supported and the stack can - expand arbitrarily. (Under some broken OSes like DOS and - Windows the stack is small and fixed in size.) This will prevent - big alloca() requests (like 1MB). */ -#if HAVE_ALLOCA && unix -#define PAGED_STACK 1 -#endif - -/* Saves on #if's. */ -#if HAVE_ALLOCA && !__CHECKER__ -#define local_alloc(X) \ - alloca(X) - -#define local_free(P) \ - do \ - { \ - } \ - while (0) -#elif !__CHECKER__ -#define local_alloc(X) \ - xmalloc (X) - -#define local_free(P) \ - free (P) -#else /* __CHECKER__ */ -/* Why define these this way? Because if you do it this way then if - you try to free a block returned by local_alloc() with the free() - function, you get an error message. */ -#define local_alloc(X) \ - ((void *) (((char *) (xmalloc (X+16))) + 16)) - -#define local_free(P) \ - free (((char *) P) - 16) -#endif /* __CHECKER__ */ +#define _(STRING) gettext(STRING) +#define N_(STRING) STRING /* Filesystems. */ /* Directory separator character for this OS, if applicable. */ -#if !__MSDOS__ +#ifndef __MSDOS__ #define DIR_SEPARATOR '/' -#elif +#else #define DIR_SEPARATOR '\\' #endif /* Path delimiter character. */ -#if !__MSDOS__ +#ifndef __MSDOS__ #define PATH_DELIMITER ':' #else #define PATH_DELIMITER ';' #endif - -/* MSDOS mkdir() takes only one argument. */ -#if __MSDOS__ && !__DJGPP__ -#define mkdir(path, mode) \ - mkdir (path) -#endif /* Options. */ @@ -247,22 +133,8 @@ union blp_convert_double { /* Define to exclude the PostScript and Encapsulated PostScript driver. */ /* #define NO_POSTSCRIPT 1 */ - -/* Procedure-specific options. */ - -/* CROSSTABS: Maximum number of tables to process in one pass. */ -#define MAX_CROSSTAB_TABLES 32 -/* FREQUENCIES: Define to allow bars greater than 1/2" wide. */ -/* #define ALLOW_HUGE_BARS 1 */ - -/* FREQUENCIES: Minimum, maximum number of bars in a histogram. The - number is based on the number of unique values of the variable, - unless overridden. */ -#define MIN_HIST_BARS 3 -#define MAX_HIST_BARS 20 - -/* FREQUENCIES: Density of polyline used to approximate the normal - curve. The value is the number of samples taken per chart. Higher - values give smoother curves. */ -#define POLYLINE_DENSITY (MAX_HIST_BARS*4) +/* Non ansi compilers may set this */ +#ifndef P_tmpdir +#define P_tmpdir "/tmp" +#endif