Jim Meyering wrote:
> You're welcome to push it.
Done.
> I don't see any value in retaining the original declaration.
The error that was reported occurred because GCC's does
#undef mktime
using ::mktime;
and that fails to compile if the original declaration is not present.
Bruno
Bruno Haible wrote:
...
> Thanks. Even more minimally:
>
> $ ./gnulib-tool --create-testdir --dir=/tmp/testdir mktime
> $ cat > foo.cc < #include
> #include
> EOF
> $ (cd /tmp/testdir && ac_cv_func_working_mktime=no ./configure && make)
> $ gcc -I/tmp/testdir -I/tmp/testdir/gllib -c
On Mon, Jul 27, 2009 at 12:04 PM, Bruno Haible wrote:
> ...
> Fix compilation error when is used and mktime is replaced.
> * lib/time.in.h (mktime): New declaration.
> * m4/mktime.m4 (gl_FUNC_MKTIME): Require gl_HEADER_TIME_H_DEFAULTS. Set
> REPLACE_MKTIME instead of
Ross McFarland wrote:
> when using gnulib's mktime test any cpp file that #includes ctime will
> receive the following errors:
>
> In file included from time.cc:6:
> /usr/include/c++/4.3/ctime:73: error: ‘::mktime’ has not been declared
> time.cc: In function ‘int main()’:
> time.cc:11: error: ‘mk
when using gnulib's mktime test any cpp file that #includes ctime will
receive the following errors:
In file included from time.cc:6:
/usr/include/c++/4.3/ctime:73: error: ‘::mktime’ has not been declared
time.cc: In function ‘int main()’:
time.cc:11: error: ‘mktime’ was not declared in this scope