home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / gawk-2.15.6-base.tgz / gawk-2.15.6-base.tar / fsf / gawk / config / vms-conf.h < prev    next >
C/C++ Source or Header  |  1993-12-19  |  9KB  |  324 lines

  1. /*
  2.  * config.h -- configuration definitions for gawk.
  3.  *
  4.  * For VMS (assumes V4.6 or later; tested on V5.3 and V5.4)
  5.  */
  6.  
  7. /* 
  8.  * Copyright (C) 1991, 1992 the Free Software Foundation, Inc.
  9.  * 
  10.  * This file is part of GAWK, the GNU implementation of the
  11.  * AWK Progamming Language.
  12.  * 
  13.  * GAWK is free software; you can redistribute it and/or modify
  14.  * it under the terms of the GNU General Public License as published by
  15.  * the Free Software Foundation; either version 2, or (at your option)
  16.  * any later version.
  17.  * 
  18.  * GAWK is distributed in the hope that it will be useful,
  19.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  21.  * GNU General Public License for more details.
  22.  * 
  23.  * You should have received a copy of the GNU General Public License
  24.  * along with GAWK; see the file COPYING.  If not, write to
  25.  * the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  26.  */
  27.  
  28. /**************************/
  29. /* Miscellanious features */
  30. /**************************/
  31.  
  32. /*
  33.  * BLKSIZE_MISSING
  34.  *    VMS: missing--not applicable
  35.  * Check your /usr/include/sys/stat.h file.  If the stat structure
  36.  * does not have a member named st_blksize, define this.  (This will
  37.  * most likely be the case on most System V systems prior to V.4.)
  38.  */
  39. #define BLKSIZE_MISSING    1
  40.  
  41. /*
  42.  * SIGTYPE
  43.  *    VMS: either should work; void is 'correct'
  44.  * The return type of the routines passed to the signal function.
  45.  * Modern systems use `void', older systems use `int'.
  46.  * If left undefined, it will default to void.
  47.  */
  48. #define SIGTYPE    void
  49.  
  50. /*
  51.  * SIZE_T_MISSING
  52.  *    VMS: <stddef.h> via <stdlib.h> (VAX C V2.3 & up); <sys/types.h> (GNU C)
  53.  * If your system has no typedef for size_t, define this to get a default
  54.  */
  55. /* #define    SIZE_T_MISSING    1 */
  56.  
  57. /*
  58.  * CHAR_UNSIGNED
  59.  *    VMS: well behaved, either signed or unsigned (signed by default)
  60.  * If your machine uses unsigned characters (IBM RT and RS/6000 and others)
  61.  * then define this for use in regex.c
  62.  */
  63. /* #define CHAR_UNSIGNED    1 */
  64.  
  65. /*
  66.  * HAVE_UNDERSCORE_SETJMP
  67.  *    VMS: not present
  68.  * Check in your /usr/include/setjmp.h file.  If there are routines
  69.  * there named _setjmp and _longjmp, then you should define this.
  70.  * Typically only systems derived from Berkeley Unix have this.
  71.  */
  72. /* #define HAVE_UNDERSCORE_SETJMP    1 */
  73.  
  74. /***********************************************/
  75. /* Missing library subroutines or system calls */
  76. /***********************************************/
  77.  
  78. /*
  79.  * MEMCMP_MISSING
  80.  * MEMCPY_MISSING
  81.  * MEMSET_MISSING
  82.  *    VMS: <string.h> (introduced V4.6)
  83.  * These three routines are for manipulating blocks of memory. Most
  84.  * likely they will either all three be present or all three be missing,
  85.  * so they're grouped together.
  86.  */
  87. /* #define MEMCMP_MISSING    1 */
  88. /* #define MEMCPY_MISSING    1 */
  89. /* #define MEMSET_MISSING    1 */
  90.  
  91. /*
  92.  * RANDOM_MISSING
  93.  *    VMS: missing (as of V5.4)
  94.  * Your system does not have the random(3) suite of random number
  95.  * generating routines.  These are different than the old rand(3)
  96.  * routines!
  97.  */
  98. #define RANDOM_MISSING    1
  99.  
  100. /*
  101.  * STRCASE_MISSING
  102.  *    VMS: missing
  103.  * Your system does not have the strcasemp() and strncasecmp()
  104.  * routines that originated in Berkeley Unix.
  105.  */
  106. #define STRCASE_MISSING    1
  107.  
  108. /*
  109.  * STRCHR_MISSING
  110.  *    VMS: <string.h>
  111.  * Your system does not have the strchr() and strrchr() functions.
  112.  */
  113. /* #define STRCHR_MISSING    1 */
  114.  
  115. /*
  116.  * STRERROR_MISSING
  117.  *    VMS: <stdlib.h> (introduced V4.6)
  118.  * Your system lacks the ANSI C strerror() routine for returning the
  119.  * strings associated with errno values.
  120.  */
  121. /* #define STRERROR_MISSING    1 */
  122.  
  123. /*
  124.  * STRTOD_MISSING
  125.  *    VMS: <stdlib.h> (introduced V4.6)
  126.  * Your system does not have the strtod() routine for converting
  127.  * strings to double precision floating point values.
  128.  */
  129. /* #define STRTOD_MISSING    1 */
  130.  
  131. /*
  132.  * STRFTIME_MISSING
  133.  *    VMS: missing (as of V5.4) [see below; do not change STRFTIME_MISSING]
  134.  * Your system lacks the ANSI C strftime() routine for formatting
  135.  * broken down time values.
  136.  */
  137. #define STRFTIME_MISSING    1
  138.  
  139. /*
  140.  * TZSET_MISSING
  141.  *    VMS: missing, but can't use missing/tzset.c  [no timezone support]
  142.  * If you have a 4.2 BSD vintage system, then the strftime() routine
  143.  * supplied in the missing directory won't be enough, because it relies on the
  144.  * tzset() routine from System V / Posix.  Fortunately, there is an
  145.  * emulation for tzset() too that should do the trick.  If you don't
  146.  * have tzset(), define this.
  147.  */
  148. /* #define TZSET_MISSING    1 */
  149.  
  150. /*
  151.  * TZNAME_MISSING
  152.  *
  153.  * Some systems do not support the external variables tzname and daylight.
  154.  * If this is the case *and* strftime() is missing, define this.
  155.  */
  156. /* #define TZNAME_MISSING    1 */
  157.  
  158. /*
  159.  * STDC_HEADERS
  160.  *    VMS: close enough (as of V4.6, VAX C V2.3) [GCC, see below]
  161.  * If your system does have ANSI compliant header files that
  162.  * provide prototypes for library routines, then define this.
  163.  */
  164. #define STDC_HEADERS    1
  165.  
  166. /*
  167.  * NO_TOKEN_PASTING
  168.  *    VMS: compiler specific--see below
  169.  * If your compiler define's __STDC__ but does not support token
  170.  * pasting (tok##tok), then define this.
  171.  */
  172. /* #define NO_TOKEN_PASTING    1 */
  173.  
  174. /*****************************************************************/
  175. /* Stuff related to the Standard I/O Library.             */
  176. /*****************************************************************/
  177. /* Much of this is (still, unfortunately) black magic in nature. */
  178. /* You may have to use some or all of these together to get gawk */
  179. /* to work correctly.                         */
  180. /*****************************************************************/
  181.  
  182. /*
  183.  * NON_STD_SPRINTF
  184.  *    VMS: ok
  185.  * Look in your /usr/include/stdio.h file.  If the return type of the
  186.  * sprintf() function is NOT `int', define this.
  187.  */
  188. /* #define NON_STD_SPRINTF    1 */
  189.  
  190. /*
  191.  * VPRINTF_MISSING
  192.  *    VMS: ok (introduced V4.6)
  193.  * Define this if your system lacks vprintf() and the other routines
  194.  * that go with it.  This will trigger an attempt to use _doprnt().
  195.  * If you don't have that, this attempt will fail and you are on your own.
  196.  */
  197. /* #define VPRINTF_MISSING    1 */
  198.  
  199. /*
  200.  * Casts from size_t to int and back.  These will become unnecessary
  201.  * at some point in the future, but for now are required where the
  202.  * two types are a different representation.
  203.  */
  204. /* #define SZTC */
  205. /* #define INTC */
  206.  
  207. /*
  208.  * SYSTEM_MISSING
  209.  *    VMS: ok (introduced V4.6)
  210.  * Define this if your library does not provide a system function
  211.  * or you are not entirely happy with it and would rather use
  212.  * a provided replacement (atari only).
  213.  */
  214. /* #define SYSTEM_MISSING   1 */
  215.  
  216. /*
  217.  * FMOD_MISSING
  218.  *    VMS: ok (introduced V4.6)
  219.  * Define this if your system lacks the fmod() function and modf() will
  220.  * be used instead.
  221.  */
  222. /* #define FMOD_MISSING    1 */
  223.  
  224.  
  225. /*******************************/
  226. /* Gawk configuration options. */
  227. /*******************************/
  228.  
  229. /*
  230.  * DEFPATH
  231.  *    VMS: "/AWK_LIBRARY" => "AWK_LIBRARY:"
  232.  * The default search path for the -f option of gawk.  It is used
  233.  * if the AWKPATH environment variable is undefined.
  234.  *
  235.  * Note: OK even if no AWK_LIBRARY logical name has been defined.
  236.  */
  237.  
  238. #define DEFPATH    ".,/AWK_LIBRARY"
  239. #define ENVSEP    ','
  240.  
  241. /*
  242.  * alloca already has a prototype defined - don't redefine it
  243.  */
  244. /* #define ALLOCA_PROTO    1 */
  245.  
  246. /*
  247.  * srandom already has a prototype defined - don't redefine it
  248.  */
  249. /* #define SRANDOM_PROTO    1 */
  250.  
  251. /*
  252.  * Extended source file access.
  253.  */
  254. #define DEFAULT_FILETYPE ".awk"
  255.  
  256. /*
  257.  * Pipe handling.
  258.  */
  259. #define PIPES_SIMULATED    1
  260.  
  261. /*
  262.  * %g format in VAXCRTL is broken (chooses %e format when should use %f).
  263.  */
  264. #define GFMT_WORKAROUND    1
  265.  
  266. /*
  267.  * VAX C
  268.  *
  269.  * As of V3.2, VAX C is not yet ANSI-compliant.  But it's close enough
  270.  * for GAWK's purposes.  Comment this out for VAX C V2.4 and earlier.
  271.  * Value of 0 should mean "not ANSI-C", but GAWK uses def/not-def tests.
  272.  * YYDEBUG definition is needed for combination of VAX C V2.x and Bison.
  273.  */
  274. #if defined(VAXC) && !defined(__STDC__)
  275. #define __STDC__    0
  276. #define NO_TOKEN_PASTING
  277. #ifndef __DECC    /* DEC C does not support #pragma builtins even in VAXC mode */
  278. #define VAXC_BUILTINS
  279. #endif
  280. /* #define YYDEBUG 0 */
  281. #endif
  282.  
  283. /*
  284.  * DEC C
  285.  *
  286.  * Digital's ANSI complier.
  287.  */
  288. #ifdef __DECC
  289.  /* DEC C implies DECC$SHR, which doesn't have the %g problem of VAXCRTL */
  290. #undef GFMT_WORKAROUND
  291. #endif
  292.  
  293. /*
  294.  * GNU C
  295.  *
  296.  * Versions of GCC (actually GAS) earlier than 1.38 don't produce the
  297.  * right code for ``extern const'' constructs, and other usages of
  298.  * const might not be right either.  The old set of include files from
  299.  * the gcc-vms distribution did not contain prototypes, and this could
  300.  * provoke some const-related compiler warnings.  If you've got an old
  301.  * version of gcc for VMS, define 'const' out of existance, and by all
  302.  * means obtain the most recent version!
  303.  *
  304.  * Note: old versions of GCC should also avoid defining STDC_HEADERS,
  305.  *       because most of the ANSI-C required header files are missing.
  306.  */
  307. #ifdef __GNUC__
  308. /* #define const */
  309. /* #undef STDC_HEADERS */
  310. #ifndef STDC_HEADERS
  311. #define alloca __builtin_alloca
  312. #define environ $$PsectAttributes_NOSHR$$environ    /* awful GAS kludge */
  313. #endif
  314. #endif
  315.  
  316. #ifdef STRFTIME_MISSING
  317. /*
  318.  * Always use the version of strftime() in missing/strftime.c instead of
  319.  * the [as yet undocumented/unsupported] one in VAXCRTL.  Renaming it here
  320.  * guarantees that it won't clash with the library routine.
  321.  */
  322. #define strftime gnu_strftime
  323. #endif
  324.