Declare alloca here.
authorRichard Kenner <kenner@gcc.gnu.org>
Mon, 20 Jan 1997 01:33:32 +0000 (20:33 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Mon, 20 Jan 1997 01:33:32 +0000 (20:33 -0500)
Do most of the VAX C-specific set up for DEC C.
#if DEC C, undefine QSORT_WORKAROUND and qsort.

From-SVN: r13530

gcc/config/vax/xm-vms.h

index 4b674cc442e42ddb69eee8fc3a769437853980a1..a880491d4493cbbc6546c9524526aa02bc23e82c 100644 (file)
@@ -1,5 +1,5 @@
 /* Configuration for GNU C-compiler for Vax.
-   Copyright (C) 1987, 1994, 1995, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1987, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
 
 This file is part of GNU CC.
 
@@ -22,7 +22,7 @@ Boston, MA 02111-1307, USA.  */
 #define FALSE 0
 #define TRUE 1
 
-#ifdef VAXC
+#if defined(VAXC) || defined(__DECC)
 /* if compiling with VAXC, need to fix problem with <stdio.h>
    which defines a macro called FILE_TYPE that breaks "tree.h".
    Fortunately it uses #ifndef to suppress multiple inclusions.
@@ -128,7 +128,7 @@ Boston, MA 02111-1307, USA.  */
 
 #define HAVE_VPRINTF
 \f
-#ifdef VAXC
+#if defined(VAXC) || defined(__DECC)
 /* Customizations/kludges for building with DEC's VAX C compiler
    rather than GCC.  */
 #define NO_SYS_PARAMS_H                /* don't have <sys/params.h> */
@@ -179,3 +179,24 @@ Boston, MA 02111-1307, USA.  */
 #ifdef QSORT_WORKAROUND
 #define qsort not_qsort
 #endif
+
+#ifdef __DECC
+/* DECC$SHR doesn't have VAXCRTL's bugs.  */
+#undef QSORT_WORKAROUND
+#undef qsort
+/* Avoid a lot of informational level diagnostics about implicitly
+   declared functions.  */
+#include <stdlib.h>
+#include <string.h>
+/* this is for genopinit.c */
+ #pragma message disable (undefescap)
+#endif
+
+#if defined(USE_C_ALLOCA) && !defined(alloca)
+/* Declare alloca() using similar logic to that in alloca.c.  */
+#ifdef __STDC__
+extern void *alloca(unsigned);
+#else
+extern char *alloca();
+#endif
+#endif