1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00

Update Gnulib to v0.0-6827-g39c3009; use the `dirfd' module.

* m4/gnulib-cache.m4: Use `dirfd'.

* libguile/filesys.c: Include Gnulib's <dirent.h> directly.
  (dirfd): Remove.  Suggested by Bruno Haible <bruno@clisp.org>.
This commit is contained in:
Ludovic Courtès 2012-01-16 23:49:21 +01:00
parent ad17b15512
commit f0007cade0
305 changed files with 1230 additions and 537 deletions

View file

@ -1,6 +1,6 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in.
# Copyright (C) 2002-2011 Free Software Foundation, Inc.
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -21,7 +21,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
# Reproduce by: gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl=3 --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files accept alignof alloca-opt announce-gen autobuild bind byteswap canonicalize-lgpl ceil close connect duplocale environ extensions flock floor fpieee frexp full-read full-write func gendocs getaddrinfo getpeername getsockname getsockopt git-version-gen gitlog-to-changelog gnu-web-doc-update gnupload havelib iconv_open-utf inet_ntop inet_pton isinf isnan ldexp lib-symbol-versions lib-symbol-visibility libunistring listen localcharset locale log1p maintainer-makefile malloc-gnu malloca nproc open pipe2 putenv recv recvfrom rename send sendto setsockopt shutdown socket stat-time stdlib strftime striconveh string sys_stat trunc verify vsnprintf warnings wchar
# Reproduce by: gnulib-tool --import --dir=. --local-dir=gnulib-local --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --lgpl=3 --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files accept alignof alloca-opt announce-gen autobuild bind byteswap canonicalize-lgpl ceil close connect dirfd duplocale environ extensions flock floor fpieee frexp full-read full-write func gendocs getaddrinfo getpeername getsockname getsockopt git-version-gen gitlog-to-changelog gnu-web-doc-update gnupload havelib iconv_open-utf inet_ntop inet_pton isinf isnan ldexp lib-symbol-versions lib-symbol-visibility libunistring listen localcharset locale log1p maintainer-makefile malloc-gnu malloca nproc open pipe2 putenv recv recvfrom rename send sendto setsockopt shutdown socket stat-time stdlib strftime striconveh string sys_stat trunc verify vsnprintf warnings wchar
AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects
@ -287,6 +287,63 @@ EXTRA_libgnu_la_SOURCES += connect.c
## end gnulib module connect
## begin gnulib module dirent
BUILT_SOURCES += dirent.h
# We need the following in order to create <dirent.h> when the system
# doesn't have one that works with the given compiler.
dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
$(AM_V_GEN)rm -f $@-t $@ && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
sed -e 's|@''GUARD_PREFIX''@|GL|g' \
-e 's|@''HAVE_DIRENT_H''@|$(HAVE_DIRENT_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_DIRENT_H''@|$(NEXT_DIRENT_H)|g' \
-e 's/@''GNULIB_OPENDIR''@/$(GNULIB_OPENDIR)/g' \
-e 's/@''GNULIB_READDIR''@/$(GNULIB_READDIR)/g' \
-e 's/@''GNULIB_REWINDDIR''@/$(GNULIB_REWINDDIR)/g' \
-e 's/@''GNULIB_CLOSEDIR''@/$(GNULIB_CLOSEDIR)/g' \
-e 's/@''GNULIB_DIRFD''@/$(GNULIB_DIRFD)/g' \
-e 's/@''GNULIB_FDOPENDIR''@/$(GNULIB_FDOPENDIR)/g' \
-e 's/@''GNULIB_SCANDIR''@/$(GNULIB_SCANDIR)/g' \
-e 's/@''GNULIB_ALPHASORT''@/$(GNULIB_ALPHASORT)/g' \
-e 's/@''HAVE_OPENDIR''@/$(HAVE_OPENDIR)/g' \
-e 's/@''HAVE_READDIR''@/$(HAVE_READDIR)/g' \
-e 's/@''HAVE_REWINDDIR''@/$(HAVE_REWINDDIR)/g' \
-e 's/@''HAVE_CLOSEDIR''@/$(HAVE_CLOSEDIR)/g' \
-e 's|@''HAVE_DECL_DIRFD''@|$(HAVE_DECL_DIRFD)|g' \
-e 's|@''HAVE_DECL_FDOPENDIR''@|$(HAVE_DECL_FDOPENDIR)|g' \
-e 's|@''HAVE_FDOPENDIR''@|$(HAVE_FDOPENDIR)|g' \
-e 's|@''HAVE_SCANDIR''@|$(HAVE_SCANDIR)|g' \
-e 's|@''HAVE_ALPHASORT''@|$(HAVE_ALPHASORT)|g' \
-e 's|@''REPLACE_OPENDIR''@|$(REPLACE_OPENDIR)|g' \
-e 's|@''REPLACE_CLOSEDIR''@|$(REPLACE_CLOSEDIR)|g' \
-e 's|@''REPLACE_DIRFD''@|$(REPLACE_DIRFD)|g' \
-e 's|@''REPLACE_FDOPENDIR''@|$(REPLACE_FDOPENDIR)|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)/dirent.in.h; \
} > $@-t && \
mv $@-t $@
MOSTLYCLEANFILES += dirent.h dirent.h-t
EXTRA_DIST += dirent.in.h
## end gnulib module dirent
## begin gnulib module dirfd
EXTRA_DIST += dirfd.c
EXTRA_libgnu_la_SOURCES += dirfd.c
## end gnulib module dirfd
## begin gnulib module dirname-lgpl
libgnu_la_SOURCES += dirname-lgpl.c basename-lgpl.c stripslash.c
@ -1788,6 +1845,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \
-e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \
-e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \
-e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \
-e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \
-e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \
-e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \
@ -1815,6 +1873,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \
-e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \
-e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
-e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \
-e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
-e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
-e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \
@ -1834,6 +1893,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
-e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
-e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
-e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \
-e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \
-e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
-e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
@ -2294,6 +2354,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \
-e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \
-e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \
-e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \
-e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \
-e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \
-e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \
@ -2372,6 +2433,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \
-e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
-e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
-e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \
-e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
-e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
-e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \

View file

@ -1,6 +1,6 @@
/* accept.c --- wrappers for Windows accept function
Copyright (C) 2008-2011 Free Software Foundation, Inc.
Copyright (C) 2008-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Determine alignment of types.
Copyright (C) 2003-2004, 2006, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2003-2004, 2006, 2009-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* Memory allocation on the stack.
Copyright (C) 1995, 1999, 2001-2004, 2006-2011 Free Software Foundation,
Copyright (C) 1995, 1999, 2001-2004, 2006-2012 Free Software Foundation,
Inc.
This program is free software; you can redistribute it and/or modify it

View file

@ -1,6 +1,6 @@
/* A GNU-like <arpa/inet.h>.
Copyright (C) 2005-2006, 2008-2011 Free Software Foundation, Inc.
Copyright (C) 2005-2006, 2008-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Formatted output to strings.
Copyright (C) 1999, 2002, 2006, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 1999, 2002, 2006, 2009-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* basename.c -- return the last element in a file name
Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2011 Free Software
Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2012 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Binary mode I/O.
Copyright (C) 2001, 2003, 2005, 2008-2011 Free Software Foundation, Inc.
Copyright (C) 2001, 2003, 2005, 2008-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* bind.c --- wrappers for Windows bind function
Copyright (C) 2008-2011 Free Software Foundation, Inc.
Copyright (C) 2008-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* byteswap.h - Byte swapping
Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2005, 2007, 2009-2012 Free Software Foundation, Inc.
Written by Oskar Liljeblad <oskar@osk.mine.nu>, 2005.
This program is free software: you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* Character handling in C locale.
Copyright 2000-2003, 2006, 2009-2011 Free Software Foundation, Inc.
Copyright 2000-2003, 2006, 2009-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -5,7 +5,7 @@
<ctype.h> functions' behaviour depends on the current locale set via
setlocale.
Copyright (C) 2000-2003, 2006, 2008-2011 Free Software Foundation, Inc.
Copyright (C) 2000-2003, 2006, 2008-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Case-insensitive string comparison functions in C locale.
Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2011 Free Software
Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2012 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* c-strcasecmp.c -- case insensitive string comparator in C locale
Copyright (C) 1998-1999, 2005-2006, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 1998-1999, 2005-2006, 2009-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Optimized case-insensitive string comparison in C locale.
Copyright (C) 2001-2002, 2007, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2001-2002, 2007, 2009-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published

View file

@ -1,5 +1,5 @@
/* c-strncasecmp.c -- case insensitive string comparator in C locale
Copyright (C) 1998-1999, 2005-2006, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 1998-1999, 2005-2006, 2009-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Return the canonical absolute name of a given file.
Copyright (C) 1996-2011 Free Software Foundation, Inc.
Copyright (C) 1996-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This program is free software: you can redistribute it and/or modify
@ -84,10 +84,10 @@
#if !FUNC_REALPATH_WORKS || defined _LIBC
/* Return the canonical absolute name of file NAME. A canonical name
does not contain any `.', `..' components nor any repeated path
does not contain any ".", ".." components nor any repeated path
separators ('/') or symlinks. All path components must exist. If
RESOLVED is null, the result is malloc'd; otherwise, if the
canonical name is PATH_MAX chars or more, returns null with `errno'
canonical name is PATH_MAX chars or more, returns null with 'errno'
set to ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars,
returns the name in RESOLVED. If the name cannot be resolved and
RESOLVED is non-NULL, it contains the path of the first component

View file

@ -1,5 +1,5 @@
/* Round towards positive infinity.
Copyright (C) 2007, 2010-2011 Free Software Foundation, Inc.
Copyright (C) 2007, 2010-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* close replacement.
Copyright (C) 2008-2011 Free Software Foundation, Inc.
Copyright (C) 2008-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,7 +1,7 @@
#! /bin/sh
# Output a system dependent table of character encoding aliases.
#
# Copyright (C) 2000-2004, 2006-2011 Free Software Foundation, Inc.
# Copyright (C) 2000-2004, 2006-2012 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
@ -30,6 +30,8 @@
# The current list of GNU canonical charset names is as follows.
#
# name MIME? used by which systems
# (darwin = MacOS X, woe32 = native Windows)
#
# ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin cygwin
# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin
# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin

View file

@ -1,6 +1,6 @@
/* connect.c --- wrappers for Windows connect function
Copyright (C) 2008-2011 Free Software Foundation, Inc.
Copyright (C) 2008-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

249
lib/dirent.in.h Normal file
View file

@ -0,0 +1,249 @@
/* A GNU-like <dirent.h>.
Copyright (C) 2006-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
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@_DIRENT_H
#if __GNUC__ >= 3
@PRAGMA_SYSTEM_HEADER@
#endif
@PRAGMA_COLUMNS@
/* The include_next requires a split double-inclusion guard. */
#if @HAVE_DIRENT_H@
# @INCLUDE_NEXT@ @NEXT_DIRENT_H@
#endif
#ifndef _@GUARD_PREFIX@_DIRENT_H
#define _@GUARD_PREFIX@_DIRENT_H
/* Get ino_t. Needed on some systems, including glibc 2.8. */
#include <sys/types.h>
#if !@HAVE_DIRENT_H@
/* Define types DIR and 'struct dirent'. */
# if !GNULIB_defined_struct_dirent
struct dirent
{
char d_type;
char d_name[1];
};
/* Possible values for 'd_type'. */
# define DT_UNKNOWN 0
# define DT_FIFO 1 /* FIFO */
# define DT_CHR 2 /* character device */
# define DT_DIR 4 /* directory */
# define DT_BLK 6 /* block device */
# define DT_REG 8 /* regular file */
# define DT_LNK 10 /* symbolic link */
# define DT_SOCK 12 /* socket */
# define DT_WHT 14 /* whiteout */
typedef struct gl_directory DIR;
# define GNULIB_defined_struct_dirent 1
# endif
#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. */
/* Declare overridden functions. */
#if @GNULIB_OPENDIR@
# if @REPLACE_OPENDIR@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef opendir
# define opendir rpl_opendir
# endif
_GL_FUNCDECL_RPL (opendir, DIR *, (const char *dir_name) _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (opendir, DIR *, (const char *dir_name));
# else
# if !@HAVE_OPENDIR@
_GL_FUNCDECL_SYS (opendir, DIR *, (const char *dir_name) _GL_ARG_NONNULL ((1)));
# endif
_GL_CXXALIAS_SYS (opendir, DIR *, (const char *dir_name));
# endif
_GL_CXXALIASWARN (opendir);
#elif defined GNULIB_POSIXCHECK
# undef opendir
# if HAVE_RAW_DECL_OPENDIR
_GL_WARN_ON_USE (opendir, "opendir is not portable - "
"use gnulib module opendir for portability");
# endif
#endif
#if @GNULIB_READDIR@
# if !@HAVE_READDIR@
_GL_FUNCDECL_SYS (readdir, struct dirent *, (DIR *dirp) _GL_ARG_NONNULL ((1)));
# endif
_GL_CXXALIAS_SYS (readdir, struct dirent *, (DIR *dirp));
_GL_CXXALIASWARN (readdir);
#elif defined GNULIB_POSIXCHECK
# undef readdir
# if HAVE_RAW_DECL_READDIR
_GL_WARN_ON_USE (readdir, "readdir is not portable - "
"use gnulib module readdir for portability");
# endif
#endif
#if @GNULIB_REWINDDIR@
# if !@HAVE_REWINDDIR@
_GL_FUNCDECL_SYS (rewinddir, void, (DIR *dirp) _GL_ARG_NONNULL ((1)));
# endif
_GL_CXXALIAS_SYS (rewinddir, void, (DIR *dirp));
_GL_CXXALIASWARN (rewinddir);
#elif defined GNULIB_POSIXCHECK
# undef rewinddir
# if HAVE_RAW_DECL_REWINDDIR
_GL_WARN_ON_USE (rewinddir, "rewinddir is not portable - "
"use gnulib module rewinddir for portability");
# endif
#endif
#if @GNULIB_CLOSEDIR@
# if @REPLACE_CLOSEDIR@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef closedir
# define closedir rpl_closedir
# endif
_GL_FUNCDECL_RPL (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (closedir, int, (DIR *dirp));
# else
# if !@HAVE_CLOSEDIR@
_GL_FUNCDECL_SYS (closedir, int, (DIR *dirp) _GL_ARG_NONNULL ((1)));
# endif
_GL_CXXALIAS_SYS (closedir, int, (DIR *dirp));
# endif
_GL_CXXALIASWARN (closedir);
#elif defined GNULIB_POSIXCHECK
# undef closedir
# if HAVE_RAW_DECL_CLOSEDIR
_GL_WARN_ON_USE (closedir, "closedir is not portable - "
"use gnulib module closedir for portability");
# endif
#endif
#if @GNULIB_DIRFD@
/* Return the file descriptor associated with the given directory stream,
or -1 if none exists. */
# if @REPLACE_DIRFD@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef dirfd
# define dirfd rpl_dirfd
# endif
_GL_FUNCDECL_RPL (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1)));
_GL_CXXALIAS_RPL (dirfd, int, (DIR *));
# else
# if defined __cplusplus && defined GNULIB_NAMESPACE && defined dirfd
/* dirfd is defined as a macro and not as a function.
Turn it into a function and get rid of the macro. */
static inline int (dirfd) (DIR *dp) { return dirfd (dp); }
# undef dirfd
# endif
# if !(@HAVE_DECL_DIRFD@ || defined dirfd)
_GL_FUNCDECL_SYS (dirfd, int, (DIR *) _GL_ARG_NONNULL ((1)));
# endif
_GL_CXXALIAS_SYS (dirfd, int, (DIR *));
# endif
_GL_CXXALIASWARN (dirfd);
#elif defined GNULIB_POSIXCHECK
# undef dirfd
# if HAVE_RAW_DECL_DIRFD
_GL_WARN_ON_USE (dirfd, "dirfd is unportable - "
"use gnulib module dirfd for portability");
# endif
#endif
#if @GNULIB_FDOPENDIR@
/* Open a directory stream visiting the given directory file
descriptor. Return NULL and set errno if fd is not visiting a
directory. On success, this function consumes fd (it will be
implicitly closed either by this function or by a subsequent
closedir). */
# if @REPLACE_FDOPENDIR@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef fdopendir
# define fdopendir rpl_fdopendir
# endif
_GL_FUNCDECL_RPL (fdopendir, DIR *, (int fd));
_GL_CXXALIAS_RPL (fdopendir, DIR *, (int fd));
# else
# if !@HAVE_FDOPENDIR@ || !@HAVE_DECL_FDOPENDIR@
_GL_FUNCDECL_SYS (fdopendir, DIR *, (int fd));
# endif
_GL_CXXALIAS_SYS (fdopendir, DIR *, (int fd));
# endif
_GL_CXXALIASWARN (fdopendir);
#elif defined GNULIB_POSIXCHECK
# undef fdopendir
# if HAVE_RAW_DECL_FDOPENDIR
_GL_WARN_ON_USE (fdopendir, "fdopendir is unportable - "
"use gnulib module fdopendir for portability");
# endif
#endif
#if @GNULIB_SCANDIR@
/* Scan the directory DIR, calling FILTER on each directory entry.
Entries for which FILTER returns nonzero are individually malloc'd,
sorted using qsort with CMP, and collected in a malloc'd array in
*NAMELIST. Returns the number of entries selected, or -1 on error. */
# if !@HAVE_SCANDIR@
_GL_FUNCDECL_SYS (scandir, int,
(const char *dir, struct dirent ***namelist,
int (*filter) (const struct dirent *),
int (*cmp) (const struct dirent **, const struct dirent **))
_GL_ARG_NONNULL ((1, 2, 4)));
# endif
/* Need to cast, because on glibc systems, the fourth parameter is
int (*cmp) (const void *, const void *). */
_GL_CXXALIAS_SYS_CAST (scandir, int,
(const char *dir, struct dirent ***namelist,
int (*filter) (const struct dirent *),
int (*cmp) (const struct dirent **, const struct dirent **)));
_GL_CXXALIASWARN (scandir);
#elif defined GNULIB_POSIXCHECK
# undef scandir
# if HAVE_RAW_DECL_SCANDIR
_GL_WARN_ON_USE (scandir, "scandir is unportable - "
"use gnulib module scandir for portability");
# endif
#endif
#if @GNULIB_ALPHASORT@
/* Compare two 'struct dirent' entries alphabetically. */
# if !@HAVE_ALPHASORT@
_GL_FUNCDECL_SYS (alphasort, int,
(const struct dirent **, const struct dirent **)
_GL_ARG_NONNULL ((1, 2)));
# endif
/* Need to cast, because on glibc systems, the parameters are
(const void *, const void *). */
_GL_CXXALIAS_SYS_CAST (alphasort, int,
(const struct dirent **, const struct dirent **));
_GL_CXXALIASWARN (alphasort);
#elif defined GNULIB_POSIXCHECK
# undef alphasort
# if HAVE_RAW_DECL_ALPHASORT
_GL_WARN_ON_USE (alphasort, "alphasort is unportable - "
"use gnulib module alphasort for portability");
# endif
#endif
#endif /* _@GUARD_PREFIX@_DIRENT_H */
#endif /* _@GUARD_PREFIX@_DIRENT_H */

32
lib/dirfd.c Normal file
View file

@ -0,0 +1,32 @@
/* dirfd.c -- return the file descriptor associated with an open DIR*
Copyright (C) 2001, 2006, 2008-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
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. */
#include <config.h>
#include <dirent.h>
#include <errno.h>
int
dirfd (DIR *dir_p)
{
int fd = DIR_TO_FD (dir_p);
if (fd == -1)
errno = ENOTSUP;
return fd;
}

View file

@ -1,6 +1,6 @@
/* dirname.c -- return all but the last element in a file name
Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2011 Free Software
Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2012 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@ -25,7 +25,7 @@
/* Return the length of the prefix of FILE that will be used by
dir_name. If FILE is in the working directory, this returns zero
even though `dir_name (FILE)' will return ".". Works properly even
even though 'dir_name (FILE)' will return ".". Works properly even
if there are trailing slashes (by effectively ignoring them). */
size_t
@ -53,9 +53,9 @@ dir_len (char const *file)
}
/* In general, we can't use the builtin `dirname' function if available,
/* In general, we can't use the builtin 'dirname' function if available,
since it has different meanings in different environments.
In some environments the builtin `dirname' modifies its argument.
In some environments the builtin 'dirname' modifies its argument.
Return the leading directories part of FILE, allocated with malloc.
Works properly even if there are trailing slashes (by effectively

View file

@ -1,6 +1,6 @@
/* Take file names apart into directory and base names.
Copyright (C) 1998, 2001, 2003-2006, 2009-2011 Free Software Foundation,
Copyright (C) 1998, 2001, 2003-2006, 2009-2012 Free Software Foundation,
Inc.
This program is free software: you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* File names on MS-DOS/Windows systems.
Copyright (C) 2000-2001, 2004-2006, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2000-2001, 2004-2006, 2009-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Duplicate a locale object.
Copyright (C) 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2009-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* A POSIX-like <errno.h>.
Copyright (C) 2008-2011 Free Software Foundation, Inc.
Copyright (C) 2008-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* Like <fcntl.h>, but with non-working flags defined to 0.
Copyright (C) 2006-2011 Free Software Foundation, Inc.
Copyright (C) 2006-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -62,6 +62,12 @@
# include <unistd.h>
#endif
/* Native Windows platforms declare open(), creat() in <io.h>. */
#if (@GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \
&& ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
# include <io.h>
#endif
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
@ -177,12 +183,12 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
/* Fix up the O_* macros. */
#if !defined O_DIRECT && defined O_DIRECTIO
/* Tru64 spells it `O_DIRECTIO'. */
/* Tru64 spells it 'O_DIRECTIO'. */
# define O_DIRECT O_DIRECTIO
#endif
#if !defined O_CLOEXEC && defined O_NOINHERIT
/* Mingw spells it `O_NOINHERIT'. */
/* Mingw spells it 'O_NOINHERIT'. */
# define O_CLOEXEC O_NOINHERIT
#endif

View file

@ -1,5 +1,5 @@
/* Hook for making making file descriptor functions close(), ioctl() extensible.
Copyright (C) 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2009-2012 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This program is free software: you can redistribute it and/or modify it

View file

@ -1,5 +1,5 @@
/* Hook for making making file descriptor functions close(), ioctl() extensible.
Copyright (C) 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2009-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published

View file

@ -1,5 +1,5 @@
/* Supplemental information about the floating-point formats.
Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This program is free software; you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Auxiliary definitions for <float.h>.
Copyright (C) 2011 Free Software Foundation, Inc.
Copyright (C) 2011-2012 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* A correct <float.h>.
Copyright (C) 2007-2011 Free Software Foundation, Inc.
Copyright (C) 2007-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -6,7 +6,7 @@
Written by Richard W.M. Jones <rjones.at.redhat.com>
Copyright (C) 2008-2011 Free Software Foundation, Inc.
Copyright (C) 2008-2012 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public

View file

@ -1,5 +1,5 @@
/* Round towards negative infinity.
Copyright (C) 2007, 2010-2011 Free Software Foundation, Inc.
Copyright (C) 2007, 2010-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Split a double into fraction and mantissa.
Copyright (C) 2007-2011 Free Software Foundation, Inc.
Copyright (C) 2007-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* fstat() replacement.
Copyright (C) 2011 Free Software Foundation, Inc.
Copyright (C) 2011-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* An interface to read that retries after partial reads and interrupts.
Copyright (C) 2002-2003, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2002-2003, 2009-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* An interface to read() that reads all it is asked to read.
Copyright (C) 2002, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2002, 2009-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* An interface to read and write that retries (if necessary) until complete.
Copyright (C) 1993-1994, 1997-2006, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 1993-1994, 1997-2006, 2009-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* An interface to write() that writes all it is asked to write.
Copyright (C) 2002-2003, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2002-2003, 2009-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1997, 2001-2002, 2004-2006, 2008-2011 Free Software
/* Copyright (C) 1997, 2001-2002, 2004-2006, 2008-2012 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell <pjb27@cam.ac.uk>, 1997.

View file

@ -1,5 +1,5 @@
/* Get address information (partial implementation).
Copyright (C) 1997, 2001-2002, 2004-2011 Free Software Foundation, Inc.
Copyright (C) 1997, 2001-2002, 2004-2012 Free Software Foundation, Inc.
Contributed by Simon Josefsson <simon@josefsson.org>.
This program is free software; you can redistribute it and/or modify
@ -56,13 +56,13 @@
#endif
#if defined _WIN32 || defined __WIN32__
# define WIN32_NATIVE
# define WINDOWS_NATIVE
#endif
/* gl_sockets_startup */
#include "sockets.h"
#ifdef WIN32_NATIVE
#ifdef WINDOWS_NATIVE
typedef int (WSAAPI *getaddrinfo_func) (const char*, const char*,
const struct addrinfo*,
struct addrinfo**);
@ -153,7 +153,7 @@ getaddrinfo (const char *restrict nodename,
};
#endif
#ifdef WIN32_NATIVE
#ifdef WINDOWS_NATIVE
if (use_win32_p ())
return getaddrinfo_ptr (nodename, servname, hints, res);
#endif
@ -332,11 +332,11 @@ getaddrinfo (const char *restrict nodename,
return 0;
}
/* Free `addrinfo' structure AI including associated storage. */
/* Free 'addrinfo' structure AI including associated storage. */
void
freeaddrinfo (struct addrinfo *ai)
{
#ifdef WIN32_NATIVE
#ifdef WINDOWS_NATIVE
if (use_win32_p ())
{
freeaddrinfo_ptr (ai);
@ -362,7 +362,7 @@ getnameinfo (const struct sockaddr *restrict sa, socklen_t salen,
char *restrict service, socklen_t servicelen,
int flags)
{
#ifdef WIN32_NATIVE
#ifdef WINDOWS_NATIVE
if (use_win32_p ())
return getnameinfo_ptr (sa, salen, node, nodelen,
service, servicelen, flags);

View file

@ -1,6 +1,6 @@
/* getpeername.c --- wrappers for Windows getpeername function
Copyright (C) 2008-2011 Free Software Foundation, Inc.
Copyright (C) 2008-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* getsockname.c --- wrappers for Windows getsockname function
Copyright (C) 2008-2011 Free Software Foundation, Inc.
Copyright (C) 2008-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* getsockopt.c --- wrappers for Windows getsockopt function
Copyright (C) 2008-2011 Free Software Foundation, Inc.
Copyright (C) 2008-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Convenience header for conditional use of GNU <libintl.h>.
Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2011 Free Software
Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2012 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Character set conversion.
Copyright (C) 1999-2001, 2007, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 1999-2001, 2007, 2009-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* A GNU-like <iconv.h>.
Copyright (C) 2007-2011 Free Software Foundation, Inc.
Copyright (C) 2007-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Character set conversion.
Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Character set conversion.
Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Character set conversion handler type.
Copyright (C) 2001-2007, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2001-2007, 2009-2012 Free Software Foundation, Inc.
Written by Bruno Haible.
This program is free software: you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* inet_ntop.c -- convert IPv4 and IPv6 addresses from binary to text form
Copyright (C) 2005-2006, 2008-2011 Free Software Foundation, Inc.
Copyright (C) 2005-2006, 2008-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -38,6 +38,16 @@
/* Specification. */
#include <arpa/inet.h>
/* Use this to suppress gcc's "...may be used before initialized" warnings.
Beware: The Code argument must not contain commas. */
#ifndef IF_LINT
# ifdef lint
# define IF_LINT(Code) Code
# else
# define IF_LINT(Code) /* empty */
# endif
#endif
#if HAVE_DECL_INET_NTOP
# undef inet_ntop
@ -74,7 +84,7 @@ static const char *inet_ntop6 (const unsigned char *src, char *dst, socklen_t si
* inet_ntop(af, src, dst, size)
* convert a network format address to presentation format.
* return:
* pointer to presentation format address (`dst'), or NULL (see errno).
* pointer to presentation format address ('dst'), or NULL (see errno).
* author:
* Paul Vixie, 1996.
*/
@ -105,7 +115,7 @@ inet_ntop (int af, const void *restrict src,
* inet_ntop4(src, dst, size)
* format an IPv4 address
* return:
* `dst' (as a const)
* 'dst' (as a const)
* notes:
* (1) uses no statics
* (2) takes a u_char* not an in_addr as input
@ -167,6 +177,8 @@ inet_ntop6 (const unsigned char *src, char *dst, socklen_t size)
words[i / 2] = (src[i] << 8) | src[i + 1];
best.base = -1;
cur.base = -1;
IF_LINT(best.len = 0);
IF_LINT(cur.len = 0);
for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++)
{
if (words[i] == 0)

View file

@ -1,6 +1,6 @@
/* inet_pton.c -- convert IPv4 and IPv6 addresses from text to binary form
Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc.
Copyright (C) 2006, 2008-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -73,8 +73,8 @@ static int inet_pton6 (const char *src, unsigned char *dst);
* to network format (which is usually some kind of binary format).
* return:
* 1 if the address was valid for the specified address family
* 0 if the address wasn't valid (`dst' is untouched in this case)
* -1 if some other error occurred (`dst' is untouched in this case, too)
* 0 if the address wasn't valid ('dst' is untouched in this case)
* -1 if some other error occurred ('dst' is untouched in this case, too)
* author:
* Paul Vixie, 1996.
*/
@ -103,9 +103,9 @@ inet_pton (int af, const char *restrict src, void *restrict dst)
* like inet_aton() but without all the hexadecimal, octal (with the
* exception of 0) and shorthand.
* return:
* 1 if `src' is a valid dotted quad, else 0.
* 1 if 'src' is a valid dotted quad, else 0.
* notice:
* does not touch `dst' unless it's returning 1.
* does not touch 'dst' unless it's returning 1.
* author:
* Paul Vixie, 1996.
*/
@ -159,9 +159,9 @@ inet_pton4 (const char *restrict src, unsigned char *restrict dst)
* inet_pton6(src, dst)
* convert presentation level address to network order binary form.
* return:
* 1 if `src' is a valid [RFC1884 2.2] address, else 0.
* 1 if 'src' is a valid [RFC1884 2.2] address, else 0.
* notice:
* (1) does not touch `dst' unless it's returning 1.
* (1) does not touch 'dst' unless it's returning 1.
* (2) :: in a full address is silently ignored.
* credit:
* inspired by Mark Andrews.

View file

@ -1,5 +1,5 @@
/* Test for positive or negative infinity.
Copyright (C) 2007-2011 Free Software Foundation, Inc.
Copyright (C) 2007-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
Copyright (C) 2007-2011 Free Software Foundation, Inc.
Copyright (C) 2007-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
Copyright (C) 2007-2011 Free Software Foundation, Inc.
Copyright (C) 2007-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
Copyright (C) 2008-2011 Free Software Foundation, Inc.
Copyright (C) 2008-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Test for NaN that does not need libm.
Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Replacement for 'int' to 'long double' conversion routine.
Copyright (C) 2011 Free Software Foundation, Inc.
Copyright (C) 2011-2012 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* listen.c --- wrappers for Windows listen function
Copyright (C) 2008-2011 Free Software Foundation, Inc.
Copyright (C) 2008-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* Determine a canonical name for the current locale's character encoding.
Copyright (C) 2000-2006, 2008-2011 Free Software Foundation, Inc.
Copyright (C) 2000-2006, 2008-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -34,7 +34,7 @@
#endif
#if defined _WIN32 || defined __WIN32__
# define WIN32_NATIVE
# define WINDOWS_NATIVE
#endif
#if defined __EMX__
@ -44,7 +44,7 @@
# endif
#endif
#if !defined WIN32_NATIVE
#if !defined WINDOWS_NATIVE
# include <unistd.h>
# if HAVE_LANGINFO_CODESET
# include <langinfo.h>
@ -57,7 +57,7 @@
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# endif
#elif defined WIN32_NATIVE
#elif defined WINDOWS_NATIVE
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
#endif
@ -83,7 +83,7 @@
#endif
#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
/* Win32, Cygwin, OS/2, DOS */
/* Native Windows, Cygwin, OS/2, DOS */
# define ISSLASH(C) ((C) == '/' || (C) == '\\')
#endif
@ -123,7 +123,7 @@ get_charset_aliases (void)
cp = charset_aliases;
if (cp == NULL)
{
#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__)
#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__)
const char *dir;
const char *base = "charset.alias";
char *file_name;
@ -308,7 +308,7 @@ get_charset_aliases (void)
"DECKOREAN" "\0" "EUC-KR" "\0";
# endif
# if defined WIN32_NATIVE || defined __CYGWIN__
# if defined WINDOWS_NATIVE || defined __CYGWIN__
/* To avoid the troubles of installing a separate file in the same
directory as the DLL and of retrieving the DLL's directory at
runtime, simply inline the aliases here. */
@ -360,7 +360,7 @@ locale_charset (void)
const char *codeset;
const char *aliases;
#if !(defined WIN32_NATIVE || defined OS2)
#if !(defined WINDOWS_NATIVE || defined OS2)
# if HAVE_LANGINFO_CODESET
@ -407,10 +407,10 @@ locale_charset (void)
}
}
/* Woe32 has a function returning the locale's codepage as a number:
GetACP(). This encoding is used by Cygwin, unless the user has set
the environment variable CYGWIN=codepage:oem (which very few people
do).
/* The Windows API has a function returning the locale's codepage as a
number: GetACP(). This encoding is used by Cygwin, unless the user
has set the environment variable CYGWIN=codepage:oem (which very few
people do).
Output directed to console windows needs to be converted (to
GetOEMCP() if the console is using a raster font, or to
GetConsoleOutputCP() if it is using a TrueType font). Cygwin does
@ -453,12 +453,12 @@ locale_charset (void)
# endif
#elif defined WIN32_NATIVE
#elif defined WINDOWS_NATIVE
static char buf[2 + 10 + 1];
/* Woe32 has a function returning the locale's codepage as a number:
GetACP().
/* The Windows API has a function returning the locale's codepage as a
number: GetACP().
When the output goes to a console window, it needs to be provided in
GetOEMCP() encoding if the console is using a raster font, or in
GetConsoleOutputCP() encoding if it is using a TrueType font.

View file

@ -1,5 +1,5 @@
/* Determine a canonical name for the current locale's character encoding.
Copyright (C) 2000-2003, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2000-2003, 2009-2012 Free Software Foundation, Inc.
This file is part of the GNU CHARSET Library.
This program is free software; you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* A POSIX <locale.h>.
Copyright (C) 2007-2011 Free Software Foundation, Inc.
Copyright (C) 2007-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* Work around a bug of lstat on some systems
Copyright (C) 1997-2006, 2008-2011 Free Software Foundation, Inc.
Copyright (C) 1997-2006, 2008-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -51,11 +51,11 @@ orig_lstat (const char *filename, struct stat *buf)
# include <errno.h>
/* lstat works differently on Linux and Solaris systems. POSIX (see
`pathname resolution' in the glossary) requires that programs like
`ls' take into consideration the fact that FILE has a trailing slash
"pathname resolution" in the glossary) requires that programs like
'ls' take into consideration the fact that FILE has a trailing slash
when FILE is a symbolic link. On Linux and Solaris 10 systems, the
lstat function already has the desired semantics (in treating
`lstat ("symlink/", sbuf)' just like `lstat ("symlink/.", sbuf)',
'lstat ("symlink/", sbuf)' just like 'lstat ("symlink/.", sbuf)',
but on Solaris 9 and earlier it does not.
If FILE has a trailing slash and specifies a symbolic link,

View file

@ -1,6 +1,6 @@
/* malloc() function that is glibc compatible.
Copyright (C) 1997-1998, 2006-2007, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 1997-1998, 2006-2007, 2009-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Safe automatic memory allocation.
Copyright (C) 2003, 2006-2007, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2003, 2006-2007, 2009-2012 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Safe automatic memory allocation.
Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2003-2007, 2009-2012 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This program is free software; you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* A GNU-like <math.h>.
Copyright (C) 2002-2003, 2007-2011 Free Software Foundation, Inc.
Copyright (C) 2002-2003, 2007-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2011
/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2012
Free Software Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se),

View file

@ -1,5 +1,5 @@
/* Invalid parameter handler for MSVC runtime libraries.
Copyright (C) 2011 Free Software Foundation, Inc.
Copyright (C) 2011-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -40,7 +40,7 @@ gl_msvc_invalid_parameter_handler (const wchar_t *expression,
# else
/* Get declarations of the Win32 API functions. */
/* Get declarations of the native Windows API functions. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>

View file

@ -1,5 +1,5 @@
/* Invalid parameter handler for MSVC runtime libraries.
Copyright (C) 2011 Free Software Foundation, Inc.
Copyright (C) 2011-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -207,7 +207,7 @@ extern struct gl_msvc_inval_per_thread *gl_msvc_inval_current (void);
or when SANE_LIBRARY_HANDLING is desired. */
/* The braces here avoid GCC warnings like
"warning: suggest explicit braces to avoid ambiguous `else'". */
"warning: suggest explicit braces to avoid ambiguous 'else'". */
# define TRY_MSVC_INVAL \
do \
{ \

View file

@ -1,6 +1,6 @@
/* Wrappers that don't throw invalid parameter notifications
with MSVC runtime libraries.
Copyright (C) 2011 Free Software Foundation, Inc.
Copyright (C) 2011-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -21,7 +21,7 @@
/* Specification. */
#include "msvc-nothrow.h"
/* Get declarations of the Win32 API functions. */
/* Get declarations of the native Windows API functions. */
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

View file

@ -1,6 +1,6 @@
/* Wrappers that don't throw invalid parameter notifications
with MSVC runtime libraries.
Copyright (C) 2011 Free Software Foundation, Inc.
Copyright (C) 2011-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Provide a netdb.h header file for systems lacking it (read: MinGW).
Copyright (C) 2008-2011 Free Software Foundation, Inc.
Copyright (C) 2008-2012 Free Software Foundation, Inc.
Written by Simon Josefsson.
This program is free software; you can redistribute it and/or modify
@ -80,9 +80,9 @@ struct addrinfo
# endif
/* Possible values for `ai_flags' field in `addrinfo' structure. */
/* Possible values for 'ai_flags' field in 'addrinfo' structure. */
# ifndef AI_PASSIVE
# define AI_PASSIVE 0x0001 /* Socket address is intended for `bind'. */
# define AI_PASSIVE 0x0001 /* Socket address is intended for 'bind'. */
# endif
# ifndef AI_CANONNAME
# define AI_CANONNAME 0x0002 /* Request for canonical name. */
@ -111,16 +111,16 @@ struct addrinfo
returned address type. */
# endif
/* Error values for `getaddrinfo' function. */
/* Error values for 'getaddrinfo' function. */
# ifndef EAI_BADFLAGS
# define EAI_BADFLAGS -1 /* Invalid value for `ai_flags' field. */
# define EAI_BADFLAGS -1 /* Invalid value for 'ai_flags' field. */
# define EAI_NONAME -2 /* NAME or SERVICE is unknown. */
# define EAI_AGAIN -3 /* Temporary failure in name resolution. */
# define EAI_FAIL -4 /* Non-recoverable failure in name res. */
# define EAI_NODATA -5 /* No address associated with NAME. */
# define EAI_FAMILY -6 /* `ai_family' not supported. */
# define EAI_SOCKTYPE -7 /* `ai_socktype' not supported. */
# define EAI_SERVICE -8 /* SERVICE not supported for `ai_socktype'. */
# define EAI_FAMILY -6 /* 'ai_family' not supported. */
# define EAI_SOCKTYPE -7 /* 'ai_socktype' not supported. */
# define EAI_SERVICE -8 /* SERVICE not supported for 'ai_socktype'. */
# define EAI_MEMORY -10 /* Memory allocation failure. */
# endif
@ -141,7 +141,7 @@ struct addrinfo
# endif
# ifndef EAI_SYSTEM
/* Not defined on mingw32. */
# define EAI_SYSTEM -11 /* System error returned in `errno'. */
# define EAI_SYSTEM -11 /* System error returned in 'errno'. */
# endif
# if 0
@ -179,7 +179,7 @@ _GL_CXXALIAS_SYS (getaddrinfo, int,
_GL_CXXALIASWARN (getaddrinfo);
# if !@HAVE_DECL_FREEADDRINFO@
/* Free `addrinfo' structure AI including associated storage.
/* Free 'addrinfo' structure AI including associated storage.
For more details, see the POSIX:2001 specification
<http://www.opengroup.org/susv3xsh/getaddrinfo.html>. */
_GL_FUNCDECL_SYS (freeaddrinfo, void, (struct addrinfo *ai)

View file

@ -1,5 +1,5 @@
/* Substitute for <netinet/in.h>.
Copyright (C) 2007-2011 Free Software Foundation, Inc.
Copyright (C) 2007-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* Detect the number of processors.
Copyright (C) 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2009-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* Detect the number of processors.
Copyright (C) 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2009-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Open a descriptor to a file.
Copyright (C) 2007-2011 Free Software Foundation, Inc.
Copyright (C) 2007-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* Define PATH_MAX somehow. Requires sys/types.h.
Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2011 Free Software
Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2012 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Create a pipe, with specific opening flags.
Copyright (C) 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2009-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -31,7 +31,7 @@
#endif
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* Native Woe32 API. */
/* Native Windows API. */
# include <io.h>
@ -75,7 +75,7 @@ pipe2 (int fd[2], int flags)
}
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* Native Woe32 API. */
/* Native Windows API. */
if (_pipe (fd, 4096, flags & ~O_NONBLOCK) < 0)
{

View file

@ -1,5 +1,5 @@
/* Decomposed printf argument list.
Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2011 Free Software
Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2012 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Decomposed printf argument list.
Copyright (C) 1999, 2002-2003, 2006-2007, 2011 Free Software
Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2012 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Formatted output to strings.
Copyright (C) 1999-2000, 2002-2003, 2006-2011 Free Software Foundation, Inc.
Copyright (C) 1999-2000, 2002-2003, 2006-2012 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@ -421,7 +421,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
}
#endif
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* On native Win32, PRIdMAX is defined as "I64d".
/* On native Windows, PRIdMAX is defined as "I64d".
We cannot change it to "lld" because PRIdMAX must also
be understood by the system's printf routines. */
else if (*cp == 'I' && cp[1] == '6' && cp[2] == '4')

View file

@ -1,5 +1,5 @@
/* Parse printf format string.
Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2011 Free Software
Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2012 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2011 Free Software
/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2012 Free Software
Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C
@ -43,7 +43,7 @@ extern char **environ;
#endif
#if _LIBC
/* This lock protects against simultaneous modifications of `environ'. */
/* This lock protects against simultaneous modifications of 'environ'. */
# include <bits/libc-lock.h>
__libc_lock_define_initialized (static, envlock)
# define LOCK __libc_lock_lock (envlock)
@ -91,7 +91,7 @@ _unsetenv (const char *name)
/* Put STRING, which is of the form "NAME=VALUE", in the environment.
If STRING contains no `=', then remove STRING from the environment. */
If STRING contains no '=', then remove STRING from the environment. */
int
putenv (char *string)
{

View file

@ -1,6 +1,6 @@
/* Provide a non-threads replacement for the POSIX raise function.
Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2002-2003, 2005-2006, 2009-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* POSIX compatible read() function.
Copyright (C) 2008-2011 Free Software Foundation, Inc.
Copyright (C) 2008-2012 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This program is free software: you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* Stub for readlink().
Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2003-2007, 2009-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* recv.c --- wrappers for Windows recv function
Copyright (C) 2008-2011 Free Software Foundation, Inc.
Copyright (C) 2008-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* recvfrom.c --- wrappers for Windows recvfrom function
Copyright (C) 2008-2011 Free Software Foundation, Inc.
Copyright (C) 2008-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
# Add this package to a list of references stored in a text file.
#
# Copyright (C) 2000, 2009-2011 Free Software Foundation, Inc.
# Copyright (C) 2000, 2009-2012 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
# Remove this package from a list of references stored in a text file.
#
# Copyright (C) 2000, 2009-2011 Free Software Foundation, Inc.
# Copyright (C) 2000, 2009-2012 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* Work around rename bugs in some systems.
Copyright (C) 2001-2003, 2005-2006, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2001-2003, 2005-2006, 2009-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,6 +1,6 @@
/* Work around rmdir bugs.
Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-2011 Free Software
Copyright (C) 1988, 1990, 1999, 2003-2006, 2009-2012 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify

View file

@ -1,6 +1,6 @@
/* An interface to read and write that retries after interrupts.
Copyright (C) 1993-1994, 1998, 2002-2006, 2009-2011 Free Software
Copyright (C) 1993-1994, 1998, 2002-2006, 2009-2012 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify

View file

@ -1,5 +1,5 @@
/* An interface to read() that retries after interrupts.
Copyright (C) 2002, 2006, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2002, 2006, 2009-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

View file

@ -1,5 +1,5 @@
/* An interface to write that retries after interrupts.
Copyright (C) 2002, 2009-2011 Free Software Foundation, Inc.
Copyright (C) 2002, 2009-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by

Some files were not shown because too many files have changed in this diff Show more