X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=lib%2Fsys_time.in.h;h=b4a0e49c508abc6803d8cf4e1ecdbdf6c0021451;hb=92249085071a973e2c0621b0415b93d2e48bb00d;hp=3dbf63206675daa06604ae219ca994a8862f1ee1;hpb=d57728a6ca2413a7c564d8b7bb13d9e5a5a180f3;p=debian%2Fgzip diff --git a/lib/sys_time.in.h b/lib/sys_time.in.h index 3dbf632..b4a0e49 100644 --- a/lib/sys_time.in.h +++ b/lib/sys_time.in.h @@ -1,6 +1,6 @@ /* Provide a more complete sys/time.h. - Copyright (C) 2007-2013 Free Software Foundation, Inc. + Copyright (C) 2007-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -13,7 +13,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, see . */ + along with this program; if not, see . */ /* Written by Paul Eggert. */ @@ -24,11 +24,12 @@ #endif @PRAGMA_COLUMNS@ -/* On Cygwin, includes itself recursively via . +/* On Cygwin and on many BSDish systems, includes itself + recursively via . Simply delegate to the system's header in this case; it is a no-op. Without this extra ifdef, the C++ gettimeofday declaration below would be a forward declaration in gnulib's nested . */ -#ifdef _CYGWIN_SYS_TIME_H +#if defined _CYGWIN_SYS_TIME_H || defined _SYS_TIME_H || defined _SYS_TIME_H_ # @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ #else @@ -108,6 +109,13 @@ _GL_CXXALIAS_SYS_CAST (gettimeofday, int, (struct timeval *restrict, void *restrict)); # endif _GL_CXXALIASWARN (gettimeofday); +# if defined __cplusplus && defined GNULIB_NAMESPACE +namespace GNULIB_NAMESPACE { + typedef ::timeval +#undef timeval + timeval; +} +# endif #elif defined GNULIB_POSIXCHECK # undef gettimeofday # if HAVE_RAW_DECL_GETTIMEOFDAY