[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r10178 - in /fsf/trunk/libc: ./ argp/ conform/data/sys/ csu/ io/sys/ localedata/ localedata/locales/ posix/ resolv/ sysdeps/...
- To: commits@xxxxxxxxxx
- Subject: [commits] r10178 - in /fsf/trunk/libc: ./ argp/ conform/data/sys/ csu/ io/sys/ localedata/ localedata/locales/ posix/ resolv/ sysdeps/...
- From: eglibc@xxxxxxxxxx
- Date: Mon, 05 Apr 2010 07:03:50 -0000
Author: eglibc
Date: Mon Apr 5 00:03:49 2010
New Revision: 10178
Log:
Import glibc-mainline for 2010-04-05
Added:
fsf/trunk/libc/argp/bug-argp2.c
fsf/trunk/libc/sysdeps/unix/sysv/linux/remove.c
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/argp/Makefile
fsf/trunk/libc/argp/argp-parse.c
fsf/trunk/libc/conform/data/sys/stat.h-data
fsf/trunk/libc/csu/Makefile
fsf/trunk/libc/io/sys/stat.h
fsf/trunk/libc/localedata/ChangeLog
fsf/trunk/libc/localedata/locales/es_CR
fsf/trunk/libc/localedata/locales/fr_BE
fsf/trunk/libc/posix/getopt.c
fsf/trunk/libc/resolv/netdb.h
fsf/trunk/libc/sysdeps/posix/remove.c
fsf/trunk/libc/sysdeps/x86_64/multiarch/init-arch.c
fsf/trunk/libc/sysdeps/x86_64/multiarch/init-arch.h
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Mon Apr 5 00:03:49 2010
@@ -1,3 +1,50 @@
+2010-04-04 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #11043]
+ * posix/getopt.c (_getopt_internal_r): Fix arguments printed in error
+ messages.
+
+ [BZ #11070]
+ * resolv/netdb.h: Declare iruserok and iruserok_af.
+
+ * argp/Makefile: Add rules to build and run bug-argp2.
+ * argp/bug-argp2.c: New file.
+
+2010-02-05 Sergey Poznyakoff <gray@xxxxxxxxxx>
+
+ [BZ #11254]
+ * argp/argp-parse.c (convert_options): Fix improper use of `|'
+ between character values.
+
+2010-04-04 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #11276]
+ * sysdeps/posix/remove.c (IS_NO_DIRECTORY_ERROR): Define.
+ (remove): Use IS_NO_DIRECTORY_ERROR to check for file being no
+ directory.
+ * sysdeps/unix/sysv/linux/remove.c: New file.
+
+ * conform/data/sys/stat.h-data: Fix testing of S_IS* macros.
+
+ [BZ #11279]
+ * io/sys/stat.h: Always define S_ISSOCK for XPG6 and up.
+
+ [BZ #11287]
+ * csu/Makefile ($(objpfx)version-info.h): Handle newer kernel headers
+ which don't define UTS_RELEASE.
+
+2010-04-04 H.J. Lu <hongjiu.lu@xxxxxxxxx>
+ Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #11292]
+ * sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features): Allow
+ concurrent initialization and use of __cpu_features.
+
+2010-04-04 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/x86_64/multiarch/init-arch.h (cpu_features): Add tag to
+ the enum.
+
2010-04-03 Ulrich Drepper <drepper@xxxxxxxxxx>
[BZ #11333]
Modified: fsf/trunk/libc/argp/Makefile
==============================================================================
--- fsf/trunk/libc/argp/Makefile (original)
+++ fsf/trunk/libc/argp/Makefile Mon Apr 5 00:03:49 2010
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2002, 2003, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997,2002,2003,2006,2007,2010 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -26,12 +26,13 @@
routines = $(addprefix argp-, ba fmtstream fs-xinl help parse pv \
pvh xinl eexst)
-tests = argp-test tst-argp1 bug-argp1 tst-argp2
+tests = argp-test tst-argp1 bug-argp1 tst-argp2 bug-argp2
CFLAGS-argp-help.c = $(uses-callbacks) -fexceptions
CFLAGS-argp-parse.c = $(uses-callbacks)
CFLAGS-argp-fmtstream.c = -fexceptions
bug-argp1-ARGS = -- --help
+bug-argp2-ARGS = -- -d 111 --dstaddr 222 -p 333 --peer 444
include ../Rules
Modified: fsf/trunk/libc/argp/argp-parse.c
==============================================================================
--- fsf/trunk/libc/argp/argp-parse.c (original)
+++ fsf/trunk/libc/argp/argp-parse.c Mon Apr 5 00:03:49 2010
@@ -1,5 +1,5 @@
/* Hierarchial argument parsing, layered over getopt
- Copyright (C) 1995-2000, 2002, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1995-2000, 2002, 2003, 2004, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@xxxxxxxxxxxxxx>.
@@ -99,7 +99,7 @@
static const struct argp_option argp_default_options[] =
{
- {"help", '?', 0, 0, N_("Give this help list"), -1},
+ {"help", '?', 0, 0, N_("Give this help list"), -1},
{"usage", OPT_USAGE, 0, 0, N_("Give a short usage message")},
{"program-name",OPT_PROGNAME,"NAME", OPTION_HIDDEN, N_("Set the program name")},
{"HANG", OPT_HANG, "SECS", OPTION_ARG_OPTIONAL | OPTION_HIDDEN,
@@ -164,7 +164,7 @@
static const struct argp_option argp_version_options[] =
{
- {"version", 'V', 0, 0, N_("Print program version"), -1},
+ {"version", 'V', 0, 0, N_("Print program version"), -1},
{0, 0}
};
@@ -364,7 +364,7 @@
values (the sign of the lower bits is preserved
however)... */
cvt->long_end->val =
- ((opt->key | real->key) & USER_MASK)
+ ((opt->key ? opt->key : real->key) & USER_MASK)
+ (((group - cvt->parser->groups) + 1) << USER_BITS);
/* Keep the LONG_OPTS list terminated. */
@@ -385,7 +385,7 @@
if (children)
/* Assign GROUP's CHILD_INPUTS field some space from
- CVT->child_inputs_end.*/
+ CVT->child_inputs_end.*/
{
unsigned num_children = 0;
while (children[num_children].argp)
@@ -823,7 +823,7 @@
parser->try_getopt = 0;
if (parser->state.next > 1
&& strcmp (parser->state.argv[parser->state.next - 1], QUOTE)
- == 0)
+ == 0)
/* Not only is this the end of the options, but it's a
`quoted' region, which may have args that *look* like
options, so we definitely shouldn't try to use getopt past
Added: fsf/trunk/libc/argp/bug-argp2.c
==============================================================================
--- fsf/trunk/libc/argp/bug-argp2.c (added)
+++ fsf/trunk/libc/argp/bug-argp2.c Mon Apr 5 00:03:49 2010
@@ -1,0 +1,55 @@
+#include <argp.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+static struct argp_option argp_options[] = {
+ { "dstaddr", 'd', "ADDR", 0,
+ "set destination (peer) address to ADDR" },
+ { "peer", 'p', "ADDR", OPTION_ALIAS },
+ { NULL }
+};
+
+static error_t parse_opt (int key, char *arg, struct argp_state *state);
+
+static struct argp argp =
+{
+ argp_options, parse_opt
+};
+
+static int cnt;
+
+static int
+do_test (int argc, char *argv[])
+{
+ int remaining;
+ argp_parse (&argp, argc, argv, 0, &remaining, NULL);
+ return cnt != 4;
+}
+
+static error_t
+parse_opt (int key, char *arg, struct argp_state *state)
+{
+ switch (key)
+ {
+ case 'd':
+ case 'p':
+ printf ("got '%c' with argument '%s'\n", key, arg);
+ ++cnt;
+ break;
+ case 0:
+ case ARGP_KEY_END:
+ case ARGP_KEY_NO_ARGS:
+ case ARGP_KEY_INIT:
+ case ARGP_KEY_SUCCESS:
+ case ARGP_KEY_FINI:
+ // Ignore.
+ return ARGP_ERR_UNKNOWN;
+ default:
+ printf ("invalid key '%x'\n", key);
+ exit (1);
+ }
+ return 0;
+}
+
+#define TEST_FUNCTION do_test (argc, argv)
+#include "../test-skeleton.c"
Modified: fsf/trunk/libc/conform/data/sys/stat.h-data
==============================================================================
--- fsf/trunk/libc/conform/data/sys/stat.h-data (original)
+++ fsf/trunk/libc/conform/data/sys/stat.h-data Mon Apr 5 00:03:49 2010
@@ -66,15 +66,14 @@
constant S_ISVTX
#endif
-#if !defined POSIX && !defined POSIX2008
-macro S_IFMT
+#if !defined POSIX
macro S_ISBLK
macro S_ISCHR
macro S_ISDIR
macro S_ISFIFO
macro S_ISREG
macro S_ISLNK
-macro S_IFSOCK
+macro S_ISSOCK
#endif
// How to represent optional tests?
Modified: fsf/trunk/libc/csu/Makefile
==============================================================================
--- fsf/trunk/libc/csu/Makefile (original)
+++ fsf/trunk/libc/csu/Makefile Mon Apr 5 00:03:49 2010
@@ -1,5 +1,5 @@
# Makefile for csu code for GNU C library.
-# Copyright (C) 1995-2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1995-2004, 2005, 2006, 2010 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -209,8 +209,19 @@
linux*) version=`(printf '%s\n%s\n' \
'#include <linux/version.h>' \
UTS_RELEASE \
- | $(CC) $(CPPFLAGS) -E -P - -DNOT_IN_libc=1 | \
+ | $(CC) $(CPPFLAGS) -O -E -P - -DNOT_IN_libc=1 | \
sed -e 's/"\([^"]*\)".*/\1/p' -e d) 2>/dev/null`;\
+ if [ -z "$$version" ]; then \
+ version=`(printf '%s\n%s\n' \
+ '#include <linux/version.h>' \
+ LINUX_VERSION_CODE \
+ | $(CC) $(CPPFLAGS) -O -E -P - -DNOT_IN_libc=1 \
+ | sed -n -e '/^[123456789].*/p' \
+ | awk '{v=$$1; \
+ printf("%d.%d.%d\n", \
+ v/65535, v/256%256, v%256)}') \
+ 2>/dev/null`; \
+ fi; \
if [ -z "$$version" ]; then \
if [ -r /proc/version ]; then \
version=`sed 's/.*Linux version \([^ ]*\) .*/>>\1<</' \
Modified: fsf/trunk/libc/io/sys/stat.h
==============================================================================
--- fsf/trunk/libc/io/sys/stat.h (original)
+++ fsf/trunk/libc/io/sys/stat.h Mon Apr 5 00:03:49 2010
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995-2004, 2005, 2006, 2007, 2009
+/* Copyright (C) 1991, 1992, 1995-2004, 2005, 2006, 2007, 2009, 2010
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -143,9 +143,11 @@
# define S_ISLNK(mode) 0
#endif
-#if (defined __USE_BSD || defined __USE_UNIX98) \
+#if (defined __USE_BSD || defined __USE_UNIX98 || defined __USE_XOPEN2K) \
&& defined __S_IFSOCK
# define S_ISSOCK(mode) __S_ISTYPE((mode), __S_IFSOCK)
+#elif defined __USE_XOPEN2K
+# define S_ISSOCK(mode) 0
#endif
/* These are from POSIX.1b. If the objects are not implemented using separate
Modified: fsf/trunk/libc/localedata/ChangeLog
==============================================================================
--- fsf/trunk/libc/localedata/ChangeLog (original)
+++ fsf/trunk/libc/localedata/ChangeLog Mon Apr 5 00:03:49 2010
@@ -1,3 +1,14 @@
+2010-01-28 Marcelo E. Magallon <marcelo.magallon@xxxxxxxxx>
+
+ [BZ #11258]
+ * locales/es_CR: Update for LC_MONETARY, LC_NUMERIC, LC_PAPER,
+ LC_TELEPHONE and LC_NAME and LC_ADDRESS.
+
+2010-04-04 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #11272]
+ * locales/fr_BE: Define week, first_weekday, and first_workday.
+
2010-03-24 Ulrich Drepper <drepper@xxxxxxxxxx>
[BZ #10554]
Modified: fsf/trunk/libc/localedata/locales/es_CR
==============================================================================
--- fsf/trunk/libc/localedata/locales/es_CR (original)
+++ fsf/trunk/libc/localedata/locales/es_CR Mon Apr 5 00:03:49 2010
@@ -21,8 +21,8 @@
fax ""
language "Spanish"
territory "Costa Rica"
-revision "1.0"
-date "2000-08-21"
+revision "1.1"
+date "2009-12-23"
%
category "es_CR:2000";LC_IDENTIFICATION
category "es_CR:2000";LC_CTYPE
@@ -53,9 +53,10 @@
LC_MONETARY
int_curr_symbol "<U0043><U0052><U0043><U0020>"
-currency_symbol "<U0043>"
-mon_decimal_point "<U002E>"
-mon_thousands_sep "<U002C>"
+currency_symbol "<U20A1>"
+% Decreto Ejecutivo 29660
+mon_decimal_point "<U002C>"
+mon_thousands_sep "<U0020>"
mon_grouping 3;3
positive_sign ""
negative_sign "<U002D>"
@@ -70,9 +71,10 @@
END LC_MONETARY
LC_NUMERIC
-decimal_point "<U002E>"
-thousands_sep ""
-grouping 0;0
+% Decreto Ejecutivo 29660
+decimal_point "<U002C>"
+thousands_sep "<U0020>"
+grouping 3;3
END LC_NUMERIC
LC_TIME
@@ -106,39 +108,42 @@
"<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
"<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
-d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
+d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0059>"
t_fmt "<U0025><U0054>"
am_pm "<U0061><U002E><U006D><U002E>";"<U0070><U002E><U006D><U002E>"
t_fmt_ampm "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0070>"
-date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
+date_fmt "<U0025><U0061><U0020><U0025><U0065><U0020><U0025><U0062>/
<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
<U0025><U005A><U0020><U0025><U0059>"
-first_weekday 1
+first_weekday 2
first_workday 2
END LC_TIME
LC_PAPER
-% FIXME
-height 297
-% FIXME
-width 210
+height 279
+width 216
END LC_PAPER
LC_TELEPHONE
-tel_int_fmt "<U002B><U0025><U0063><U0020><U0025><U0061><U0020><U0025>/
-<U006C>"
+tel_int_fmt "<U002B><U0025><U0063><U0020><U0025><U0061><U0020>/
+<U0025><U006C>"
+tel_dom_fmt "<U0025><U006C>"
int_prefix "<U0035><U0030><U0036>"
int_select "<U0030><U0030>"
END LC_TELEPHONE
LC_MEASUREMENT
-% FIXME
measurement 1
END LC_MEASUREMENT
LC_NAME
name_fmt "<U0025><U0064><U0025><U0074><U0025><U0067><U0025><U0074>/
<U0025><U006D><U0025><U0074><U0025><U0066>"
+name_gen "<U0053><U0072><U002E><U002F><U0053><U0072><U0061><U002E>"
+name_miss "<U0053><U0072><U0074><U0061><U002E>"
+name_mr "<U0053><U0072><U002E>"
+name_mrs "<U0053><U0072><U0061><U002E>"
+name_ms "<U0053><U0072><U0061><U002E>"
END LC_NAME
LC_ADDRESS
@@ -147,6 +152,13 @@
<U0020><U0025><U0068><U0020><U0025><U0065><U0020><U0025><U0072><U0025>/
<U004E><U0025><U007A><U0020><U0025><U0054><U0025>/
<U004E><U0025><U0063><U0025><U004E>"
+country_name "<U0043><U006F><U0073><U0074><U0061><U0020><U0052><U0069><U0063><U0061>"
+country_post "<U0043><U0052>"
+country_car "<U0043><U0052>"
+country_isbn "9930,9977,9968"
+lang_name "<U0045><U0073><U0070><U0061><U00F1><U006F><U006C>"
+lang_ab "<0065><0073>"
+lang_term "<U0073><U0070><U0061>"
country_ab2 "<U0043><U0052>"
country_ab3 "<U0043><U0052><U0049>"
country_num 188
Modified: fsf/trunk/libc/localedata/locales/fr_BE
==============================================================================
--- fsf/trunk/libc/localedata/locales/fr_BE (original)
+++ fsf/trunk/libc/localedata/locales/fr_BE Mon Apr 5 00:03:49 2010
@@ -84,34 +84,34 @@
LC_TIME
abday "<U0064><U0069><U006D>";"<U006C><U0075><U006E>";/
- "<U006D><U0061><U0072>";"<U006D><U0065><U0072>";/
- "<U006A><U0065><U0075>";"<U0076><U0065><U006E>";/
- "<U0073><U0061><U006D>"
+ "<U006D><U0061><U0072>";"<U006D><U0065><U0072>";/
+ "<U006A><U0065><U0075>";"<U0076><U0065><U006E>";/
+ "<U0073><U0061><U006D>"
day "<U0064><U0069><U006D><U0061><U006E><U0063><U0068><U0065>";/
- "<U006C><U0075><U006E><U0064><U0069>";/
- "<U006D><U0061><U0072><U0064><U0069>";/
- "<U006D><U0065><U0072><U0063><U0072><U0065><U0064><U0069>";/
- "<U006A><U0065><U0075><U0064><U0069>";/
- "<U0076><U0065><U006E><U0064><U0072><U0065><U0064><U0069>";/
- "<U0073><U0061><U006D><U0065><U0064><U0069>"
+ "<U006C><U0075><U006E><U0064><U0069>";/
+ "<U006D><U0061><U0072><U0064><U0069>";/
+ "<U006D><U0065><U0072><U0063><U0072><U0065><U0064><U0069>";/
+ "<U006A><U0065><U0075><U0064><U0069>";/
+ "<U0076><U0065><U006E><U0064><U0072><U0065><U0064><U0069>";/
+ "<U0073><U0061><U006D><U0065><U0064><U0069>"
abmon "<U006A><U0061><U006E>";"<U0066><U00E9><U0076>";/
- "<U006D><U0061><U0072>";"<U0061><U0076><U0072>";/
- "<U006D><U0061><U0069>";"<U006A><U0075><U006E>";/
- "<U006A><U0075><U0069>";"<U0061><U006F><U00FB>";/
- "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
- "<U006E><U006F><U0076>";"<U0064><U00E9><U0063>"
+ "<U006D><U0061><U0072>";"<U0061><U0076><U0072>";/
+ "<U006D><U0061><U0069>";"<U006A><U0075><U006E>";/
+ "<U006A><U0075><U0069>";"<U0061><U006F><U00FB>";/
+ "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
+ "<U006E><U006F><U0076>";"<U0064><U00E9><U0063>"
mon "<U006A><U0061><U006E><U0076><U0069><U0065><U0072>";/
- "<U0066><U00E9><U0076><U0072><U0069><U0065><U0072>";/
- "<U006D><U0061><U0072><U0073>";/
- "<U0061><U0076><U0072><U0069><U006C>";/
- "<U006D><U0061><U0069>";/
- "<U006A><U0075><U0069><U006E>";/
- "<U006A><U0075><U0069><U006C><U006C><U0065><U0074>";/
- "<U0061><U006F><U00FB><U0074>";/
- "<U0073><U0065><U0070><U0074><U0065><U006D><U0062><U0072><U0065>";/
- "<U006F><U0063><U0074><U006F><U0062><U0072><U0065>";/
- "<U006E><U006F><U0076><U0065><U006D><U0062><U0072><U0065>";/
- "<U0064><U00E9><U0063><U0065><U006D><U0062><U0072><U0065>"
+ "<U0066><U00E9><U0076><U0072><U0069><U0065><U0072>";/
+ "<U006D><U0061><U0072><U0073>";/
+ "<U0061><U0076><U0072><U0069><U006C>";/
+ "<U006D><U0061><U0069>";/
+ "<U006A><U0075><U0069><U006E>";/
+ "<U006A><U0075><U0069><U006C><U006C><U0065><U0074>";/
+ "<U0061><U006F><U00FB><U0074>";/
+ "<U0073><U0065><U0070><U0074><U0065><U006D><U0062><U0072><U0065>";/
+ "<U006F><U0063><U0074><U006F><U0062><U0072><U0065>";/
+ "<U006E><U006F><U0076><U0065><U006D><U0062><U0072><U0065>";/
+ "<U0064><U00E9><U0063><U0065><U006D><U0062><U0072><U0065>"
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
t_fmt "<U0025><U0054>"
@@ -120,6 +120,10 @@
date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
<U0025><U005A><U0020><U0025><U0059>"
+
+week 7;19971130;4
+first_weekday 2
+first_workday 2
END LC_TIME
LC_PAPER
Modified: fsf/trunk/libc/posix/getopt.c
==============================================================================
--- fsf/trunk/libc/posix/getopt.c (original)
+++ fsf/trunk/libc/posix/getopt.c Mon Apr 5 00:03:49 2010
@@ -2,7 +2,8 @@
NOTE: getopt is part of the C library, so if you don't know what
"Keep this file name-space clean" means, talk to drepper@xxxxxxx
before changing it!
- Copyright (C) 1987-1996,1998-2004,2008,2009 Free Software Foundation, Inc.
+ Copyright (C) 1987-1996,1998-2004,2008,2009,2010
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -679,8 +680,8 @@
char *buf;
if (__asprintf (&buf, _("\
-%s: option '%s' requires an argument\n"),
- argv[0], argv[d->optind - 1]) >= 0)
+%s: option '--%s' requires an argument\n"),
+ argv[0], pfound->name) >= 0)
{
_IO_flockfile (stderr);
@@ -697,8 +698,8 @@
}
#else
fprintf (stderr,
- _("%s: option '%s' requires an argument\n"),
- argv[0], argv[d->optind - 1]);
+ _("%s: option '--%s' requires an argument\n"),
+ argv[0], pfound->name);
#endif
}
d->__nextchar += strlen (d->__nextchar);
@@ -922,7 +923,7 @@
char *buf;
if (__asprintf (&buf, _("%s: option '-W %s' is ambiguous\n"),
- argv[0], argv[d->optind]) >= 0)
+ argv[0], d->optarg) >= 0)
{
_IO_flockfile (stderr);
@@ -938,7 +939,7 @@
}
#else
fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"),
- argv[0], argv[d->optind]);
+ argv[0], d->optarg);
#endif
}
d->__nextchar += strlen (d->__nextchar);
@@ -1001,8 +1002,8 @@
char *buf;
if (__asprintf (&buf, _("\
-%s: option '%s' requires an argument\n"),
- argv[0], argv[d->optind - 1]) >= 0)
+%s: option '-W %s' requires an argument\n"),
+ argv[0], pfound->name) >= 0)
{
_IO_flockfile (stderr);
@@ -1018,9 +1019,9 @@
free (buf);
}
#else
- fprintf (stderr,
- _("%s: option '%s' requires an argument\n"),
- argv[0], argv[d->optind - 1]);
+ fprintf (stderr, _("\
+%s: option '-W %s' requires an argument\n"),
+ argv[0], pfound->name);
#endif
}
d->__nextchar += strlen (d->__nextchar);
Modified: fsf/trunk/libc/resolv/netdb.h
==============================================================================
--- fsf/trunk/libc/resolv/netdb.h (original)
+++ fsf/trunk/libc/resolv/netdb.h Mon Apr 5 00:03:49 2010
@@ -517,6 +517,30 @@
extern int ruserok_af (__const char *__rhost, int __suser,
__const char *__remuser, __const char *__locuser,
sa_family_t __af);
+
+/* Check whether user REMUSER on system indicated by IPv4 address
+ RADDR is allowed to login as LOCUSER. Non-IPv4 (e.g., IPv6) are
+ not supported. If SUSER is not zero the user tries to become
+ superuser. Return 0 if it is possible.
+
+ This function is not part of POSIX and therefore no official
+ cancellation point. But due to similarity with an POSIX interface
+ or due to the implementation it is a cancellation point and
+ therefore not marked with __THROW. */
+extern int iruserok (uint32_t __raddr, int __suser,
+ __const char *__remuser, __const char *__locuser);
+
+/* This is the equivalent function where the pfamiliy if the address
+ pointed to by RADDR is determined by the value of AF. It therefore
+ can be used for IPv6
+
+ This function is not part of POSIX and therefore no official
+ cancellation point. But due to similarity with an POSIX interface
+ or due to the implementation it is a cancellation point and
+ therefore not marked with __THROW. */
+extern int iruserok_af (__const void *__raddr, int __suser,
+ __const char *__remuser, __const char *__locuser,
+ sa_family_t __af);
/* Try to allocate reserved port, returning a descriptor for a socket opened
at this port or -1 if unsuccessful. The search for an available port
Modified: fsf/trunk/libc/sysdeps/posix/remove.c
==============================================================================
--- fsf/trunk/libc/sysdeps/posix/remove.c (original)
+++ fsf/trunk/libc/sysdeps/posix/remove.c Mon Apr 5 00:03:49 2010
@@ -1,5 +1,5 @@
/* ANSI C `remove' function to delete a file or directory. POSIX.1 version.
- Copyright (C) 1995,96,97,2002,2003 Free Software Foundation, Inc.
+ Copyright (C) 1995,96,97,2002,2003,2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,6 +21,12 @@
#include <stdio.h>
#include <unistd.h>
+
+#ifndef IS_NO_DIRECTORY_ERROR
+# define IS_NO_DIRECTORY_ERROR errno != EPERM
+#endif
+
+
int
remove (file)
const char *file;
@@ -28,7 +34,7 @@
/* First try to unlink since this is more frequently the necessary action. */
if (__unlink (file) != 0
/* If it is indeed a directory... */
- && (errno != EISDIR
+ && (IS_NO_DIRECTORY_ERROR
/* ...try to remove it. */
|| __rmdir (file) != 0))
/* Cannot remove the object for whatever reason. */
Added: fsf/trunk/libc/sysdeps/unix/sysv/linux/remove.c
==============================================================================
--- fsf/trunk/libc/sysdeps/unix/sysv/linux/remove.c (added)
+++ fsf/trunk/libc/sysdeps/unix/sysv/linux/remove.c Mon Apr 5 00:03:49 2010
@@ -1,0 +1,2 @@
+#define IS_NO_DIRECTORY_ERROR errno != EISDIR
+#include <sysdeps/posix/remove.c>
Modified: fsf/trunk/libc/sysdeps/x86_64/multiarch/init-arch.c
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/multiarch/init-arch.c (original)
+++ fsf/trunk/libc/sysdeps/x86_64/multiarch/init-arch.c Mon Apr 5 00:03:49 2010
@@ -1,6 +1,6 @@
/* Initialize CPU feature data.
This file is part of the GNU C Library.
- Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,6 +18,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <atomic.h>
#include <cpuid.h>
#include "init-arch.h"
@@ -26,7 +27,7 @@
static void
-get_common_indeces (void)
+get_common_indeces (unsigned int *family, unsigned int *model)
{
__cpuid (1, __cpu_features.cpuid[COMMON_CPUID_INDEX_1].eax,
__cpu_features.cpuid[COMMON_CPUID_INDEX_1].ebx,
@@ -34,8 +35,8 @@
__cpu_features.cpuid[COMMON_CPUID_INDEX_1].edx);
unsigned int eax = __cpu_features.cpuid[COMMON_CPUID_INDEX_1].eax;
- __cpu_features.family = (eax >> 8) & 0x0f;
- __cpu_features.model = (eax >> 4) & 0x0f;
+ *family = (eax >> 8) & 0x0f;
+ *model = (eax >> 4) & 0x0f;
}
@@ -45,27 +46,30 @@
unsigned int ebx;
unsigned int ecx;
unsigned int edx;
+ unsigned int family = 0;
+ unsigned int model = 0;
+ enum cpu_features_kind kind;
__cpuid (0, __cpu_features.max_cpuid, ebx, ecx, edx);
/* This spells out "GenuineIntel". */
if (ebx == 0x756e6547 && ecx == 0x6c65746e && edx == 0x49656e69)
{
- __cpu_features.kind = arch_kind_intel;
+ kind = arch_kind_intel;
- get_common_indeces ();
+ get_common_indeces (&family, &model);
unsigned int eax = __cpu_features.cpuid[COMMON_CPUID_INDEX_1].eax;
unsigned int extended_family = (eax >> 20) & 0xff;
unsigned int extended_model = (eax >> 12) & 0xf0;
if (__cpu_features.family == 0x0f)
{
- __cpu_features.family += extended_family;
- __cpu_features.model += extended_model;
+ family += extended_family;
+ model += extended_model;
}
else if (__cpu_features.family == 0x06)
{
- __cpu_features.model += extended_model;
+ model += extended_model;
switch (__cpu_features.model)
{
case 0x1a:
@@ -85,12 +89,17 @@
/* This spells out "AuthenticAMD". */
else if (ebx == 0x68747541 && ecx == 0x444d4163 && edx == 0x69746e65)
{
- __cpu_features.kind = arch_kind_amd;
+ kind = arch_kind_amd;
- get_common_indeces ();
+ get_common_indeces (&family, &model);
}
else
- __cpu_features.kind = arch_kind_other;
+ kind = arch_kind_other;
+
+ __cpu_features.family = family;
+ __cpu_features.model = model;
+ atomic_write_barrier ();
+ __cpu_features.kind = kind;
}
#undef __get_cpu_features
Modified: fsf/trunk/libc/sysdeps/x86_64/multiarch/init-arch.h
==============================================================================
--- fsf/trunk/libc/sysdeps/x86_64/multiarch/init-arch.h (original)
+++ fsf/trunk/libc/sysdeps/x86_64/multiarch/init-arch.h Mon Apr 5 00:03:49 2010
@@ -1,5 +1,5 @@
/* This file is part of the GNU C Library.
- Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -52,7 +52,7 @@
extern struct cpu_features
{
- enum
+ enum cpu_features_kind
{
arch_kind_unknown = 0,
arch_kind_intel,