summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/awk/config
diff options
context:
space:
mode:
authorjtc <jtc@NetBSD.org>1993-07-02 23:56:52 +0000
committerjtc <jtc@NetBSD.org>1993-07-02 23:56:52 +0000
commitf4e00a39c236bf7481c72bcc6d215900040c7cdf (patch)
tree52e2aaed1a2ff6e364820a186cf85c4b792e5626 /gnu/usr.bin/awk/config
parent8ebc845441169cc86d3f7c2b400125e254124a27 (diff)
Updated to mawk 1.1.4
Diffstat (limited to 'gnu/usr.bin/awk/config')
-rw-r--r--gnu/usr.bin/awk/config/Idefault.h225
1 files changed, 107 insertions, 118 deletions
diff --git a/gnu/usr.bin/awk/config/Idefault.h b/gnu/usr.bin/awk/config/Idefault.h
index 76db198c6bf..1cb351093fa 100644
--- a/gnu/usr.bin/awk/config/Idefault.h
+++ b/gnu/usr.bin/awk/config/Idefault.h
@@ -12,55 +12,85 @@ the GNU General Public License, version 2, 1991.
/* $Log: Idefault.h,v $
-/* Revision 1.1.1.1 1993/03/21 09:45:37 cgd
-/* initial import of 386bsd-0.1 sources
+/* Revision 1.2 1993/07/02 23:58:21 jtc
+/* Updated to mawk 1.1.4
/*
- * Revision 3.13 92/03/03 16:40:56 brennan
- * remove HAVE_PRINTF_HD
- *
- * Revision 3.12 91/11/16 15:37:29 brennan
- * add NO_BINMODE
- *
- * Revision 3.11 91/10/29 10:48:40 brennan
- * version 1.09
- *
- * Revision 3.10 91/10/23 10:46:34 brennan
- * MSDOS LM and SM
- *
- * Revision 3.9 91/10/14 09:52:48 brennan
- * added HAVE_PRINTF_HD
- *
- * Revision 3.8 91/09/30 08:11:22 brennan
- * added MAX__INT
- *
- * Revision 3.7 91/08/16 08:49:51 brennan
- * Carl's addition of SW_FP_CHECK for XNX23A
- *
- * Revision 3.6 91/08/13 09:04:05 brennan
- * VERSION .9994
- *
- * Revision 3.5 91/08/03 06:10:46 brennan
- * changed CHECK_DIVZERO macro
- *
- * Revision 3.4 91/08/03 05:35:59 brennan
- * changed name to Idefault.h
- *
- * Revision 3.3 91/06/28 04:36:28 brennan
- * adjustments with __STDC__
- *
- * Revision 3.3 91/06/19 10:21:37 brennan
- * changes for xenix_r2.h and gcc
- *
- * Revision 3.2 91/06/15 09:24:34 brennan
- * Carl's diffs for V7
- *
- * 06/11/91 C. Mascott add default D2BOOL
+ * Revision 3.18.1.1 1993/01/15 03:33:52 mike
+ * patch3: safer double to int conversion
+ *
+ * Revision 3.18 1992/12/17 02:48:01 mike
+ * 1.1.2d changes for DOS
+ *
+ * Revision 3.17 1992/11/26 15:35:52 mike
+ * don't assume __STDC__ implies HAVE_STRERROR
+ *
+ * Revision 3.16 1992/11/22 19:00:43 mike
+ * allow STDC assumptions to be overridden
+ *
+ * Revision 3.15 1992/07/08 16:16:08 brennan
+ * don't attempt any #def or #undef with __STDC__
*
- * Revision 3.1 91/06/07 10:38:46 brennan
- * VERSION 0.995
- *
*/
+
+#ifdef __STDC__
+#if __STDC__
+
+#undef HAVE_PROTOS
+#define HAVE_PROTOS 1
+#undef HAVE_VOID_PTR
+#define HAVE_VOID_PTR 1
+
+/* these can be overidden */
+
+#ifndef HAVE_STDARG_H
+#define HAVE_STDARG_H 1
+#endif
+
+#ifndef HAVE_STRING_H
+#define HAVE_STRING_H 1
+#endif
+
+#ifndef HAVE_STDLIB_H
+#define HAVE_STDLIB_H 1
+#endif
+
+#endif
+#endif
+
+#ifdef MSDOS
+
+#ifndef HAVE_REARGV
+#define HAVE_REARGV 0
+#endif
+
+#if HAVE_REARGV
+#define SET_PROGNAME() reargv(&argc,&argv) ; progname = argv[0]
+#else
+#define SET_PROGNAME() progname = "mawk"
+#endif
+
+#define MAX__INT 0x7fff
+
+#if HAVE_SMALL_MEMORY==0
+#define LM_DOS 1
+#else
+#define LM_DOS 0
+#endif
+
+#define SM_DOS (!LM_DOS)
+
+#define HAVE_REAL_PIPES 0
+#define HAVE_FAKE_PIPES 1
+
+#else /* not defined MSDOS */
+#define MSDOS 0
+#define LM_DOS 0
+#define SM_DOS 0
+
+#endif /* MSDOS */
+
+
/* The most common configuration is defined here:
no function prototypes
@@ -117,6 +147,10 @@ the GNU General Public License, version 2, 1991.
#define HAVE_FMOD 1
#endif
+#ifndef HAVE_STRERROR
+#define HAVE_STRERROR 0
+#endif
+
/* uses <varargs.h> instead of <stdarg.h> */
#ifndef HAVE_STDARG_H
#define HAVE_STDARG_H 0
@@ -148,13 +182,37 @@ the GNU General Public License, version 2, 1991.
#define HAVE_FAKE_PIPES 0
#endif
+/* don't have strerror() */
+#ifndef HAVE_STRERROR
+#define HAVE_STRERROR 0
+#endif
+
+#ifndef SET_PROGNAME
+#define SET_PROGNAME() { char *strrchr() , *p ;\
+ p = strrchr(argv[0],'/') ;\
+ progname = p ? p+1 : argv[0] ; }
+#endif
+
+
+
/*------------- machine ------------------------*/
/* ints are 32bits, two complement */
#ifndef MAX__INT
#define MAX__INT 0x7fffffff
+#define INT_FMT "%d"
+#endif
+
+#ifndef MAX__LONG
+#define MAX__LONG 0x7fffffff
+#endif
+
+#if MAX__INT <= 0x7fff
+#define SHORT_INTS
+#define INT_FMT "%ld"
#endif
+
/* default is IEEE754 and data space is not scarce */
#ifndef FPE_TRAPS_ON
@@ -188,6 +246,10 @@ the GNU General Public License, version 2, 1991.
#define TURN_OFF_FPE_TRAPS() /* nothing */
#endif
+#ifndef TURN_ON_FPE_TRAPS
+#define TURN_ON_FPE_TRAPS() /* nothing */
+#endif
+
#ifndef HAVE_SMALL_MEMORY
#define HAVE_SMALL_MEMORY 0
#endif
@@ -196,29 +258,6 @@ the GNU General Public License, version 2, 1991.
/*------------------------------------------------*/
-#ifndef __STDC__
-#define __STDC__ 0
-#endif
-
-#if __STDC__
-
-#undef HAVE_PROTOS
-#define HAVE_PROTOS 1
-#undef HAVE_VOID_PTR
-#define HAVE_VOID_PTR 1
-#undef HAVE_STDARG_H
-#define HAVE_STDARG_H 1
-#undef HAVE_STRING_H
-#define HAVE_STRING_H 1
-#endif
-
-#if __STDC__ && ! __GNUC__
-/* with gcc __STDC__ can be defined, but stdlib.h is missing */
-#undef HAVE_STDLIB_H
-#define HAVE_STDLIB_H 1
-#endif
-
-
/* the painfull case: we need to catch fpe's and look at errno
@@ -226,49 +265,6 @@ the GNU General Public License, version 2, 1991.
#define STDC_MATHERR ((SW_FP_CHECK || FPE_TRAPS_ON) && HAVE_MATHERR==0)
-/*-------------------MSDOS---------------------------------*/
-
-#ifdef MSDOS
-
-#ifndef HAVE_REARGV
-#define HAVE_REARGV 0
-#endif
-
-#undef MAX__INT
-#define MAX__INT 0x7fff
-
-#if HAVE_SMALL_MEMORY==0
-#define LM_DOS 1
-#else
-#define LM_DOS 0
-#endif
-
-#define SM_DOS (!LM_DOS)
-
-#undef HAVE_REAL_PIPES
-#define HAVE_REAL_PIPES 0
-#undef HAVE_FAKE_PIPES
-#define HAVE_FAKE_PIPES 1
-
-#if SM_DOS
-#ifdef NO_BINMODE
-#undef NO_BINMODE
-#define NO_BINMODE 1 /* hopefully no one needs this */
-#else
-#define NO_BINMODE 0
-#endif
-#else
-#define NO_BINMODE 0
-#endif /* SM_DOS */
-
-#else /* not defined MSDOS */
-#define MSDOS 0
-#define LM_DOS 0
-#define SM_DOS 0
-
-#endif /* MSDOS */
-
-/*----------------------------------------------------------*/
#if HAVE_PROTOS
@@ -277,13 +273,6 @@ the GNU General Public License, version 2, 1991.
#define PROTO(name, args) name()
#endif
-/* ultrix pukes if __STDC__ is defined 0 */
-/* SCO UNIX's cc (from Microsoft) sneezes if __STDC__ is re-#define-d */
-#if (__STDC__ == 0)
-#ifndef M_I386
-#undef __STDC__
-#endif
-#endif
/* for Think C on the Macintosh, sizeof(size_t) != sizeof(unsigned
* Rather than unilaterally imposing size_t, when not all compilers would