X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=readline%2Frlstdc.h;h=a6d23942af21833e0065f21b2c1842d16b9af4ec;hb=036c3acbab525e5125bf2d1f98cb041ed95e21d5;hp=08b0f89aa2e7ef80e5a466715f1187497a913cdd;hpb=d0352a18a504a4e7b761f6b3264cf11347d8d056;p=binutils-gdb.git diff --git a/readline/rlstdc.h b/readline/rlstdc.h index 08b0f89aa2e..a6d23942af2 100644 --- a/readline/rlstdc.h +++ b/readline/rlstdc.h @@ -1,23 +1,23 @@ -/* stdc.h -- macros to make source compile on both ANSI C and K&R C - compilers. */ +/* stdc.h -- macros to make source compile on both ANSI C and K&R C compilers. */ -/* Copyright (C) 1993 Free Software Foundation, Inc. +/* Copyright (C) 1993-2009 Free Software Foundation, Inc. - This file is part of GNU Bash, the Bourne Again SHell. + This file is part of the GNU Readline Library (Readline), a library + for reading lines of text with interactive input and history editing. - Bash 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) - any later version. + Readline 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 3 of the License, or + (at your option) 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. + Readline 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 - Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + along with Readline. If not, see . +*/ #if !defined (_RL_STDC_H_) #define _RL_STDC_H_ @@ -26,54 +26,20 @@ /* 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)); */ + extern char *func PARAMS((char *, char *, int)); */ -#if defined (__STDC__) - -# if !defined (__P) -# define __P(protos) protos -# endif -# define __STRING(x) #x - -# if !defined (__GNUC__) -# define inline +#if !defined (PARAMS) +# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) +# define PARAMS(protos) protos +# else +# define PARAMS(protos) () # endif +#endif -#else /* !__STDC__ */ - -# if !defined (__P) -# define __P(protos) () -# endif -# define __STRING(x) "x" - -#if defined (__GNUC__) /* gcc with -traditional */ -# if !defined (const) -# define const __const -# endif -# if !defined (inline) -# define inline __inline +#ifndef __attribute__ +# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) +# define __attribute__(x) # endif -# if !defined (signed) -# define signed __signed -# endif -# if !defined (volatile) -# define volatile __volatile -# endif -#else /* !__GNUC__ */ -# if !defined (const) -# define const -# endif -# if !defined (inline) -# define inline -# endif -# if !defined (signed) -# define signed -# endif -# if !defined (volatile) -# define volatile -# endif -#endif /* !__GNUC__ */ - -#endif /* !__STDC__ */ +#endif #endif /* !_RL_STDC_H_ */