mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
updated gnulib
This commit is contained in:
@@ -21,9 +21,9 @@
|
||||
# the same distribution terms as the rest of that program.
|
||||
#
|
||||
# Generated by gnulib-tool.
|
||||
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --no-conditional-dependencies --no-libtool --macro-prefix=gl c-ctype cloexec getline getpass gettime memmem minmax
|
||||
# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --lgpl=2 --no-conditional-dependencies --no-libtool --macro-prefix=gl c-ctype cloexec getline getpass memmem minmax
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.5 gnits
|
||||
AUTOMAKE_OPTIONS = 1.9.6 gnits
|
||||
|
||||
SUBDIRS =
|
||||
noinst_HEADERS =
|
||||
@@ -230,21 +230,6 @@ EXTRA_libgnu_a_SOURCES += getpass.c
|
||||
|
||||
## end gnulib module getpass
|
||||
|
||||
## begin gnulib module gettime
|
||||
|
||||
libgnu_a_SOURCES += gettime.c
|
||||
|
||||
## end gnulib module gettime
|
||||
|
||||
## begin gnulib module gettimeofday
|
||||
|
||||
|
||||
EXTRA_DIST += gettimeofday.c
|
||||
|
||||
EXTRA_libgnu_a_SOURCES += gettimeofday.c
|
||||
|
||||
## end gnulib module gettimeofday
|
||||
|
||||
## begin gnulib module lseek
|
||||
|
||||
|
||||
@@ -900,40 +885,6 @@ EXTRA_DIST += sys_stat.in.h
|
||||
|
||||
## end gnulib module sys_stat
|
||||
|
||||
## begin gnulib module sys_time
|
||||
|
||||
BUILT_SOURCES += sys/time.h
|
||||
|
||||
# We need the following in order to create <sys/time.h> when the system
|
||||
# doesn't have one that works with the given compiler.
|
||||
sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
|
||||
$(AM_V_at)$(MKDIR_P) sys
|
||||
$(AM_V_GEN)rm -f $@-t $@ && \
|
||||
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
|
||||
sed -e 's|@''GUARD_PREFIX''@|GL|g' \
|
||||
-e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \
|
||||
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
|
||||
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
|
||||
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
|
||||
-e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \
|
||||
-e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \
|
||||
-e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
|
||||
-e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \
|
||||
-e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \
|
||||
-e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \
|
||||
-e 's/@''REPLACE_STRUCT_TIMEVAL''@/$(REPLACE_STRUCT_TIMEVAL)/g' \
|
||||
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
|
||||
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
|
||||
-e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
|
||||
< $(srcdir)/sys_time.in.h; \
|
||||
} > $@-t && \
|
||||
mv $@-t $@
|
||||
MOSTLYCLEANFILES += sys/time.h sys/time.h-t
|
||||
|
||||
EXTRA_DIST += sys_time.in.h
|
||||
|
||||
## end gnulib module sys_time
|
||||
|
||||
## begin gnulib module sys_types
|
||||
|
||||
BUILT_SOURCES += sys/types.h
|
||||
@@ -1001,14 +952,6 @@ EXTRA_DIST += time.in.h
|
||||
|
||||
## end gnulib module time
|
||||
|
||||
## begin gnulib module timespec
|
||||
|
||||
libgnu_a_SOURCES += timespec.c
|
||||
|
||||
EXTRA_DIST += timespec.h
|
||||
|
||||
## end gnulib module timespec
|
||||
|
||||
## begin gnulib module unistd
|
||||
|
||||
BUILT_SOURCES += unistd.h
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
Copyright 2000-2003, 2006, 2009-2013 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 3 of the License, or
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
Copyright (C) 2000-2003, 2006, 2008-2013 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 3 of the License, or
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef C_CTYPE_H
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
Copyright (C) 1991, 2004-2006, 2009-2013 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 3 of the License, or
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
The code is taken from glibc/manual/llio.texi */
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
Copyright (C) 2004, 2009-2013 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 3 of the License, or
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
*/
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
Copyright (C) 2008-2013 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 3 of the License, or
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
Copyright (C) 1999, 2004-2007, 2009-2013 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 3 of the License, or
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* written by Paul Eggert */
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
Copyright (C) 2008-2013 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 3, or (at your option)
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _@GUARD_PREFIX@_ERRNO_H
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
Copyright (C) 2009-2013 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 3 of the License, or
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Eric Blake <ebb9@byu.net>. */
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
Copyright (C) 2006-2013 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 3 of the License, or
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* written by Paul Eggert */
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
Written by Bruno Haible <bruno@clisp.org>, 2009.
|
||||
|
||||
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 3 of the License, or
|
||||
under the terms of the GNU Lesser General Public License as published
|
||||
by the Free Software Foundation; either version 2.1 of the License, 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.
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
Copyright (C) 2009-2013 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 3 of the License, or
|
||||
under the terms of the GNU Lesser General Public License as published
|
||||
by the Free Software Foundation; either version 2.1 of the License, 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.
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
Copyright (C) 2007, 2009-2013 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 3 of the License, or
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
Copyright (C) 2007-2013 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 3, or (at your option)
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
You should have received a copy of the GNU Lesser General Public License along
|
||||
with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
Copyright (C) 2011-2013 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 3 of the License, or
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* If the user's config.h happens to include <sys/stat.h>, let it include only
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
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 3, or (at
|
||||
modify it under the terms of the GNU Lesser General Public License as
|
||||
published by the Free Software Foundation; either version 2.1, 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.
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Ported from glibc by Simon Josefsson. */
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
Written by Bruno Haible <bruno@clisp.org>, 2008.
|
||||
|
||||
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 3 of the License, or
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
Copyright (C) 2005-2007, 2009-2013 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 3, or (at
|
||||
modify it under the terms of the GNU Lesser General Public License as
|
||||
published by the Free Software Foundation; either version 2.1, 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.
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Simon Josefsson. */
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
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 3, or (at your option)
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
You should have received a copy of the GNU Lesser General Public License along
|
||||
with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _LIBC
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
Contributed by Simon Josefsson <jas@extundo.com>, 2004.
|
||||
|
||||
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 3, or (at your option)
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef GETPASS_H
|
||||
|
||||
48
gl/gettime.c
48
gl/gettime.c
@@ -1,48 +0,0 @@
|
||||
/* gettime -- get the system clock
|
||||
|
||||
Copyright (C) 2002, 2004-2007, 2009-2013 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 3 of the License, 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, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Paul Eggert. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "timespec.h"
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
/* Get the system time into *TS. */
|
||||
|
||||
void
|
||||
gettime (struct timespec *ts)
|
||||
{
|
||||
#if HAVE_NANOTIME
|
||||
nanotime (ts);
|
||||
#else
|
||||
|
||||
# if defined CLOCK_REALTIME && HAVE_CLOCK_GETTIME
|
||||
if (clock_gettime (CLOCK_REALTIME, ts) == 0)
|
||||
return;
|
||||
# endif
|
||||
|
||||
{
|
||||
struct timeval tv;
|
||||
gettimeofday (&tv, NULL);
|
||||
ts->tv_sec = tv.tv_sec;
|
||||
ts->tv_nsec = tv.tv_usec * 1000;
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
@@ -1,154 +0,0 @@
|
||||
/* Provide gettimeofday for systems that don't have it or for which it's broken.
|
||||
|
||||
Copyright (C) 2001-2003, 2005-2007, 2009-2013 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 3, 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, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* written by Jim Meyering */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/* Specification. */
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#if HAVE_SYS_TIMEB_H
|
||||
# include <sys/timeb.h>
|
||||
#endif
|
||||
|
||||
#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME
|
||||
|
||||
/* Work around the bug in some systems whereby gettimeofday clobbers
|
||||
the static buffer that localtime uses for its return value. The
|
||||
gettimeofday function from Mac OS X 10.0.4 (i.e., Darwin 1.3.7) has
|
||||
this problem. The tzset replacement is necessary for at least
|
||||
Solaris 2.5, 2.5.1, and 2.6. */
|
||||
|
||||
static struct tm tm_zero_buffer;
|
||||
static struct tm *localtime_buffer_addr = &tm_zero_buffer;
|
||||
|
||||
# undef localtime
|
||||
extern struct tm *localtime (time_t const *);
|
||||
|
||||
# undef gmtime
|
||||
extern struct tm *gmtime (time_t const *);
|
||||
|
||||
/* This is a wrapper for localtime. It is used only on systems for which
|
||||
gettimeofday clobbers the static buffer used for localtime's result.
|
||||
|
||||
On the first call, record the address of the static buffer that
|
||||
localtime uses for its result. */
|
||||
|
||||
struct tm *
|
||||
rpl_localtime (time_t const *timep)
|
||||
{
|
||||
struct tm *tm = localtime (timep);
|
||||
|
||||
if (localtime_buffer_addr == &tm_zero_buffer)
|
||||
localtime_buffer_addr = tm;
|
||||
|
||||
return tm;
|
||||
}
|
||||
|
||||
/* Same as above, since gmtime and localtime use the same buffer. */
|
||||
struct tm *
|
||||
rpl_gmtime (time_t const *timep)
|
||||
{
|
||||
struct tm *tm = gmtime (timep);
|
||||
|
||||
if (localtime_buffer_addr == &tm_zero_buffer)
|
||||
localtime_buffer_addr = tm;
|
||||
|
||||
return tm;
|
||||
}
|
||||
|
||||
#endif /* GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME */
|
||||
|
||||
#if TZSET_CLOBBERS_LOCALTIME
|
||||
|
||||
# undef tzset
|
||||
extern void tzset (void);
|
||||
|
||||
/* This is a wrapper for tzset, for systems on which tzset may clobber
|
||||
the static buffer used for localtime's result. */
|
||||
void
|
||||
rpl_tzset (void)
|
||||
{
|
||||
/* Save and restore the contents of the buffer used for localtime's
|
||||
result around the call to tzset. */
|
||||
struct tm save = *localtime_buffer_addr;
|
||||
tzset ();
|
||||
*localtime_buffer_addr = save;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* This is a wrapper for gettimeofday. It is used only on systems
|
||||
that lack this function, or whose implementation of this function
|
||||
causes problems. */
|
||||
|
||||
int
|
||||
gettimeofday (struct timeval *restrict tv, void *restrict tz)
|
||||
{
|
||||
#undef gettimeofday
|
||||
#if HAVE_GETTIMEOFDAY
|
||||
# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
|
||||
/* Save and restore the contents of the buffer used for localtime's
|
||||
result around the call to gettimeofday. */
|
||||
struct tm save = *localtime_buffer_addr;
|
||||
# endif
|
||||
|
||||
# if defined timeval /* 'struct timeval' overridden by gnulib? */
|
||||
# undef timeval
|
||||
struct timeval otv;
|
||||
int result = gettimeofday (&otv, (struct timezone *) tz);
|
||||
if (result == 0)
|
||||
{
|
||||
tv->tv_sec = otv.tv_sec;
|
||||
tv->tv_usec = otv.tv_usec;
|
||||
}
|
||||
# else
|
||||
int result = gettimeofday (tv, (struct timezone *) tz);
|
||||
# endif
|
||||
|
||||
# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
|
||||
*localtime_buffer_addr = save;
|
||||
# endif
|
||||
|
||||
return result;
|
||||
|
||||
#else
|
||||
|
||||
# if HAVE__FTIME
|
||||
|
||||
struct _timeb timebuf;
|
||||
_ftime (&timebuf);
|
||||
tv->tv_sec = timebuf.time;
|
||||
tv->tv_usec = timebuf.millitm * 1000;
|
||||
|
||||
# else
|
||||
|
||||
# if !defined OK_TO_USE_1S_CLOCK
|
||||
# error "Only 1-second nominal clock resolution found. Is that intended?" \
|
||||
"If so, compile with the -DOK_TO_USE_1S_CLOCK option."
|
||||
# endif
|
||||
tv->tv_sec = time (NULL);
|
||||
tv->tv_usec = 0;
|
||||
|
||||
# endif
|
||||
|
||||
return 0;
|
||||
|
||||
#endif
|
||||
}
|
||||
@@ -2,16 +2,16 @@
|
||||
Copyright (C) 2007, 2009-2013 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 3, or (at your option)
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
You should have received a copy of the GNU Lesser General Public License along
|
||||
with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
# clock_time.m4 serial 10
|
||||
dnl Copyright (C) 2002-2006, 2009-2013 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# Check for clock_gettime and clock_settime, and set LIB_CLOCK_GETTIME.
|
||||
# For a program named, say foo, you should add a line like the following
|
||||
# in the corresponding Makefile.am file:
|
||||
# foo_LDADD = $(LDADD) $(LIB_CLOCK_GETTIME)
|
||||
|
||||
AC_DEFUN([gl_CLOCK_TIME],
|
||||
[
|
||||
dnl Persuade glibc and Solaris <time.h> to declare these functions.
|
||||
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
|
||||
|
||||
# Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
|
||||
# Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
|
||||
|
||||
# Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
|
||||
# programs in the package would end up linked with that potentially-shared
|
||||
# library, inducing unnecessary run-time overhead.
|
||||
LIB_CLOCK_GETTIME=
|
||||
AC_SUBST([LIB_CLOCK_GETTIME])
|
||||
gl_saved_libs=$LIBS
|
||||
AC_SEARCH_LIBS([clock_gettime], [rt posix4],
|
||||
[test "$ac_cv_search_clock_gettime" = "none required" ||
|
||||
LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])
|
||||
AC_CHECK_FUNCS([clock_gettime clock_settime])
|
||||
LIBS=$gl_saved_libs
|
||||
])
|
||||
@@ -6,7 +6,7 @@
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
|
||||
# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from git
|
||||
# Autoconf. Perhaps we can remove this once we can assume Autoconf
|
||||
# 2.70 or later everywhere, but since Autoconf mutates rapidly
|
||||
# enough in this area it's likely we'll need to redefine
|
||||
|
||||
@@ -21,13 +21,21 @@ AC_DEFUN([gl_EXTERN_INLINE],
|
||||
Suppress extern inline with HP-UX cc, as it appears to be broken; see
|
||||
<http://lists.gnu.org/archive/html/bug-texinfo/2013-02/msg00030.html>.
|
||||
|
||||
Suppress the use of extern inline on Apple's platforms,
|
||||
as Libc-825.25 (2012-09-19) is incompatible with it; see
|
||||
Suppress extern inline with Sun C in standards-conformance mode, as it
|
||||
mishandles inline functions that call each other. E.g., for 'inline void f
|
||||
(void) { } inline void g (void) { f (); }', c99 incorrectly complains
|
||||
'reference to static identifier "f" in extern inline function'.
|
||||
This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
|
||||
|
||||
Suppress the use of extern inline on Apple's platforms, as Libc at least
|
||||
through Libc-825.26 (2013-04-09) is incompatible with it; see, e.g.,
|
||||
<http://lists.gnu.org/archive/html/bug-gnulib/2012-12/msg00023.html>.
|
||||
Perhaps Apple will fix this some day. */
|
||||
#if ((__GNUC__ \
|
||||
? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
|
||||
: 199901L <= __STDC_VERSION__ && !defined __HP_cc) \
|
||||
: (199901L <= __STDC_VERSION__ \
|
||||
&& !defined __HP_cc \
|
||||
&& !(defined __SUNPRO_C && __STDC__))) \
|
||||
&& !defined __APPLE__)
|
||||
# define _GL_INLINE inline
|
||||
# define _GL_EXTERN_INLINE extern inline
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
# gettime.m4 serial 8
|
||||
dnl Copyright (C) 2002, 2004-2006, 2009-2013 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
AC_DEFUN([gl_GETTIME],
|
||||
[
|
||||
dnl Prerequisites of lib/gettime.c.
|
||||
AC_REQUIRE([gl_CLOCK_TIME])
|
||||
AC_REQUIRE([gl_TIMESPEC])
|
||||
AC_CHECK_FUNCS_ONCE([gettimeofday nanotime])
|
||||
])
|
||||
@@ -1,140 +0,0 @@
|
||||
# serial 20
|
||||
|
||||
# Copyright (C) 2001-2003, 2005, 2007, 2009-2013 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Jim Meyering.
|
||||
|
||||
AC_DEFUN([gl_FUNC_GETTIMEOFDAY],
|
||||
[
|
||||
AC_REQUIRE([AC_C_RESTRICT])
|
||||
AC_REQUIRE([gl_HEADER_SYS_TIME_H])
|
||||
AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS])
|
||||
AC_CHECK_FUNCS_ONCE([gettimeofday])
|
||||
|
||||
gl_gettimeofday_timezone=void
|
||||
if test $ac_cv_func_gettimeofday != yes; then
|
||||
HAVE_GETTIMEOFDAY=0
|
||||
else
|
||||
gl_FUNC_GETTIMEOFDAY_CLOBBER
|
||||
AC_CACHE_CHECK([for gettimeofday with POSIX signature],
|
||||
[gl_cv_func_gettimeofday_posix_signature],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <sys/time.h>
|
||||
struct timeval c;
|
||||
int gettimeofday (struct timeval *restrict, void *restrict);
|
||||
]],
|
||||
[[/* glibc uses struct timezone * rather than the POSIX void *
|
||||
if _GNU_SOURCE is defined. However, since the only portable
|
||||
use of gettimeofday uses NULL as the second parameter, and
|
||||
since the glibc definition is actually more typesafe, it is
|
||||
not worth wrapping this to get a compliant signature. */
|
||||
int (*f) (struct timeval *restrict, void *restrict)
|
||||
= gettimeofday;
|
||||
int x = f (&c, 0);
|
||||
return !(x | c.tv_sec | c.tv_usec);
|
||||
]])],
|
||||
[gl_cv_func_gettimeofday_posix_signature=yes],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <sys/time.h>
|
||||
int gettimeofday (struct timeval *restrict, struct timezone *restrict);
|
||||
]])],
|
||||
[gl_cv_func_gettimeofday_posix_signature=almost],
|
||||
[gl_cv_func_gettimeofday_posix_signature=no])])])
|
||||
if test $gl_cv_func_gettimeofday_posix_signature = almost; then
|
||||
gl_gettimeofday_timezone='struct timezone'
|
||||
elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
|
||||
REPLACE_GETTIMEOFDAY=1
|
||||
fi
|
||||
dnl If we override 'struct timeval', we also have to override gettimeofday.
|
||||
if test $REPLACE_STRUCT_TIMEVAL = 1; then
|
||||
REPLACE_GETTIMEOFDAY=1
|
||||
fi
|
||||
m4_ifdef([gl_FUNC_TZSET_CLOBBER], [
|
||||
gl_FUNC_TZSET_CLOBBER
|
||||
case "$gl_cv_func_tzset_clobber" in
|
||||
*yes)
|
||||
REPLACE_GETTIMEOFDAY=1
|
||||
gl_GETTIMEOFDAY_REPLACE_LOCALTIME
|
||||
AC_DEFINE([tzset], [rpl_tzset],
|
||||
[Define to rpl_tzset if the wrapper function should be used.])
|
||||
AC_DEFINE([TZSET_CLOBBERS_LOCALTIME], [1],
|
||||
[Define if tzset clobbers localtime's static buffer.])
|
||||
;;
|
||||
esac
|
||||
])
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([GETTIMEOFDAY_TIMEZONE], [$gl_gettimeofday_timezone],
|
||||
[Define this to 'void' or 'struct timezone' to match the system's
|
||||
declaration of the second argument to gettimeofday.])
|
||||
])
|
||||
|
||||
|
||||
dnl See if gettimeofday clobbers the static buffer that localtime uses
|
||||
dnl for its return value. The gettimeofday function from Mac OS X 10.0.4
|
||||
dnl (i.e., Darwin 1.3.7) has this problem.
|
||||
dnl
|
||||
dnl If it does, then arrange to use gettimeofday and localtime only via
|
||||
dnl the wrapper functions that work around the problem.
|
||||
|
||||
AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
|
||||
[
|
||||
AC_REQUIRE([gl_HEADER_SYS_TIME_H])
|
||||
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
|
||||
|
||||
AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer],
|
||||
[gl_cv_func_gettimeofday_clobber],
|
||||
[AC_RUN_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#include <string.h>
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
#include <stdlib.h>
|
||||
]],
|
||||
[[
|
||||
time_t t = 0;
|
||||
struct tm *lt;
|
||||
struct tm saved_lt;
|
||||
struct timeval tv;
|
||||
lt = localtime (&t);
|
||||
saved_lt = *lt;
|
||||
gettimeofday (&tv, NULL);
|
||||
return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
|
||||
]])],
|
||||
[gl_cv_func_gettimeofday_clobber=no],
|
||||
[gl_cv_func_gettimeofday_clobber=yes],
|
||||
[# When cross-compiling:
|
||||
case "$host_os" in
|
||||
# Guess all is fine on glibc systems.
|
||||
*-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
|
||||
# If we don't know, assume the worst.
|
||||
*) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
|
||||
esac
|
||||
])])
|
||||
|
||||
case "$gl_cv_func_gettimeofday_clobber" in
|
||||
*yes)
|
||||
REPLACE_GETTIMEOFDAY=1
|
||||
gl_GETTIMEOFDAY_REPLACE_LOCALTIME
|
||||
AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1],
|
||||
[Define if gettimeofday clobbers the localtime buffer.])
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [
|
||||
AC_DEFINE([gmtime], [rpl_gmtime],
|
||||
[Define to rpl_gmtime if the replacement function should be used.])
|
||||
AC_DEFINE([localtime], [rpl_localtime],
|
||||
[Define to rpl_localtime if the replacement function should be used.])
|
||||
])
|
||||
|
||||
# Prerequisites of lib/gettimeofday.c.
|
||||
AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [
|
||||
AC_CHECK_HEADERS([sys/timeb.h])
|
||||
AC_CHECK_FUNCS([_ftime])
|
||||
])
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
|
||||
# Specification in the form of a command-line invocation:
|
||||
# gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --no-conditional-dependencies --no-libtool --macro-prefix=gl c-ctype cloexec getline getpass gettime memmem minmax
|
||||
# gnulib-tool --import --dir=. --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --lgpl=2 --no-conditional-dependencies --no-libtool --macro-prefix=gl c-ctype cloexec getline getpass memmem minmax
|
||||
|
||||
# Specification in the form of a few gnulib-tool.m4 macro invocations:
|
||||
gl_LOCAL_DIR([])
|
||||
@@ -36,7 +36,6 @@ gl_MODULES([
|
||||
cloexec
|
||||
getline
|
||||
getpass
|
||||
gettime
|
||||
memmem
|
||||
minmax
|
||||
])
|
||||
@@ -47,6 +46,7 @@ gl_PO_BASE([])
|
||||
gl_DOC_BASE([doc])
|
||||
gl_TESTS_BASE([gl/tests])
|
||||
gl_LIB([libgnu])
|
||||
gl_LGPL([2])
|
||||
gl_MAKEFILE_NAME([])
|
||||
gl_MACRO_PREFIX([gl])
|
||||
gl_PO_DOMAIN([])
|
||||
|
||||
@@ -39,7 +39,6 @@ AC_DEFUN([gl_EARLY],
|
||||
m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
|
||||
AC_REQUIRE([gl_PROG_AR_RANLIB])
|
||||
# Code from module c-ctype:
|
||||
# Code from module clock-time:
|
||||
# Code from module cloexec:
|
||||
# Code from module close:
|
||||
# Code from module dup2:
|
||||
@@ -58,8 +57,6 @@ AC_DEFUN([gl_EARLY],
|
||||
# Code from module getdtablesize:
|
||||
# Code from module getline:
|
||||
# Code from module getpass:
|
||||
# Code from module gettime:
|
||||
# Code from module gettimeofday:
|
||||
# Code from module include_next:
|
||||
# Code from module largefile:
|
||||
AC_REQUIRE([AC_SYS_LARGEFILE])
|
||||
@@ -86,10 +83,8 @@ AC_DEFUN([gl_EARLY],
|
||||
# Code from module strdup-posix:
|
||||
# Code from module string:
|
||||
# Code from module sys_stat:
|
||||
# Code from module sys_time:
|
||||
# Code from module sys_types:
|
||||
# Code from module time:
|
||||
# Code from module timespec:
|
||||
# Code from module unistd:
|
||||
])
|
||||
|
||||
@@ -109,7 +104,6 @@ AC_DEFUN([gl_INIT],
|
||||
m4_pushdef([gl_LIBSOURCES_DIR], [])
|
||||
gl_COMMON
|
||||
gl_source_base='gl'
|
||||
gl_CLOCK_TIME
|
||||
gl_MODULE_INDICATOR_FOR_TESTS([cloexec])
|
||||
gl_FUNC_CLOSE
|
||||
if test $REPLACE_CLOSE = 1; then
|
||||
@@ -170,13 +164,6 @@ AC_DEFUN([gl_INIT],
|
||||
AC_LIBOBJ([getpass])
|
||||
gl_PREREQ_GETPASS
|
||||
fi
|
||||
gl_GETTIME
|
||||
gl_FUNC_GETTIMEOFDAY
|
||||
if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
|
||||
AC_LIBOBJ([gettimeofday])
|
||||
gl_PREREQ_GETTIMEOFDAY
|
||||
fi
|
||||
gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
|
||||
AC_REQUIRE([gl_LARGEFILE])
|
||||
gl_FUNC_LSEEK
|
||||
if test $REPLACE_LSEEK = 1; then
|
||||
@@ -233,12 +220,9 @@ AC_DEFUN([gl_INIT],
|
||||
gl_HEADER_STRING_H
|
||||
gl_HEADER_SYS_STAT_H
|
||||
AC_PROG_MKDIR_P
|
||||
gl_HEADER_SYS_TIME_H
|
||||
AC_PROG_MKDIR_P
|
||||
gl_SYS_TYPES_H
|
||||
AC_PROG_MKDIR_P
|
||||
gl_HEADER_TIME_H
|
||||
gl_TIMESPEC
|
||||
gl_UNISTD_H
|
||||
# End of code from modules
|
||||
m4_ifval(gl_LIBSOURCES_LIST, [
|
||||
@@ -403,8 +387,6 @@ AC_DEFUN([gl_FILE_LIST], [
|
||||
lib/getline.c
|
||||
lib/getpass.c
|
||||
lib/getpass.h
|
||||
lib/gettime.c
|
||||
lib/gettimeofday.c
|
||||
lib/lseek.c
|
||||
lib/malloc.c
|
||||
lib/memchr.c
|
||||
@@ -426,15 +408,11 @@ AC_DEFUN([gl_FILE_LIST], [
|
||||
lib/strdup.c
|
||||
lib/string.in.h
|
||||
lib/sys_stat.in.h
|
||||
lib/sys_time.in.h
|
||||
lib/sys_types.in.h
|
||||
lib/time.in.h
|
||||
lib/timespec.c
|
||||
lib/timespec.h
|
||||
lib/unistd.c
|
||||
lib/unistd.in.h
|
||||
m4/00gnulib.m4
|
||||
m4/clock_time.m4
|
||||
m4/close.m4
|
||||
m4/dup2.m4
|
||||
m4/errno_h.m4
|
||||
@@ -450,8 +428,6 @@ AC_DEFUN([gl_FILE_LIST], [
|
||||
m4/getdtablesize.m4
|
||||
m4/getline.m4
|
||||
m4/getpass.m4
|
||||
m4/gettime.m4
|
||||
m4/gettimeofday.m4
|
||||
m4/gnulib-common.m4
|
||||
m4/include_next.m4
|
||||
m4/largefile.m4
|
||||
@@ -475,12 +451,9 @@ AC_DEFUN([gl_FILE_LIST], [
|
||||
m4/stdlib_h.m4
|
||||
m4/strdup.m4
|
||||
m4/string_h.m4
|
||||
m4/sys_socket_h.m4
|
||||
m4/sys_stat_h.m4
|
||||
m4/sys_time_h.m4
|
||||
m4/sys_types_h.m4
|
||||
m4/time_h.m4
|
||||
m4/timespec.m4
|
||||
m4/unistd_h.m4
|
||||
m4/warn-on-use.m4
|
||||
m4/wchar_t.m4
|
||||
|
||||
@@ -1,176 +0,0 @@
|
||||
# sys_socket_h.m4 serial 23
|
||||
dnl Copyright (C) 2005-2013 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Simon Josefsson.
|
||||
|
||||
AC_DEFUN([gl_HEADER_SYS_SOCKET],
|
||||
[
|
||||
AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
|
||||
dnl On OSF/1, the functions recv(), send(), recvfrom(), sendto() have
|
||||
dnl old-style declarations (with return type 'int' instead of 'ssize_t')
|
||||
dnl unless _POSIX_PII_SOCKET is defined.
|
||||
case "$host_os" in
|
||||
osf*)
|
||||
AC_DEFINE([_POSIX_PII_SOCKET], [1],
|
||||
[Define to 1 in order to get the POSIX compatible declarations
|
||||
of socket functions.])
|
||||
;;
|
||||
esac
|
||||
|
||||
AC_CACHE_CHECK([whether <sys/socket.h> is self-contained],
|
||||
[gl_cv_header_sys_socket_h_selfcontained],
|
||||
[
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]], [[]])],
|
||||
[gl_cv_header_sys_socket_h_selfcontained=yes],
|
||||
[gl_cv_header_sys_socket_h_selfcontained=no])
|
||||
])
|
||||
if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
|
||||
dnl If the shutdown function exists, <sys/socket.h> should define
|
||||
dnl SHUT_RD, SHUT_WR, SHUT_RDWR.
|
||||
AC_CHECK_FUNCS([shutdown])
|
||||
if test $ac_cv_func_shutdown = yes; then
|
||||
AC_CACHE_CHECK([whether <sys/socket.h> defines the SHUT_* macros],
|
||||
[gl_cv_header_sys_socket_h_shut],
|
||||
[
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include <sys/socket.h>]],
|
||||
[[int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };]])],
|
||||
[gl_cv_header_sys_socket_h_shut=yes],
|
||||
[gl_cv_header_sys_socket_h_shut=no])
|
||||
])
|
||||
if test $gl_cv_header_sys_socket_h_shut = no; then
|
||||
SYS_SOCKET_H='sys/socket.h'
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
# We need to check for ws2tcpip.h now.
|
||||
gl_PREREQ_SYS_H_SOCKET
|
||||
AC_CHECK_TYPES([struct sockaddr_storage, sa_family_t],,,[
|
||||
/* sys/types.h is not needed according to POSIX, but the
|
||||
sys/socket.h in i386-unknown-freebsd4.10 and
|
||||
powerpc-apple-darwin5.5 required it. */
|
||||
#include <sys/types.h>
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_WS2TCPIP_H
|
||||
#include <ws2tcpip.h>
|
||||
#endif
|
||||
])
|
||||
if test $ac_cv_type_struct_sockaddr_storage = no; then
|
||||
HAVE_STRUCT_SOCKADDR_STORAGE=0
|
||||
fi
|
||||
if test $ac_cv_type_sa_family_t = no; then
|
||||
HAVE_SA_FAMILY_T=0
|
||||
fi
|
||||
if test $ac_cv_type_struct_sockaddr_storage != no; then
|
||||
AC_CHECK_MEMBERS([struct sockaddr_storage.ss_family],
|
||||
[],
|
||||
[HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0],
|
||||
[#include <sys/types.h>
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_WS2TCPIP_H
|
||||
#include <ws2tcpip.h>
|
||||
#endif
|
||||
])
|
||||
fi
|
||||
if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \
|
||||
|| test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
|
||||
SYS_SOCKET_H='sys/socket.h'
|
||||
fi
|
||||
gl_PREREQ_SYS_H_WINSOCK2
|
||||
|
||||
dnl Check for declarations of anything we want to poison if the
|
||||
dnl corresponding gnulib module is not in use.
|
||||
gl_WARN_ON_USE_PREPARE([[
|
||||
/* Some systems require prerequisite headers. */
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
]], [socket connect accept bind getpeername getsockname getsockopt
|
||||
listen recv send recvfrom sendto setsockopt shutdown accept4])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_PREREQ_SYS_H_SOCKET],
|
||||
[
|
||||
dnl Check prerequisites of the <sys/socket.h> replacement.
|
||||
AC_REQUIRE([gl_CHECK_SOCKET_HEADERS])
|
||||
gl_CHECK_NEXT_HEADERS([sys/socket.h])
|
||||
if test $ac_cv_header_sys_socket_h = yes; then
|
||||
HAVE_SYS_SOCKET_H=1
|
||||
HAVE_WS2TCPIP_H=0
|
||||
else
|
||||
HAVE_SYS_SOCKET_H=0
|
||||
if test $ac_cv_header_ws2tcpip_h = yes; then
|
||||
HAVE_WS2TCPIP_H=1
|
||||
else
|
||||
HAVE_WS2TCPIP_H=0
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([HAVE_SYS_SOCKET_H])
|
||||
AC_SUBST([HAVE_WS2TCPIP_H])
|
||||
])
|
||||
|
||||
# Common prerequisites of the <sys/socket.h> replacement and of the
|
||||
# <sys/select.h> replacement.
|
||||
# Sets and substitutes HAVE_WINSOCK2_H.
|
||||
AC_DEFUN([gl_PREREQ_SYS_H_WINSOCK2],
|
||||
[
|
||||
m4_ifdef([gl_UNISTD_H_DEFAULTS], [AC_REQUIRE([gl_UNISTD_H_DEFAULTS])])
|
||||
m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [AC_REQUIRE([gl_SYS_IOCTL_H_DEFAULTS])])
|
||||
AC_CHECK_HEADERS_ONCE([sys/socket.h])
|
||||
if test $ac_cv_header_sys_socket_h != yes; then
|
||||
dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make
|
||||
dnl the check for those headers unconditional; yet cygwin reports
|
||||
dnl that the headers are present but cannot be compiled (since on
|
||||
dnl cygwin, all socket information should come from sys/socket.h).
|
||||
AC_CHECK_HEADERS([winsock2.h])
|
||||
fi
|
||||
if test "$ac_cv_header_winsock2_h" = yes; then
|
||||
HAVE_WINSOCK2_H=1
|
||||
UNISTD_H_HAVE_WINSOCK2_H=1
|
||||
SYS_IOCTL_H_HAVE_WINSOCK2_H=1
|
||||
else
|
||||
HAVE_WINSOCK2_H=0
|
||||
fi
|
||||
AC_SUBST([HAVE_WINSOCK2_H])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_SYS_SOCKET_MODULE_INDICATOR],
|
||||
[
|
||||
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
|
||||
AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
|
||||
gl_MODULE_INDICATOR_SET_VARIABLE([$1])
|
||||
dnl Define it also as a C macro, for the benefit of the unit tests.
|
||||
gl_MODULE_INDICATOR_FOR_TESTS([$1])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS],
|
||||
[
|
||||
GNULIB_SOCKET=0; AC_SUBST([GNULIB_SOCKET])
|
||||
GNULIB_CONNECT=0; AC_SUBST([GNULIB_CONNECT])
|
||||
GNULIB_ACCEPT=0; AC_SUBST([GNULIB_ACCEPT])
|
||||
GNULIB_BIND=0; AC_SUBST([GNULIB_BIND])
|
||||
GNULIB_GETPEERNAME=0; AC_SUBST([GNULIB_GETPEERNAME])
|
||||
GNULIB_GETSOCKNAME=0; AC_SUBST([GNULIB_GETSOCKNAME])
|
||||
GNULIB_GETSOCKOPT=0; AC_SUBST([GNULIB_GETSOCKOPT])
|
||||
GNULIB_LISTEN=0; AC_SUBST([GNULIB_LISTEN])
|
||||
GNULIB_RECV=0; AC_SUBST([GNULIB_RECV])
|
||||
GNULIB_SEND=0; AC_SUBST([GNULIB_SEND])
|
||||
GNULIB_RECVFROM=0; AC_SUBST([GNULIB_RECVFROM])
|
||||
GNULIB_SENDTO=0; AC_SUBST([GNULIB_SENDTO])
|
||||
GNULIB_SETSOCKOPT=0; AC_SUBST([GNULIB_SETSOCKOPT])
|
||||
GNULIB_SHUTDOWN=0; AC_SUBST([GNULIB_SHUTDOWN])
|
||||
GNULIB_ACCEPT4=0; AC_SUBST([GNULIB_ACCEPT4])
|
||||
HAVE_STRUCT_SOCKADDR_STORAGE=1; AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE])
|
||||
HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
|
||||
AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY])
|
||||
HAVE_SA_FAMILY_T=1; AC_SUBST([HAVE_SA_FAMILY_T])
|
||||
HAVE_ACCEPT4=1; AC_SUBST([HAVE_ACCEPT4])
|
||||
])
|
||||
@@ -1,110 +0,0 @@
|
||||
# Configure a replacement for <sys/time.h>.
|
||||
# serial 8
|
||||
|
||||
# Copyright (C) 2007, 2009-2013 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# Written by Paul Eggert and Martin Lambers.
|
||||
|
||||
AC_DEFUN([gl_HEADER_SYS_TIME_H],
|
||||
[
|
||||
dnl Use AC_REQUIRE here, so that the REPLACE_GETTIMEOFDAY=0 statement
|
||||
dnl below is expanded once only, before all REPLACE_GETTIMEOFDAY=1
|
||||
dnl statements that occur in other macros.
|
||||
AC_REQUIRE([gl_HEADER_SYS_TIME_H_BODY])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY],
|
||||
[
|
||||
AC_REQUIRE([AC_C_RESTRICT])
|
||||
AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS])
|
||||
AC_CHECK_HEADERS_ONCE([sys/time.h])
|
||||
gl_CHECK_NEXT_HEADERS([sys/time.h])
|
||||
|
||||
if test $ac_cv_header_sys_time_h != yes; then
|
||||
HAVE_SYS_TIME_H=0
|
||||
fi
|
||||
|
||||
dnl On native Windows with MSVC, 'struct timeval' is defined in <winsock2.h>
|
||||
dnl only. So include that header in the list.
|
||||
gl_PREREQ_SYS_H_WINSOCK2
|
||||
AC_CACHE_CHECK([for struct timeval], [gl_cv_sys_struct_timeval],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#if HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
#if HAVE_WINSOCK2_H
|
||||
# include <winsock2.h>
|
||||
#endif
|
||||
]],
|
||||
[[static struct timeval x; x.tv_sec = x.tv_usec;]])],
|
||||
[gl_cv_sys_struct_timeval=yes],
|
||||
[gl_cv_sys_struct_timeval=no])
|
||||
])
|
||||
if test $gl_cv_sys_struct_timeval != yes; then
|
||||
HAVE_STRUCT_TIMEVAL=0
|
||||
else
|
||||
dnl On native Windows with a 64-bit 'time_t', 'struct timeval' is defined
|
||||
dnl (in <sys/time.h> and <winsock2.h> for mingw64, in <winsock2.h> only
|
||||
dnl for MSVC) with a tv_sec field of type 'long' (32-bit!), which is
|
||||
dnl smaller than the 'time_t' type mandated by POSIX.
|
||||
dnl On OpenBSD 5.1 amd64, tv_sec is 64 bits and time_t 32 bits, but
|
||||
dnl that is good enough.
|
||||
AC_CACHE_CHECK([for wide-enough struct timeval.tv_sec member],
|
||||
[gl_cv_sys_struct_timeval_tv_sec],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM(
|
||||
[[#if HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
#if HAVE_WINSOCK2_H
|
||||
# include <winsock2.h>
|
||||
#endif
|
||||
]],
|
||||
[[static struct timeval x;
|
||||
typedef int verify_tv_sec_type[
|
||||
sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
|
||||
];
|
||||
]])],
|
||||
[gl_cv_sys_struct_timeval_tv_sec=yes],
|
||||
[gl_cv_sys_struct_timeval_tv_sec=no])
|
||||
])
|
||||
if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
|
||||
REPLACE_STRUCT_TIMEVAL=1
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl Check for declarations of anything we want to poison if the
|
||||
dnl corresponding gnulib module is not in use.
|
||||
gl_WARN_ON_USE_PREPARE([[
|
||||
#if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
]], [gettimeofday])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_SYS_TIME_MODULE_INDICATOR],
|
||||
[
|
||||
dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
|
||||
AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS])
|
||||
gl_MODULE_INDICATOR_SET_VARIABLE([$1])
|
||||
dnl Define it also as a C macro, for the benefit of the unit tests.
|
||||
gl_MODULE_INDICATOR_FOR_TESTS([$1])
|
||||
])
|
||||
|
||||
AC_DEFUN([gl_HEADER_SYS_TIME_H_DEFAULTS],
|
||||
[
|
||||
GNULIB_GETTIMEOFDAY=0; AC_SUBST([GNULIB_GETTIMEOFDAY])
|
||||
dnl Assume POSIX behavior unless another module says otherwise.
|
||||
HAVE_GETTIMEOFDAY=1; AC_SUBST([HAVE_GETTIMEOFDAY])
|
||||
HAVE_STRUCT_TIMEVAL=1; AC_SUBST([HAVE_STRUCT_TIMEVAL])
|
||||
HAVE_SYS_TIME_H=1; AC_SUBST([HAVE_SYS_TIME_H])
|
||||
REPLACE_GETTIMEOFDAY=0; AC_SUBST([REPLACE_GETTIMEOFDAY])
|
||||
REPLACE_STRUCT_TIMEVAL=0; AC_SUBST([REPLACE_STRUCT_TIMEVAL])
|
||||
])
|
||||
@@ -1,11 +0,0 @@
|
||||
#serial 15
|
||||
|
||||
# Copyright (C) 2000-2001, 2003-2007, 2009-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Jim Meyering
|
||||
|
||||
AC_DEFUN([gl_TIMESPEC], [:])
|
||||
@@ -3,16 +3,16 @@
|
||||
Copyright (C) 1997-1998, 2006-2007, 2009-2013 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 3, or (at your option)
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* written by Jim Meyering and Bruno Haible */
|
||||
|
||||
@@ -11,16 +11,16 @@ NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
|
||||
|
||||
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 3 of the License, or any
|
||||
under the terms of the GNU Lesser General Public License as published by the
|
||||
Free Software Foundation; either version 2.1 of the License, or 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _LIBC
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
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 3, or (at your option)
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
You should have received a copy of the GNU Lesser General Public License along
|
||||
with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* This particular implementation was written by Eric Blake, 2008. */
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
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 3, or (at your option)
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _MINMAX_H
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
Copyright (C) 2011-2013 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 3, or (at your option)
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
You should have received a copy of the GNU Lesser General Public License along
|
||||
with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
Copyright (C) 2011-2013 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 3, or (at your option)
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
You should have received a copy of the GNU Lesser General Public License along
|
||||
with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _MSVC_INVAL_H
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
Copyright (C) 2011-2013 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 3, or (at your option)
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
You should have received a copy of the GNU Lesser General Public License along
|
||||
with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
Copyright (C) 2011-2013 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 3, or (at your option)
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
You should have received a copy of the GNU Lesser General Public License along
|
||||
with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _MSVC_NOTHROW_H
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
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 3 of the License, or
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* written by Jim Meyering and Bruno Haible */
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
|
||||
|
||||
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 3, or (at your option)
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _GL_STDBOOL_H
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
Copyright (C) 2009-2013 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 3, or (at your option)
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Eric Blake. */
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
This file is part of gnulib.
|
||||
|
||||
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 3, or (at your option)
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/*
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
Copyright (C) 2007-2008, 2010-2013 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 3 of the License, or
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Many stdio implementations have the same logic and therefore can share
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
Copyright (C) 2004, 2007-2013 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 3, or (at your option)
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#if __GNUC__ >= 3
|
||||
@@ -579,13 +579,23 @@ _GL_CXXALIAS_SYS (fwrite, size_t,
|
||||
<http://sources.redhat.com/bugzilla/show_bug.cgi?id=11959>,
|
||||
which sometimes causes an unwanted diagnostic for fwrite calls.
|
||||
This affects only function declaration attributes under certain
|
||||
versions of gcc, and is not needed for C++. */
|
||||
versions of gcc and clang, and is not needed for C++. */
|
||||
# if (0 < __USE_FORTIFY_LEVEL \
|
||||
&& __GLIBC__ == 2 && 4 <= __GLIBC_MINOR__ && __GLIBC_MINOR__ <= 15 \
|
||||
&& 3 < __GNUC__ + (4 <= __GNUC_MINOR__) \
|
||||
&& !defined __cplusplus)
|
||||
# undef fwrite
|
||||
# define fwrite(a, b, c, d) ({size_t __r = fwrite (a, b, c, d); __r; })
|
||||
# undef fwrite_unlocked
|
||||
extern size_t __REDIRECT (rpl_fwrite,
|
||||
(const void *__restrict, size_t, size_t,
|
||||
FILE *__restrict),
|
||||
fwrite);
|
||||
extern size_t __REDIRECT (rpl_fwrite_unlocked,
|
||||
(const void *__restrict, size_t, size_t,
|
||||
FILE *__restrict),
|
||||
fwrite_unlocked);
|
||||
# define fwrite rpl_fwrite
|
||||
# define fwrite_unlocked rpl_fwrite_unlocked
|
||||
# endif
|
||||
# endif
|
||||
_GL_CXXALIASWARN (fwrite);
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
Copyright (C) 1995, 2001-2004, 2006-2013 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 3 of the License, or
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#if __GNUC__ >= 3
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
Written by Eric Blake <ebb9@byu.net>, 2008.
|
||||
|
||||
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 3, or (at your option)
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
You should have received a copy of the GNU Lesser General Public License along
|
||||
with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Before including this file, you need to include <config.h> and
|
||||
|
||||
@@ -4,16 +4,16 @@
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
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 3, or (at your option)
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
You should have received a copy of the GNU Lesser General Public License along
|
||||
with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _LIBC
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
Copyright (C) 1995-1996, 2001-2013 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 3, or (at your option)
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _@GUARD_PREFIX@_STRING_H
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
Copyright (C) 2005-2013 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 3, or (at your option)
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Eric Blake, Paul Eggert, and Jim Meyering. */
|
||||
|
||||
212
gl/sys_time.in.h
212
gl/sys_time.in.h
@@ -1,212 +0,0 @@
|
||||
/* Provide a more complete sys/time.h.
|
||||
|
||||
Copyright (C) 2007-2013 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 3, 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, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Paul Eggert. */
|
||||
|
||||
#ifndef _@GUARD_PREFIX@_SYS_TIME_H
|
||||
|
||||
#if __GNUC__ >= 3
|
||||
@PRAGMA_SYSTEM_HEADER@
|
||||
#endif
|
||||
@PRAGMA_COLUMNS@
|
||||
|
||||
/* On Cygwin, <sys/time.h> includes itself recursively via <sys/select.h>.
|
||||
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 <sys/time.h>. */
|
||||
#ifdef _CYGWIN_SYS_TIME_H
|
||||
# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
|
||||
#else
|
||||
|
||||
/* The include_next requires a split double-inclusion guard. */
|
||||
#if @HAVE_SYS_TIME_H@
|
||||
# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
|
||||
#endif
|
||||
|
||||
#ifndef _@GUARD_PREFIX@_SYS_TIME_H
|
||||
#define _@GUARD_PREFIX@_SYS_TIME_H
|
||||
|
||||
#if ! @HAVE_SYS_TIME_H@
|
||||
# include <time.h>
|
||||
#endif
|
||||
|
||||
/* On native Windows with MSVC, get the 'struct timeval' type.
|
||||
Also, on native Windows with a 64-bit time_t, where we are overriding the
|
||||
'struct timeval' type, get all declarations of system functions whose
|
||||
signature contains 'struct timeval'. */
|
||||
#if (defined _MSC_VER || @REPLACE_STRUCT_TIMEVAL@) && @HAVE_WINSOCK2_H@ && !defined _GL_INCLUDING_WINSOCK2_H
|
||||
# define _GL_INCLUDING_WINSOCK2_H
|
||||
# include <winsock2.h>
|
||||
# undef _GL_INCLUDING_WINSOCK2_H
|
||||
#endif
|
||||
|
||||
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
|
||||
|
||||
/* The definition of _GL_ARG_NONNULL is copied here. */
|
||||
|
||||
/* The definition of _GL_WARN_ON_USE is copied here. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if !@HAVE_STRUCT_TIMEVAL@ || @REPLACE_STRUCT_TIMEVAL@
|
||||
|
||||
# if @REPLACE_STRUCT_TIMEVAL@
|
||||
# define timeval rpl_timeval
|
||||
# endif
|
||||
|
||||
# if !GNULIB_defined_struct_timeval
|
||||
struct timeval
|
||||
{
|
||||
time_t tv_sec;
|
||||
long int tv_usec;
|
||||
};
|
||||
# define GNULIB_defined_struct_timeval 1
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#if @GNULIB_GETTIMEOFDAY@
|
||||
# if @REPLACE_GETTIMEOFDAY@
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef gettimeofday
|
||||
# define gettimeofday rpl_gettimeofday
|
||||
# endif
|
||||
_GL_FUNCDECL_RPL (gettimeofday, int,
|
||||
(struct timeval *restrict, void *restrict)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
_GL_CXXALIAS_RPL (gettimeofday, int,
|
||||
(struct timeval *restrict, void *restrict));
|
||||
# else
|
||||
# if !@HAVE_GETTIMEOFDAY@
|
||||
_GL_FUNCDECL_SYS (gettimeofday, int,
|
||||
(struct timeval *restrict, void *restrict)
|
||||
_GL_ARG_NONNULL ((1)));
|
||||
# endif
|
||||
/* Need to cast, because on glibc systems, by default, the second argument is
|
||||
struct timezone *. */
|
||||
_GL_CXXALIAS_SYS_CAST (gettimeofday, int,
|
||||
(struct timeval *restrict, void *restrict));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (gettimeofday);
|
||||
#elif defined GNULIB_POSIXCHECK
|
||||
# undef gettimeofday
|
||||
# if HAVE_RAW_DECL_GETTIMEOFDAY
|
||||
_GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - "
|
||||
"use gnulib module gettimeofday for portability");
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Hide some function declarations from <winsock2.h>. */
|
||||
|
||||
#if defined _MSC_VER && @HAVE_WINSOCK2_H@
|
||||
# if !defined _@GUARD_PREFIX@_UNISTD_H
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef close
|
||||
# define close close_used_without_including_unistd_h
|
||||
# else
|
||||
_GL_WARN_ON_USE (close,
|
||||
"close() used without including <unistd.h>");
|
||||
# endif
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef gethostname
|
||||
# define gethostname gethostname_used_without_including_unistd_h
|
||||
# else
|
||||
_GL_WARN_ON_USE (gethostname,
|
||||
"gethostname() used without including <unistd.h>");
|
||||
# endif
|
||||
# endif
|
||||
# if !defined _@GUARD_PREFIX@_SYS_SOCKET_H
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef socket
|
||||
# define socket socket_used_without_including_sys_socket_h
|
||||
# undef connect
|
||||
# define connect connect_used_without_including_sys_socket_h
|
||||
# undef accept
|
||||
# define accept accept_used_without_including_sys_socket_h
|
||||
# undef bind
|
||||
# define bind bind_used_without_including_sys_socket_h
|
||||
# undef getpeername
|
||||
# define getpeername getpeername_used_without_including_sys_socket_h
|
||||
# undef getsockname
|
||||
# define getsockname getsockname_used_without_including_sys_socket_h
|
||||
# undef getsockopt
|
||||
# define getsockopt getsockopt_used_without_including_sys_socket_h
|
||||
# undef listen
|
||||
# define listen listen_used_without_including_sys_socket_h
|
||||
# undef recv
|
||||
# define recv recv_used_without_including_sys_socket_h
|
||||
# undef send
|
||||
# define send send_used_without_including_sys_socket_h
|
||||
# undef recvfrom
|
||||
# define recvfrom recvfrom_used_without_including_sys_socket_h
|
||||
# undef sendto
|
||||
# define sendto sendto_used_without_including_sys_socket_h
|
||||
# undef setsockopt
|
||||
# define setsockopt setsockopt_used_without_including_sys_socket_h
|
||||
# undef shutdown
|
||||
# define shutdown shutdown_used_without_including_sys_socket_h
|
||||
# else
|
||||
_GL_WARN_ON_USE (socket,
|
||||
"socket() used without including <sys/socket.h>");
|
||||
_GL_WARN_ON_USE (connect,
|
||||
"connect() used without including <sys/socket.h>");
|
||||
_GL_WARN_ON_USE (accept,
|
||||
"accept() used without including <sys/socket.h>");
|
||||
_GL_WARN_ON_USE (bind,
|
||||
"bind() used without including <sys/socket.h>");
|
||||
_GL_WARN_ON_USE (getpeername,
|
||||
"getpeername() used without including <sys/socket.h>");
|
||||
_GL_WARN_ON_USE (getsockname,
|
||||
"getsockname() used without including <sys/socket.h>");
|
||||
_GL_WARN_ON_USE (getsockopt,
|
||||
"getsockopt() used without including <sys/socket.h>");
|
||||
_GL_WARN_ON_USE (listen,
|
||||
"listen() used without including <sys/socket.h>");
|
||||
_GL_WARN_ON_USE (recv,
|
||||
"recv() used without including <sys/socket.h>");
|
||||
_GL_WARN_ON_USE (send,
|
||||
"send() used without including <sys/socket.h>");
|
||||
_GL_WARN_ON_USE (recvfrom,
|
||||
"recvfrom() used without including <sys/socket.h>");
|
||||
_GL_WARN_ON_USE (sendto,
|
||||
"sendto() used without including <sys/socket.h>");
|
||||
_GL_WARN_ON_USE (setsockopt,
|
||||
"setsockopt() used without including <sys/socket.h>");
|
||||
_GL_WARN_ON_USE (shutdown,
|
||||
"shutdown() used without including <sys/socket.h>");
|
||||
# endif
|
||||
# endif
|
||||
# if !defined _@GUARD_PREFIX@_SYS_SELECT_H
|
||||
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
|
||||
# undef select
|
||||
# define select select_used_without_including_sys_select_h
|
||||
# else
|
||||
_GL_WARN_ON_USE (select,
|
||||
"select() used without including <sys/select.h>");
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* _@GUARD_PREFIX@_SYS_TIME_H */
|
||||
#endif /* _CYGWIN_SYS_TIME_H */
|
||||
#endif /* _@GUARD_PREFIX@_SYS_TIME_H */
|
||||
@@ -3,16 +3,16 @@
|
||||
Copyright (C) 2011-2013 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 3, or (at your option)
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#if __GNUC__ >= 3
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
Copyright (C) 2007-2013 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 3, or (at your option)
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#if __GNUC__ >= 3
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
#include <config.h>
|
||||
#define _GL_TIMESPEC_INLINE _GL_EXTERN_INLINE
|
||||
#include "timespec.h"
|
||||
@@ -1,92 +0,0 @@
|
||||
/* timespec -- System time interface
|
||||
|
||||
Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2013 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 3 of the License, 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, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#if ! defined TIMESPEC_H
|
||||
# define TIMESPEC_H
|
||||
|
||||
# include <time.h>
|
||||
|
||||
_GL_INLINE_HEADER_BEGIN
|
||||
#ifndef _GL_TIMESPEC_INLINE
|
||||
# define _GL_TIMESPEC_INLINE _GL_INLINE
|
||||
#endif
|
||||
|
||||
/* Return negative, zero, positive if A < B, A == B, A > B, respectively.
|
||||
|
||||
For each time stamp T, this code assumes that either:
|
||||
|
||||
* T.tv_nsec is in the range 0..999999999; or
|
||||
* T.tv_sec corresponds to a valid leap second on a host that supports
|
||||
leap seconds, and T.tv_nsec is in the range 1000000000..1999999999; or
|
||||
* T.tv_sec is the minimum time_t value and T.tv_nsec is -1; or
|
||||
T.tv_sec is the maximum time_t value and T.tv_nsec is 2000000000.
|
||||
This allows for special struct timespec values that are less or
|
||||
greater than all possible valid time stamps.
|
||||
|
||||
In all these cases, it is safe to subtract two tv_nsec values and
|
||||
convert the result to integer without worrying about overflow on
|
||||
any platform of interest to the GNU project, since all such
|
||||
platforms have 32-bit int or wider.
|
||||
|
||||
Replacing "(int) (a.tv_nsec - b.tv_nsec)" with something like
|
||||
"a.tv_nsec < b.tv_nsec ? -1 : a.tv_nsec > b.tv_nsec" would cause
|
||||
this function to work in some cases where the above assumption is
|
||||
violated, but not in all cases (e.g., a.tv_sec==1, a.tv_nsec==-2,
|
||||
b.tv_sec==0, b.tv_nsec==999999999) and is arguably not worth the
|
||||
extra instructions. Using a subtraction has the advantage of
|
||||
detecting some invalid cases on platforms that detect integer
|
||||
overflow.
|
||||
|
||||
The (int) cast avoids a gcc -Wconversion warning. */
|
||||
|
||||
_GL_TIMESPEC_INLINE int
|
||||
timespec_cmp (struct timespec a, struct timespec b)
|
||||
{
|
||||
return (a.tv_sec < b.tv_sec ? -1
|
||||
: a.tv_sec > b.tv_sec ? 1
|
||||
: (int) (a.tv_nsec - b.tv_nsec));
|
||||
}
|
||||
|
||||
/* Return -1, 0, 1, depending on the sign of A. A.tv_nsec must be
|
||||
nonnegative. */
|
||||
_GL_TIMESPEC_INLINE int
|
||||
timespec_sign (struct timespec a)
|
||||
{
|
||||
return a.tv_sec < 0 ? -1 : a.tv_sec || a.tv_nsec;
|
||||
}
|
||||
|
||||
struct timespec timespec_add (struct timespec, struct timespec)
|
||||
_GL_ATTRIBUTE_CONST;
|
||||
struct timespec timespec_sub (struct timespec, struct timespec)
|
||||
_GL_ATTRIBUTE_CONST;
|
||||
struct timespec dtotimespec (double)
|
||||
_GL_ATTRIBUTE_CONST;
|
||||
|
||||
/* Return an approximation to A, of type 'double'. */
|
||||
_GL_TIMESPEC_INLINE double
|
||||
timespectod (struct timespec a)
|
||||
{
|
||||
return a.tv_sec + a.tv_nsec / 1e9;
|
||||
}
|
||||
|
||||
void gettime (struct timespec *);
|
||||
int settime (struct timespec const *);
|
||||
|
||||
_GL_INLINE_HEADER_END
|
||||
|
||||
#endif
|
||||
@@ -2,16 +2,16 @@
|
||||
Copyright (C) 2003-2013 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 3, or (at your option)
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1, 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.
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
You should have received a copy of the GNU Lesser General Public License
|
||||
along with this program; if not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#ifndef _@GUARD_PREFIX@_UNISTD_H
|
||||
|
||||
Reference in New Issue
Block a user