From: Bruno Haible Date: Mon, 1 Oct 2007 22:37:40 +0000 (+0200) Subject: Rename sys_time_.h to sys_time.in.h. X-Git-Tag: v0.0~156 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=4f2408532c0aba7fbf011ec2f2fef9ed39802265;p=gnulib.git Rename sys_time_.h to sys_time.in.h. --- diff --git a/ChangeLog b/ChangeLog index 0e1531933..03f9716e4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -72,6 +72,9 @@ * lib/sys_stat.in.h: Renamed from lib/sys_stat_.h. * modules/sys_stat (Files, Makefile.am): Use sys_stat.in.h instead of sys_stat_.h. + * lib/sys_time.in.h: Renamed from lib/sys_time_.h. + * modules/sys_time (Files, Makefile.am): Use sys_time.in.h instead of + sys_time_.h. 2007-09-30 Bruno Haible diff --git a/lib/sys_time.in.h b/lib/sys_time.in.h new file mode 100644 index 000000000..296d20df4 --- /dev/null +++ b/lib/sys_time.in.h @@ -0,0 +1,52 @@ +/* Provide a more complete sys/time.h. + + Copyright (C) 2007 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 + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program 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 this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + +/* Written by Paul Eggert. */ + +#if defined _GL_SYS_TIME_H + +/* Simply delegate to the system's header, without adding anything. */ +# if @HAVE_SYS_TIME_H@ +# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ +# endif + +#else + +# define _GL_SYS_TIME_H + +# if @HAVE_SYS_TIME_H@ +# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ +# else +# include +# endif + +# if ! @HAVE_STRUCT_TIMEVAL@ +struct timeval +{ + time_t tv_sec; + long int tv_usec; +}; +# endif + +# if @REPLACE_GETTIMEOFDAY@ +# undef gettimeofday +# define gettimeofday rpl_gettimeofday +int gettimeofday (struct timeval *restrict, void *restrict); +# endif + +#endif /* _GL_SYS_TIME_H */ diff --git a/lib/sys_time_.h b/lib/sys_time_.h deleted file mode 100644 index 296d20df4..000000000 --- a/lib/sys_time_.h +++ /dev/null @@ -1,52 +0,0 @@ -/* Provide a more complete sys/time.h. - - Copyright (C) 2007 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 - the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program 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 this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - -/* Written by Paul Eggert. */ - -#if defined _GL_SYS_TIME_H - -/* Simply delegate to the system's header, without adding anything. */ -# if @HAVE_SYS_TIME_H@ -# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ -# endif - -#else - -# define _GL_SYS_TIME_H - -# if @HAVE_SYS_TIME_H@ -# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ -# else -# include -# endif - -# if ! @HAVE_STRUCT_TIMEVAL@ -struct timeval -{ - time_t tv_sec; - long int tv_usec; -}; -# endif - -# if @REPLACE_GETTIMEOFDAY@ -# undef gettimeofday -# define gettimeofday rpl_gettimeofday -int gettimeofday (struct timeval *restrict, void *restrict); -# endif - -#endif /* _GL_SYS_TIME_H */ diff --git a/modules/sys_time b/modules/sys_time index 738c891d7..e261583aa 100644 --- a/modules/sys_time +++ b/modules/sys_time @@ -2,7 +2,7 @@ Description: A that conforms better to POSIX. Files: -lib/sys_time_.h +lib/sys_time.in.h m4/sys_time_h.m4 Depends-on: @@ -17,7 +17,7 @@ BUILT_SOURCES += $(SYS_TIME_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. -sys/time.h: sys_time_.h +sys/time.h: sys_time.in.h @MKDIR_P@ sys rm -f $@-t $@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ @@ -26,7 +26,7 @@ sys/time.h: sys_time_.h -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ - < $(srcdir)/sys_time_.h; \ + < $(srcdir)/sys_time.in.h; \ } > $@-t mv $@-t $@ MOSTLYCLEANFILES += sys/time.h sys/time.h-t