[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#97603: can't compile with define gnu_source on alpha with stdio and curses



On Tue, May 15, 2001 at 09:49:36PM +0200, RISKO Gergely wrote:
> Package: gcc
> Version: 1:2.95.3-7
> 
> risko@lully:~$ gcc -Wall -Werror -O2 probe.c
> cc1: warnings being treated as errors
> In file included from /usr/lib/gcc-lib/alpha-linux/2.95.4/include/stdarg.h:36,
>                  from /usr/include/curses.h:80,
> 		                  from probe.c:3:
> 		 /usr/lib/gcc-lib/alpha-linux/2.95.4/include/va-alpha.h:36: warning: redefinition of `va_list'
> 		/usr/include/stdio.h:69: warning: `va_list' previously declared here
> 
> The code is:
> #define _GNU_SOURCE
> #include <stdio.h>
> #include <curses.h>
> 
> int main()
> {
>     return 0;
>     }

>From stdio.h:

#ifdef __USE_XOPEN
# ifdef __GNUC__
#  ifndef _VA_LIST_DEFINED
typedef _G_va_list va_list;
#   define _VA_LIST_DEFINED
#  endif
# else
#  include <stdarg.h>
# endif
#endif

That doesn't make a whole lot of sense to me...  _G_config.h and
libio.h go to great lengths to get _G_va_list right, but
unconditionally typedefing va_list is bound to break.  _VA_LIST_DEFINED
gets set only in this place.

-- 
Daniel Jacobowitz                           Debian GNU/Linux Developer
Monta Vista Software                              Debian Security Team



Reply to: