home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gnuawk.zip / vms / vms-conf.h < prev    next >
C/C++ Source or Header  |  1996-12-08  |  5KB  |  167 lines

  1. /*
  2.  * config.h -- configuration definitions for gawk.
  3.  *
  4.  * For VMS (assumes V4.6 or later; tested on V5.5-2)
  5.  */
  6.  
  7. /* 
  8.  * Copyright (C) 1991, 1992, 1995, 1996 the Free Software Foundation, Inc.
  9.  * 
  10.  * This file is part of GAWK, the GNU implementation of the
  11.  * AWK Programming 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 of the License, or
  16.  * (at your option) 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 this program; if not, write to the Free Software
  25.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
  26.  */
  27.  
  28. /* Define if using alloca.c.  */
  29. #define C_ALLOCA
  30. #define STACK_DIRECTION (-1)
  31. #define REGEX_MALLOC    /* use malloc instead of alloca in regex.c */
  32.  
  33. /* Define as the return type of signal handlers (int or void).  */
  34. #define RETSIGTYPE void
  35.  
  36. #define SPRINTF_RET int
  37.  
  38. /* Define if the `getpgrp' function takes no argument.  */
  39. #define GETPGRP_VOID    1
  40.  
  41. #define HAVE_STRING_H    1    /* the <string.h> header file */
  42.  
  43. /* Define if you have the memcmp function.  */
  44. #define HAVE_MEMCMP    1
  45. /* Define if you have the memcpy function.  */
  46. #define HAVE_MEMCPY    1
  47. /* Define if you have the memset function.  */
  48. #define HAVE_MEMSET    1
  49.  
  50. /* Define if you have the strchr function.  */
  51. #define HAVE_STRCHR    1
  52.  
  53. /* Define if you have the strerror function.  */
  54. #define HAVE_STRERROR    1
  55.  
  56. /* Define if you have the strtod function.  */
  57. #define HAVE_STRTOD    1
  58.  
  59. /* Define if you have the system function.  */
  60. #define HAVE_SYSTEM    1
  61.  
  62. /* Define if you have the fmod function.  */
  63. #define HAVE_FMOD    1
  64.  
  65. /* Define if you have the tzset function.  */
  66. /* [Fake it in vms/vms_misc.c since missing/tzset.c won't compile.]  */
  67. #define HAVE_TZSET    1
  68. #define HAVE_TZNAME    1
  69.  
  70. #define STDC_HEADERS    1
  71.  
  72. #define HAVE_VPRINTF 1
  73.  
  74.  
  75. /*******************************/
  76. /* Gawk configuration options. */
  77. /*******************************/
  78.  
  79. /*
  80.  * DEFPATH
  81.  *    VMS: "/AWK_LIBRARY" => "AWK_LIBRARY:"
  82.  * The default search path for the -f option of gawk.  It is used
  83.  * if the AWKPATH environment variable is undefined.
  84.  *
  85.  * Note: OK even if no AWK_LIBRARY logical name has been defined.
  86.  */
  87.  
  88. #define DEFPATH    ".,/AWK_LIBRARY"
  89. #define ENVSEP    ','
  90.  
  91. /*
  92.  * Extended source file access.
  93.  */
  94. #define DEFAULT_FILETYPE ".awk"
  95.  
  96. /*
  97.  * Pipe handling.
  98.  */
  99. #define PIPES_SIMULATED    1
  100.  
  101. /*
  102.  * %g format in VAXCRTL is broken (chooses %e format when should use %f).
  103.  */
  104. #define GFMT_WORKAROUND    1
  105.  
  106. /*
  107.  * VAX C
  108.  *
  109.  * As of V3.2, VAX C is not yet ANSI-compliant.  But it's close enough
  110.  * for GAWK's purposes.  Comment this out for VAX C V2.4 and earlier.
  111.  * Value of 0 should mean "not ANSI-C", but GAWK uses def/not-def tests.
  112.  * YYDEBUG definition is needed for combination of VAX C V2.x and Bison.
  113.  */
  114. #if defined(VAXC) && !defined(__STDC__)
  115. #define __STDC__    0
  116. #define NO_TOKEN_PASTING
  117. #ifndef __DECC    /* DEC C does not support #pragma builtins even in VAXC mode */
  118. #define VAXC_BUILTINS
  119. #endif
  120. /* #define YYDEBUG 0 */
  121. #endif
  122.  
  123. /*
  124.  * DEC C
  125.  *
  126.  * Digital's ANSI complier.
  127.  */
  128. #ifdef __DECC
  129.  /* DEC C implies DECC$SHR, which doesn't have the %g problem of VAXCRTL */
  130. #undef GFMT_WORKAROUND
  131.  /* DEC C V5.x introduces incompatibilities with prior porting efforts */
  132. #define _DECC_V4_SOURCE
  133. #define __SOCKET_TYPEDEFS
  134. #if __VMS_VER >= 60200000
  135. # undef __VMS_VER
  136. # define __VMS_VER 60100000
  137. #endif
  138. #endif
  139.  
  140. /*
  141.  * GNU C
  142.  *
  143.  * Versions of GCC (actually GAS) earlier than 1.38 don't produce the
  144.  * right code for ``extern const'' constructs, and other usages of
  145.  * const might not be right either.  The old set of include files from
  146.  * the gcc-vms distribution did not contain prototypes, and this could
  147.  * provoke some const-related compiler warnings.  If you've got an old
  148.  * version of gcc for VMS, define 'const' out of existance, and by all
  149.  * means obtain the most recent version!
  150.  *
  151.  * Note: old versions of GCC should also avoid defining STDC_HEADERS,
  152.  *       because most of the ANSI-C required header files are missing.
  153.  */
  154. #ifdef __GNUC__
  155. /* #define const */
  156. /* #undef STDC_HEADERS */
  157. #ifndef STDC_HEADERS
  158. #define alloca __builtin_alloca
  159. #define environ $$PsectAttributes_NOSHR$$environ    /* awful GAS kludge */
  160. #endif
  161. #undef  REGEX_MALLOC    /* use true alloca() in regex.c */
  162. #endif
  163.  
  164. #define IN_CONFIG_H
  165. #include "vms/redirect.h"
  166. #undef  IN_CONFIG_H
  167.