bug-gnulib
[Top][All Lists]
Advanced

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

Re: gettime build failure with recent gnulib for mingw systems


From: Bruno Haible
Subject: Re: gettime build failure with recent gnulib for mingw systems
Date: Fri, 19 Jun 2009 23:47:27 +0200
User-agent: KMail/1.9.9

Mike Frysinger wrote:
> i upgraded gnulib in a project recently and started getting failures in
> gettime.c when building with a mingw32 toolchain

On the other hand, a gnulib testdir, created through
  ./gnulib-tool --create-testdir --dir=$HOME/data/tmp/testdir8 --with-tests 
gettime
builds fine on mingw and passes its unit tests.

> here is the build output (/proj/ is a truncated path to make reading easier):
> if i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I. -I/proj/gnulib/lib -I../..     -g
> -O2 -Wall -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual
> -Wcast-align -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes
> -Wmissing-declarations -Wnested-externs -Winline -Wno-unused-function
> -I/usr/local/src/blackfin/toolchains/win32/20090618/libftdi/destdir/include
> -MT gettime.o -MD -MP -MF ".deps/gettime.Tpo" -c -o gettime.o
> /proj/gnulib/lib/gettime.c; \
>         then mv -f ".deps/gettime.Tpo" ".deps/gettime.Po"; else rm -f
> ".deps/gettime.Tpo"; exit 1; fi
> In file included from /proj/gnulib/lib/gettime.c:22:
> /proj/gnulib/lib/timespec.h:26: warning: "struct timespec" declared inside 
> parameter list
> /proj/gnulib/lib/timespec.h:26: warning: its scope is only this definition or 
> declaration, which is probably not what you want

lib/timespec.h includes <time.h>, which is supposed to define 'struct timespec'.

The config.log that you sent contains
  SYS_TIME_H_DEFINES_STRUCT_TIMESPEC='0'
  TIME_H_DEFINES_STRUCT_TIMESPEC='0'
These two definitions together should ensure that gnulib's generated time.h
file defines 'struct timespec'.

Please take a look at your gnulib-generated time.h.
  - Is it present at all?
  - Does it contain an enabled definition of 'struct timespec'?
  - Is it actually being included by gettime.c (look at the preprocessed 
output)?

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]