From: Chris Hanson Date: Sun, 8 Oct 1995 15:31:46 +0000 (+0000) Subject: Test __IBMC__ in addition to __STDC__ because the IBM OS/2 C compiler X-Git-Tag: 20090517-FFI~5909 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=23a1feafd10fc012ef2bf12355f69da4712276be;p=mit-scheme.git Test __IBMC__ in addition to __STDC__ because the IBM OS/2 C compiler defines __STDC__ to mean "strict ANSI" rather than "ANSI features supported". --- diff --git a/v7/src/microcode/ansidecl.h b/v7/src/microcode/ansidecl.h index 100781a8b..6075b9f16 100644 --- a/v7/src/microcode/ansidecl.h +++ b/v7/src/microcode/ansidecl.h @@ -1,6 +1,8 @@ /* Copyright (C) 1990 Free Software Foundation, Inc. This file is part of the GNU C Library. +$Id: ansidecl.h,v 1.4 1995/10/08 15:29:45 cph Exp $ + The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) @@ -52,8 +54,16 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ so they will all get the switch for lint. */ /* LINTLIBRARY */ +/* We must test for __IBMC__ everywhere that we test for __STDC__ + because the IBM C compiler for OS/2 does not define __STDC__ even + though it is an ANSI C compiler. The compiler defines __STDC__ + only when the compiler is put into "strict ANSI" mode, in which + numerous useful features are disabled. It used to be the case that + this could be fixed by forcibly defining __STDC__, but as of + version 3.0 that is no longer allowed. What these fascists hope to + gain by this, besides angering programmers, is unclear. */ -#ifdef __STDC__ +#if defined(__STDC__) || defined(__IBMC__) #define PTR void * #define PTRCONST void *CONST diff --git a/v7/src/microcode/outf.c b/v7/src/microcode/outf.c index 6c4b3bb1b..cf03dcdd7 100644 --- a/v7/src/microcode/outf.c +++ b/v7/src/microcode/outf.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: outf.c,v 1.7 1995/04/28 07:05:10 cph Exp $ +$Id: outf.c,v 1.8 1995/10/08 15:30:29 cph Exp $ -Copyright (c) 1993-94 Massachusetts Institute of Technology +Copyright (c) 1993-95 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -54,7 +54,7 @@ MIT in each case. */ information to stay visible `after' the termination of Scheme. */ -#if defined(__STDC__) || defined(WINNT) +#if defined(__STDC__) || defined(WINNT) || defined(__IBMC__) #include #define VA_START(args, lastarg) va_start(args, lastarg) #define VA_DCL diff --git a/v8/src/microcode/cmpint.c b/v8/src/microcode/cmpint.c index 1df64fa8e..ee8464c7c 100644 --- a/v8/src/microcode/cmpint.c +++ b/v8/src/microcode/cmpint.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: cmpint.c,v 1.86 1995/10/05 03:27:42 cph Exp $ +$Id: cmpint.c,v 1.87 1995/10/08 15:31:46 cph Exp $ Copyright (c) 1989-1995 Massachusetts Institute of Technology @@ -151,7 +151,7 @@ MIT in each case. */ #define ASM_ENTRY_POINT(name) name #endif -#ifdef __STDC__ +#if defined(__STDC__) || defined(__IBMC__) #define EXFNX(name, proto) ASM_ENTRY_POINT (name) proto #define DEFNX(name, arglist, args) ASM_ENTRY_POINT (name) (args) #define DEFNX_VOID(name) ASM_ENTRY_POINT (name) (void)