i-bash/include/stdc.h

89 lines
2.3 KiB
C
Raw Normal View History

1996-08-26 18:22:31 +00:00
/* stdc.h -- macros to make source compile on both ANSI C and K&R C
compilers. */
/* Copyright (C) 1993 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
Bash is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
2000-03-17 21:46:59 +00:00
the Free Software Foundation; either version 2, or (at your option)
1996-08-26 18:22:31 +00:00
any later version.
Bash is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
License for more details.
You should have received a copy of the GNU General Public License
along with Bash; see the file COPYING. If not, write to the Free
2000-03-17 21:46:59 +00:00
Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
1996-08-26 18:22:31 +00:00
1996-12-23 17:02:34 +00:00
#if !defined (_STDC_H_)
#define _STDC_H_
1996-08-26 18:22:31 +00:00
/* Adapted from BSD /usr/include/sys/cdefs.h. */
/* A function can be defined using prototypes and compile on both ANSI C
and traditional C compilers with something like this:
extern char *func __P((char *, char *, int)); */
1996-12-23 17:02:34 +00:00
2000-03-17 21:46:59 +00:00
#if !defined (__P)
2002-07-17 14:10:11 +00:00
# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) || defined (PROTOTYPES)
1996-08-26 18:22:31 +00:00
# define __P(protos) protos
2000-03-17 21:46:59 +00:00
# else
# define __P(protos) ()
1996-08-26 18:22:31 +00:00
# endif
2000-03-17 21:46:59 +00:00
#endif
2001-11-13 17:56:06 +00:00
#if defined (HAVE_STRINGIZE)
1996-08-26 18:22:31 +00:00
# define __STRING(x) #x
2001-11-13 17:56:06 +00:00
#else
1996-08-26 18:22:31 +00:00
# define __STRING(x) "x"
2001-11-13 17:56:06 +00:00
#endif
#if !defined (__STDC__)
1996-08-26 18:22:31 +00:00
#if defined (__GNUC__) /* gcc with -traditional */
# if !defined (signed)
# define signed __signed
# endif
# if !defined (volatile)
# define volatile __volatile
# endif
#else /* !__GNUC__ */
# if !defined (inline)
# define inline
# endif
# if !defined (signed)
# define signed
# endif
# if !defined (volatile)
# define volatile
# endif
#endif /* !__GNUC__ */
#endif /* !__STDC__ */
2001-11-13 17:56:06 +00:00
#ifndef __attribute__
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
# define __attribute__(x)
# endif
#endif
2002-07-17 14:10:11 +00:00
/* For those situations when gcc handles inlining a particular function but
other compilers complain. */
#ifdef __GNUC__
# define INLINE inline
#else
# define INLINE
#endif
#if defined (PREFER_STDARG)
# define SH_VA_START(va, arg) va_start(va, arg)
#else
# define SH_VA_START(va, arg) va_start(va)
#endif
1996-12-23 17:02:34 +00:00
#endif /* !_STDC_H_ */