Skip to content

Commit

Permalink
Merge remote branch 'origin/master' into fedora/master
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Schwab committed Jan 11, 2010
2 parents a568350 + 33780b6 commit c14a051
Show file tree
Hide file tree
Showing 127 changed files with 1,395 additions and 439 deletions.
178 changes: 178 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,181 @@
2010-01-10 Ulrich Drepper <drepper@redhat.com>

* sysdeps/unix/sysv/linux/bits/sigaction.h: SA_RESTART, SA_NODEFER,
and SA_RESETHAND now available in Base.
* sysdeps/unix/sysv/linux/ia64/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/s390/bits/sigaction.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/sigaction.h: Likewise.
* conform/data/signal.h-data: Update for XPG7.

* posix/sys/types.h: Define id_t, clock_t, blksize_t for XPG7.

* string/strings.h: Don't declare obsolete functions for XPG7.
Declare ffs only for XSI.
* conform/data/strings.h-data: Update for XPG7.

2010-01-10 Jakub Jelinek <jakub@redhat.com>

[BZ #11125]
* libio/stdio.h: Define va_list, off_t, and ssize_t.

* posix/glob.h: Define size_t.

* posix/sys/wait.h: Define idtype_t and declare waitid for XPG7.

* signal/signal.h: Define size_t, mcontext_t, and ucontext_t for XPG7.

2010-01-10 Ulrich Drepper <drepper@redhat.com>

* conform/conformtest.pl: For XPG7 testing the headers are supposed to
be self-contained.

* conform/data/stdio.h-data: Expect off_t and ssize_t.

2010-01-09 Ulrich Drepper <drepper@redhat.com>

* libio/stdio.h: Define va_list also for XPG7.

* conform/conformtest.pl: Update for XPG7 and some bug fixes.
* conform/data/ctype.h-data: Likewise.
* conform/data/dirent.h-data: Likewise.
* conform/data/errno.h-data: Likewise.
* conform/data/fcntl.h-data: Likewise.
* conform/data/fmtmsg.h-data: Likewise.
* conform/data/fnmatch.h-data: Likewise.
* conform/data/ftw.h-data: Likewise.
* conform/data/glob.h-data: Likewise.
* conform/data/grp.h-data: Likewise.
* conform/data/iconv.h-data: Likewise.
* conform/data/langinfo.h-data: Likewise.
* conform/data/libgen.h-data: Likewise.
* conform/data/limits.h-data: Likewise.
* conform/data/locale.h-data: Likewise.
* conform/data/math.h-data: Likewise.
* conform/data/monetary.h-data: Likewise.
* conform/data/mqueue.h-data: Likewise.
* conform/data/ndbm.h-data: Likewise.
* conform/data/netdb.h-data: Likewise.
* conform/data/pthread.h-data: Likewise.
* conform/data/pwd.h-data: Likewise.
* conform/data/regex.h-data: Likewise.
* conform/data/sched.h-data: Likewise.
* conform/data/search.h-data: Likewise.
* conform/data/semaphore.h-data: Likewise.
* conform/data/setjmp.h-data: Likewise.
* conform/data/signal.h-data: Likewise.
* conform/data/spawn.h-data: Likewise.
* conform/data/stdio.h-data: Likewise.
* conform/data/stdlib.h-data: Likewise.
* conform/data/string.h-data: Likewise.
* conform/data/strings.h-data: Likewise.
* conform/data/sys/ipc.h-data: Likewise.
* conform/data/sys/msg.h-data: Likewise.
* conform/data/sys/resource.h-data: Likewise.
* conform/data/sys/sem.h-data: Likewise.
* conform/data/sys/shm.h-data: Likewise.
* conform/data/sys/socket.h-data: Likewise.
* conform/data/sys/stat.h-data: Likewise.
* conform/data/sys/time.h-data: Likewise.
* conform/data/sys/types.h-data: Likewise.
* conform/data/sys/uio.h-data: Likewise.
* conform/data/sys/wait.h-data: Likewise.
* conform/data/syslog.h-data: Likewise.
* conform/data/tar.h-data: Likewise.
* conform/data/termios.h-data: Likewise.
* conform/data/time.h-data: Likewise.
* conform/data/ulimit.h-data: Likewise.
* conform/data/unistd.h-data: Likewise.
* conform/data/utmpx.h-data: Likewise.
* conform/data/wchar.h-data: Likewise.
* conform/data/wctype.h-data: Likewise.
* conform/data/wordexp.h-data: Likewise.

* io/fcntl.h: Define mode_t macros instead of including sys/stat.h.
* sysdeps/unix/bsd/bits/stat.h: Enable using from fcntl.h.
* sysdeps/unix/sysv/linux/powerpc/bits/stat.h: Likewise.
* sysdeps/unix/sysv/linux/x86_64/bits/stat.h: Likewise.
* sysdeps/unix/sysv/linux/s390/bits/stat.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/stat.h: Likewise.
* sysdeps/unix/sysv/linux/bits/stat.h: Likewise.
* sysdeps/unix/sysv/linux/ia64/bits/stat.h: Likewise.
* sysdeps/unix/sysv/bits/stat.h: Likewise.
* sysdeps/mach/hurd/bits/stat.h: Likewise.

* stdlib/stdlib.h: Define wait-related bits for XPG7.
Don't declare valloc, mktemp, ecvt, fcvt, gcvt for XPG6 and up.
Declare mkstemp and getsubopt for XPG7.
Declare posix_openpt for XPG6 XSI.

* include/features.h: Define __USE_XOPEN2KXSI for _XOPEN_SOURCE >= 600
and __USE_XOPEN2K8XSI for _XOPEN_SOURCE >= 700.

* string/string.h: Declare strdup for XPG7.

2010-01-08 Ulrich Drepper <drepper@redhat.com>

* bits/confname.h: Define _CS_V6_ENV and _CS_V7_ENV.
* posix/confstr.c: Implement _CS_V6_ENV and _CS_V7_ENV.

* dirent/dirent.h: Really fix feature selection.

* locale/localeinfo.h: Rename struct locale_data to __locale_data.
Fix all users.
* locale/C-address.c: Fix all users.
* locale/C-collate.c: Likewise.
* locale/C-ctype.c: Likewise.
* locale/C-identification.c: Likewise.
* locale/C-measurement.c: Likewise.
* locale/C-messages.c: Likewise.
* locale/C-monetary.c: Likewise.
* locale/C-name.c: Likewise.
* locale/C-numeric.c: Likewise.
* locale/C-paper.c: Likewise.
* locale/C-telephone.c: Likewise.
* locale/C-time.c: Likewise.
* locale/findlocale.c: Likewise.
* locale/global-locale.c: Likewise.
* locale/loadarchive.c: Likewise.
* locale/loadlocale.c: Likewise.
* locale/nl_langinfo_l.c: Likewise.
* locale/setlocale.c: Likewise.
* locale/xlocale.c: Likewise.
* locale/xlocale.h: Likewise.
* stdio-common/vfscanf.c: Likewise.
* stdlib/strfmon_l.c: Likewise.
* stdlib/strtod_l.c: Likewise.
* stdlib/strtol_l.c: Likewise.
* string/strcoll_l.c: Likewise.
* string/strxfrm_l.c: Likewise.
* time/alt_digit.c: Likewise.
* time/asctime.c: Likewise.
* time/era.c: Likewise.
* time/lc-time-cleanup.c: Likewise.
* time/strftime_l.c: Likewise.
* time/strptime_l.c: Likewise.
* wcsmbs/wcsmbsload.c: Likewise.
* wcsmbs/wcsmbsload.h: Likewise.

* sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Define O_DIRECTORY,
O_NOFOLLOW, O_CLOEXEC, F_DUPFD_CLOEXEC, F_SETOWN, and F_GETOWN
for XPG7.
* sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise.
* sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Likewise.
* sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise.
* sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Likewise.
* sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise.

2010-01-07 Roland McGrath <roland@redhat.com>

* elf/elf.h (PN_XNUM): New macro.

* elf/dl-sysdep.c (_dl_important_hwcaps): Use NT_GNU_HWCAP instead of
literal 2.

2010-01-06 Ulrich Drepper <drepper@redhat.com>

* dirent/dirent.h: Fix typo in feature selection macro use.

2009-12-15 Maciej W. Rozycki <macro@codesourcery.com>

[BZ #11115]
Expand Down
7 changes: 6 additions & 1 deletion bits/confname.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* `sysconf', `pathconf', and `confstr' NAME values. Generic version.
Copyright (C) 1993,1995-1998,2000,2001,2003,2004,2007,2009
Copyright (C) 1993,1995-1998,2000,2001,2003,2004,2007,2009,2010
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Expand Down Expand Up @@ -669,4 +669,9 @@ enum
#define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS _CS_POSIX_V7_LPBIG_OFFBIG_LIBS
_CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS
#define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS

_CS_V6_ENV,
#define _CS_V6_ENV _CS_V6_ENV
_CS_V7_ENV,
#define _CS_V7_ENV _CS_V7_ENV
};
57 changes: 41 additions & 16 deletions conform/conformtest.pl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#! /usr/bin/perl

use Getopt::Long;
use POSIX;

$CC = "gcc";

Expand Down Expand Up @@ -30,7 +31,8 @@
}

if ($dialect ne "ISO" && $dialect ne "POSIX" && $dialect ne "XPG3"
&& $dialect ne "XPG4" && $dialect ne "UNIX98" && $dialect ne "XOPEN2K") {
&& $dialect ne "XPG4" && $dialect ne "UNIX98" && $dialect ne "XOPEN2K"
&& $dialect ne "XOPEN2K8" && $dialect ne "POSIX2008") {
die "unknown dialect \"$dialect\"";
}

Expand All @@ -40,6 +42,8 @@
$CFLAGS{"XPG4"} = "-I. -fno-builtin '-D__attribute__(x)=' -D_XOPEN_SOURCE_EXTENDED";
$CFLAGS{"UNIX98"} = "-I. -fno-builtin '-D__attribute__(x)=' -D_XOPEN_SOURCE=500";
$CFLAGS{"XOPEN2K"} = "-I. -fno-builtin '-D__attribute__(x)=' -D_XOPEN_SOURCE=600";
$CFLAGS{"XOPEN2K8"} = "-I. -fno-builtin '-D__attribute__(x)=' -D_XOPEN_SOURCE=700";
$CFLAGS{"POSIX2008"} = "-I. -fno-builtin '-D__attribute__(x)=' -D_POSIX_C_SOURCE=200809L";


# These are the ISO C99 keywords.
Expand All @@ -52,14 +56,17 @@
# These are symbols which are known to pollute the namespace.
@knownproblems = ('unix', 'linux', 'i386');

# Some headers need a bit more attention.
$mustprepend{'inttypes.h'} = "#include <stddef.h>\n";
$mustprepend{'regex.h'} = "#include <sys/types.h>\n";
$mustprepend{'sched.h'} = "#include <sys/types.h>\n";
$mustprepend{'signal.h'} = "#include <pthread.h>\n";
$mustprepend{'stdio.h'} = "#include <sys/types.h>\n";
$mustprepend{'wchar.h'} = "#include <stdarg.h>\n";
$mustprepend{'wordexp.h'} = "#include <stddef.h>\n";
if ($dialect ne "XOPEN2K8" && $dialect ne "POSIX2008") {
# Some headers need a bit more attention. At least with XPG7
# all headers should be self-contained.
$mustprepend{'inttypes.h'} = "#include <stddef.h>\n";
$mustprepend{'regex.h'} = "#include <sys/types.h>\n";
$mustprepend{'sched.h'} = "#include <sys/types.h>\n";
$mustprepend{'signal.h'} = "#include <pthread.h>\n";
$mustprepend{'stdio.h'} = "#include <sys/types.h>\n";
$mustprepend{'wchar.h'} = "#include <stdarg.h>\n";
$mustprepend{'wordexp.h'} = "#include <stddef.h>\n";
}

# Make a hash table from this information.
while ($#keywords >= 0) {
Expand All @@ -71,7 +78,10 @@
$isknown{pop (@knownproblems)} = 1;
}

$tmpdir = "/tmp";
$uid = getuid();
($pwname,$pwpasswd,$pwuid,$pwgid,
$pwquota,$pwcomment,$pwgcos,$pwdir,$pwshell,$pwexpire) = getpwuid($uid);
$tmpdir = "$pwdir";

$verbose = 1;

Expand Down Expand Up @@ -660,9 +670,6 @@ sub checknamespace {
$maybe_opaque = 1;
}

# Remember that this name is allowed.
push @allow, $type;

# Generate a program to test for the availability of this constant.
open (TESTFILE, ">$fnamebase.c");
print TESTFILE "$prepend";
Expand Down Expand Up @@ -690,9 +697,6 @@ sub checknamespace {
$maybe_opaque = 1;
}

# Remember that this name is allowed.
push @allow, $type;

# Generate a program to test for the availability of this type.
open (TESTFILE, ">$fnamebase.c");
print TESTFILE "$prepend";
Expand All @@ -704,6 +708,27 @@ sub checknamespace {
}
close (TESTFILE);

compiletest ($fnamebase, "Testing for type $type",
"Type \"$type\" not available.", $missing, 0);
} elsif (/^tag *({([^}]*)|([a-zA-Z0-9_]*))/) {
my($type) = "$2$3";

# Remember that this name is allowed.
if ($type =~ /^struct *(.*)/) {
push @allow, $1;
} elsif ($type =~ /^union *(.*)/) {
push @allow, $1;
} else {
push @allow, $type;
}

# Generate a program to test for the availability of this type.
open (TESTFILE, ">$fnamebase.c");
print TESTFILE "$prepend";
print TESTFILE "#include <$h>\n";
print TESTFILE "$type;\n";
close (TESTFILE);

compiletest ($fnamebase, "Testing for type $type",
"Type \"$type\" not available.", $missing, 0);
} elsif (/^optional-function *({([^}]*)}|([a-zA-Z0-9_]*)) [(][*]([a-zA-Z0-9_]*) ([(].*[)])/) {
Expand Down
20 changes: 19 additions & 1 deletion conform/data/ctype.h-data
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function int isxdigit (int)
function int tolower (int)
function int toupper (int)

#ifndef ISO
#if !defined ISO && !defined POSIX && !defined POSIX2008
function int isascii (int)
function int toascii (int)

Expand All @@ -26,4 +26,22 @@ allow is*
allow to*

allow *_t

# if defined XOPEN2K8 || defined XOPEN2K8 || defined POSIX2008
type locale_t

function int isalnum_l (int, locale_t)
function int isalpha_l (int, locale_t)
function int iscntrl_l (int, locale_t)
function int isdigit_l (int, locale_t)
function int isgraph_l (int, locale_t)
function int islower_l (int, locale_t)
function int isprint_l (int, locale_t)
function int ispunct_l (int, locale_t)
function int isspace_l (int, locale_t)
function int isupper_l (int, locale_t)
function int isxdigit_l (int, locale_t)
function int tolower_l (int, locale_t)
function int toupper_l (int, locale_t)
# endif
#endif
11 changes: 11 additions & 0 deletions conform/data/dirent.h-data
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ type DIR

type {struct dirent}

# if !defined POSIX && !defined POSIX2008
element {struct dirent} ino_t d_ino
# endif
element {struct dirent} char d_name []

type ino_t
Expand All @@ -13,9 +15,18 @@ function {DIR*} opendir (const char*)
function {struct dirent*} readdir (DIR*)
function int readdir_r (DIR*, struct dirent*, struct dirent**)
function void rewinddir (DIR*)
# if !defined POSIX && !defined POSIX2008
function void seekdir (DIR*, long int)
function {long int} telldir (DIR*)
# endif

allow d_*
allow *_t

# if defined XOPEN2K8 || defined POSIX2008
function int alphasort (const struct dirent**, const struct dirent**)
function int dirfd (DIR*)
function int scandir (const char*, struct dirent***, int(*)(const struct dirent*), int(*)(const struct dirent**,const struct dirent **))
function {DIR*} fdopendir (int)
# endif
#endif
5 changes: 5 additions & 0 deletions conform/data/errno.h-data
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ constant ETXTBSY
constant EWOULDBLOCK
constant EXDEV

# if defined XOPEN2K8 || defined POSIX2008
constant ENOTRECOVERABLE
constant EOWNERDEAD
# endif

// variable int errno
allow errno

Expand Down
Loading

0 comments on commit c14a051

Please sign in to comment.