about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-12-15 09:16:13 +0000
committerJakub Jelinek <jakub@redhat.com>2004-12-15 09:16:13 +0000
commit0d60d7de5db10af7b1c1574520d3ab3c0f64d530 (patch)
tree55297be0fea4f11809c37ce1573cb7c564c22dcc
parent1b88b322d45419e79aff6b3b1fc2e59b78d6818d (diff)
downloadglibc-0d60d7de5db10af7b1c1574520d3ab3c0f64d530.tar.gz
glibc-0d60d7de5db10af7b1c1574520d3ab3c0f64d530.tar.xz
glibc-0d60d7de5db10af7b1c1574520d3ab3c0f64d530.zip
Updated to fedora-glibc-20041215T0847
-rw-r--r--ChangeLog44
-rw-r--r--fedora/branch.mk4
-rw-r--r--localedata/ChangeLog4
-rw-r--r--localedata/locales/en_ZA211
-rw-r--r--malloc/hooks.c22
-rw-r--r--nptl/ChangeLog12
-rw-r--r--nptl/sysdeps/powerpc/tcb-offsets.sym1
-rw-r--r--nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S3
-rw-r--r--nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S3
-rw-r--r--nptl/tst-getpid1.c34
-rw-r--r--sysdeps/mips/bits/dlfcn.h6
-rw-r--r--sysdeps/posix/sysconf.c4
-rw-r--r--sysdeps/powerpc/powerpc64/ppc-mcount.S5
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/mman.h6
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/socket.h5
-rw-r--r--sysdeps/unix/sysv/linux/mips/sys/tas.h2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S42
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S1
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S31
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S1
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S1
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S1
25 files changed, 388 insertions, 61 deletions
diff --git a/ChangeLog b/ChangeLog
index 23f4ed3341..00f512d7ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,47 @@
+2004-12-15  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Add support
+	for pid caching in nptl.
+
+2004-12-14  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Add support
+	for pid caching in nptl.
+
+2004-10-18  Maciej W. Rozycki  <macro@mips.com>
+
+	* sysdeps/unix/sysv/linux/mips/bits/socket.h (__cmsg_nxthdr): Use
+	__NTH instead of __THROW in the inline definition.
+	* sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Likewise.
+
+	* sysdeps/mips/bits/dlfcn.h (RTLD_DEEPBIND): New macro.
+
+	* sysdeps/unix/sysv/linux/mips/bits/mman.h
+	(PROT_GROWSDOWN, PROT_GROWSUP): New macros.
+
+2004-10-06  Alan Modra  <amodra@bigpond.net.au>
+
+	* sysdeps/powerpc/powerpc64/ppc-mcount.S (PROF): Don't undef.
+	* sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S: Invoke CALL_MOUNT.
+	* sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
+	* sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S: Likewise.
+	* sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S: Likewise.
+	* sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S: Likewise.
+	* sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S: Likewise.
+	* sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: Likewise.
+	* sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
+
+2004-10-19  Wolfram Gloger  <wg@malloc.de>
+
+	* malloc/hooks.c (mem2chunk_check, top_check): Handle
+	non-contiguous arena.  Reported by Michael Dalton
+	<mwdalton@stanford.edu> [BZ #457].  Add further checks for top chunk.
+
+2004-12-14  Jakub Jelinek  <jakub@redhat.com>
+
+	* sysdeps/posix/sysconf.c (__sysconf_check_spec): Remove leading
+	underscore from GETCONF_DIR filenames.
+
 2004-12-13  Ulrich Drepper  <drepper@redhat.com>
 
 	* po/de.po: Update from translation team.
diff --git a/fedora/branch.mk b/fedora/branch.mk
index 3916242a1e..2679fe2ffe 100644
--- a/fedora/branch.mk
+++ b/fedora/branch.mk
@@ -1,5 +1,5 @@
 # This file is updated automatically by Makefile.
 glibc-branch := fedora
 glibc-base := HEAD
-fedora-sync-date := 2004-12-14 10:58 UTC
-fedora-sync-tag := fedora-glibc-20041214T1058
+fedora-sync-date := 2004-12-15 08:47 UTC
+fedora-sync-tag := fedora-glibc-20041215T0847
diff --git a/localedata/ChangeLog b/localedata/ChangeLog
index 392833f6a0..ed069d80af 100644
--- a/localedata/ChangeLog
+++ b/localedata/ChangeLog
@@ -1,3 +1,7 @@
+2004-12-14  Ulrich Drepper  <drepper@redhat.com>
+
+	* locales/en_ZA: Update by Dwayne Bailey.
+
 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
 
 	* locales/pa_IN: Add some missing fields and fix some spelling
diff --git a/localedata/locales/en_ZA b/localedata/locales/en_ZA
index 2b6d160322..6e0c232bc2 100644
--- a/localedata/locales/en_ZA
+++ b/localedata/locales/en_ZA
@@ -2,14 +2,14 @@ escape_char  /
 comment_char  %
 
 % English language locale for South Africa
-% Source: Zuza Software Foundation
+% Source: Zuza Software Foundation (Translate.org.za)
 % Email: dwayne@translate.org.za
-% Tel: +27 21 4487827
-% Fax: +27 21 4489574
+% Tel: +27 12 3430389
+% Fax: +27 12 3430389
 % Language: en
 % Territory: ZA
-% Revision: 1.1
-% Date: 2003-03-14
+% Revision: 1.2
+% Date: 2003-10-27
 % Users: general
 % Repertoiremap: mnemonic,ds
 % Charset: ISO-8859-1
@@ -17,6 +17,20 @@ comment_char  %
 % for commercial purposes.
 %
 % Changelog
+% 1.2 (2004-10-27):
+%     2004-10-27 Dwayne Bailey <dwayne@translate.org.za>
+%       - Remove .* from LC_MESSAGES yes/noexpr
+%       - Change contact details and add Translate.org.za
+%         to project name
+%     2004-03-30 Dwayne Bailey <dwayne@translate.org.za>
+%       - Added country_post
+%       - Added abbreviation to LC_IDENTIFICATION
+%     2003-05-17 Dwayne Bailey <dwayne@translate.org.za>
+%       - Add lang_ab, lang_term
+%       - Add various comments for reference documents
+%       - Add country_isbn, country_car, country_ab2, 
+%         country_ab3, country_num
+%       - Add name_* for all salutations
 % 1.1 (2003-03-14):
 %   - Updated maintainer to Zuza Software Foundation
 %   - Changed %x for LC_TIME to use dd/mm/ccyy
@@ -27,16 +41,19 @@ comment_char  %
 
 LC_IDENTIFICATION
 title      "English locale for South Africa"
-source     "Zuza Software Foundation"
-address    "Box 13412, Mowbray, 7701, South Africa"
+source     "Zuza Software Foundation (Translate.org.za)"
+address    "Box 28364, Sunnyside, 0132, South Africa"
 contact    "Dwayne Bailey"
 email      "dwayne@translate.org.za"
-tel        "+27 21 448 7827"
-fax        "+27 21 448 9574"
+tel        "+27 12 343 0389"
+fax        "+27 12 343 0389"
 language   "English"
 territory  "South Africa"
-revision   "1.1"
-date       "2003-03-14"
+% audience     ""
+% application  ""
+abbreviation "Translate.org.za"
+revision   "1.2"
+date       "2003-10-27"
 %
 category  "en_ZA:2003";LC_IDENTIFICATION
 category  "en_ZA:2000";LC_CTYPE
@@ -47,7 +64,7 @@ category  "en_ZA:2000";LC_MONETARY
 category  "en_ZA:2003";LC_MESSAGES
 category  "en_ZA:2000";LC_PAPER
 category  "en_ZA:2000";LC_MEASUREMENT
-category  "en_ZA:2000";LC_NAME
+category  "en_ZA:2003";LC_NAME
 category  "en_ZA:2003";LC_ADDRESS
 category  "en_ZA:2003";LC_TELEPHONE
 
@@ -62,12 +79,23 @@ copy "iso14651_t1"
 END LC_COLLATE
 
 LC_MONETARY
+% ISO 4217 Currency and fund codes
+% http://www.bsi-global.com/Technical+Information/Publications/_Publications/tig90.xalter
+% "ZAR "
 int_curr_symbol         "<U005A><U0041><U0052><U0020>"
+
+% "R"
 currency_symbol         "<U0052>"
+
+% "."
 mon_decimal_point       "<U002E>"
+
+% ","
 mon_thousands_sep       "<U002C>"
 mon_grouping            3;3
 positive_sign           ""
+
+% "-"
 negative_sign           "<U002D>"
 int_frac_digits         2
 frac_digits             2
@@ -80,16 +108,24 @@ n_sign_posn             1
 END LC_MONETARY
 
 LC_NUMERIC
+% "."
 decimal_point           "<U002E>"
+
+% ","
 thousands_sep           "<U002C>"
 grouping                3;3
 END LC_NUMERIC
 
 LC_TIME
+% abday - The abbreviations for the week days:
+% - Sun, Mon, Tue, Wed, Thu, Fri, Sat
 abday       "<U0053><U0075><U006E>";"<U004D><U006F><U006E>";/
             "<U0054><U0075><U0065>";"<U0057><U0065><U0064>";/
             "<U0054><U0068><U0075>";"<U0046><U0072><U0069>";/
             "<U0053><U0061><U0074>"
+
+% day - The full names of the week days:
+% - Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
 day         "<U0053><U0075><U006E><U0064><U0061><U0079>";/
             "<U004D><U006F><U006E><U0064><U0061><U0079>";/
             "<U0054><U0075><U0065><U0073><U0064><U0061><U0079>";/
@@ -97,12 +133,19 @@ day         "<U0053><U0075><U006E><U0064><U0061><U0079>";/
             "<U0054><U0068><U0075><U0072><U0073><U0064><U0061><U0079>";/
             "<U0046><U0072><U0069><U0064><U0061><U0079>";/
             "<U0053><U0061><U0074><U0075><U0072><U0064><U0061><U0079>"
+
+% abmon - The abbreviations for the months 
+% - Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec
 abmon       "<U004A><U0061><U006E>";"<U0046><U0065><U0062>";/
             "<U004D><U0061><U0072>";"<U0041><U0070><U0072>";/
             "<U004D><U0061><U0079>";"<U004A><U0075><U006E>";/
             "<U004A><U0075><U006C>";"<U0041><U0075><U0067>";/
             "<U0053><U0065><U0070>";"<U004F><U0063><U0074>";/
             "<U004E><U006F><U0076>";"<U0044><U0065><U0063>"
+
+% mon - The full names of the months - 
+% - January, February, March, April, May, June
+%   July, August, September, October, November, December
 mon         "<U004A><U0061><U006E><U0075><U0061><U0072><U0079>";/
             "<U0046><U0065><U0062><U0072><U0075><U0061><U0072><U0079>";/
             "<U004D><U0061><U0072><U0063><U0068>";/
@@ -115,19 +158,57 @@ mon         "<U004A><U0061><U006E><U0075><U0061><U0072><U0079>";/
             "<U004F><U0063><U0074><U006F><U0062><U0065><U0072>";/
             "<U004E><U006F><U0076><U0065><U006D><U0062><U0065><U0072>";/
             "<U0044><U0065><U0063><U0065><U006D><U0062><U0065><U0072>"
+
+% Abreviated date and time representation to be referenced by the "%c" field descriptor -
+%
+% "%a" (short weekday name),
+% "%d" (day of month as a decimal number),
+% "%b" (short month name),
+% "%Y" (year with century as a decimal number),
+% "%T" (24-hour clock time in format HH:MM:SS),
+% "%Z" (Time zone name)
 d_t_fmt     "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
+
+% Date representation to be referenced by the "%x" field descriptor -
+% "%d/%m/%Y", day/month/year as decimal numbers (01/01/2000).
 d_fmt       "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0059>"
+
+% Time representation to be referenced by the "%X" field descriptor -
+% "%T" (24-hour clock time in format HH:MM:SS)
 t_fmt       "<U0025><U0054>"
+
+% Define representation of ante meridiem and post meridiem strings -
+% The "" mean default to "AM" and "PM".
 am_pm       "";""
+
+% Define time representation in 12-hour format with "am_pm", to be referenced by the "%r"
+% The "" means that this format is not supported.
 t_fmt_ampm  ""
+
+% Date representation not described in ISO/IEC 14652. Comes out as -
+% "%a %b %e %H:%M:%S %Z %Y" which is default "date" command output
+%
+% %a - abbreviated weekday name,
+% %b - abreviated month name,
+% %e - day of month as a decimal number with leading space (1 to 31),
+% %H - hour (24-hour clock) as a decimal number (00 to 23),
+% %M - minute as a decimal number (00 to 59),
+% %S - seconds as a decimal number (00 to 59),
+% %Z - time-zone name,
+% %Y - year with century as a decimal number,e.g. 2001.
 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>"
 END LC_TIME
 
 LC_MESSAGES
-yesexpr     "<U005E><U005B><U0079><U0059><U005D><U002E><U002A>"
-noexpr      "<U005E><U005B><U006E><U004E><U005D><U002E><U002A>"
+% The affirmative response -
+% "^[yY]"
+yesexpr     "<U005E><U005B><U0079><U0059><U005D>"
+
+% The negative response -
+% "^[nN]"
+noexpr      "<U005E><U005B><U006E><U004E><U005D>"
 END LC_MESSAGES
 
 LC_PAPER
@@ -136,10 +217,26 @@ width    210
 END LC_PAPER
 
 LC_TELEPHONE
+% Representation of telephone number for international use -
+% "+%c %a %l", which is
+% "+%c - country code",
+% "%a - area code without the prefix (often 0)",
+% "%l local number".
 tel_int_fmt    "<U002B><U0025><U0063><U0020><U0025><U0061><U0020><U0025>/
 <U006C>"
+
+% Represntation of telephone number for domestic use -
+% "(%A) %l", which is
+% %A - area code with national prefix
+% %l - local number".
 tel_dom_fmt    "<U0028><U0025><U0041><U0029><U0020><U0025><U006C>"
+
+% Prefix for making international calls
+% "09"
 int_select     "<U0030><U0039>"
+
+% International dialing code
+% "27"
 int_prefix     "<U0032><U0037>"
 
 END LC_TELEPHONE
@@ -149,20 +246,106 @@ measurement    1
 END LC_MEASUREMENT
 
 LC_NAME
+% Format for addressing a person.
+% "%d%t%g%t%m%t%f"
+%
+% "Salutation",
+% "Empty string, or <Space>",
+% "First given name",
+% "Empty string, or <Space>",
+% "Middle names",
+% "Empty string, or <Space>",
+% "Clan names"
 name_fmt    "<U0025><U0064><U0025><U0074><U0025><U0067><U0025><U0074>/
 <U0025><U006D><U0025><U0074><U0025><U0066>"
+
+% General salutation for any sex
+% (no term)
+name_gen    ""
+
+% Salutation for unmarried females
+% "Miss"
+name_miss   "<U004D><U0069><U0073><U0073>"
+ 
+% Salutation for males
+% "Mr"
+name_mr     "<U004D><U0072>"
+
+% Salutation for married females
+% "Mrs"
+name_mrs    "<U004D><U0072><U0073>"
+
+% Salutation valid for all females
+% "Ms"
+name_ms     "<U004D><U0073>"
 END LC_NAME
 
 LC_ADDRESS
+% Representation of postal addresses (minus the addressee's name) in South
+% Africa. (Ignored for now)
+% "%f%N%a%N%d%N%b%N%s %h %e %r%N%%z %T%N%c%N", which gives -
+%
+% "firm name",
+% "end of line",
+% "C/O address",
+% "end of line",
+% "department name",
+% "Building name",
+% "end of line",
+% "street or block name",
+% "space",
+% "house number or designation",
+% "space",
+% "floor number",
+% "space",
+% "room number, door designation",
+% "end of line",
+% "postal code",
+% "space",
+% "town, city",
+% "end of line",
+% "country designation for the <country_post> keyword",
+% "end of line
 postal_fmt    "<U0025><U0066><U0025><U004E><U0025><U0061><U0025><U004E>/
 <U0025><U0064><U0025><U004E><U0025><U0062><U0025><U004E><U0025><U0073>/
 <U0020><U0025><U0068><U0020><U0025><U0065><U0020><U0025><U0072><U0025>/
 <U004E><U0025><U0025><U007A><U0020><U0025><U0054><U0025>/
 <U004E><U0025><U0063><U0025><U004E>"
+
+% Country name in English - "South Africa"
 country_name  "<U0053><U006F><U0075><U0074><U0068><U0020>/
 <U0041><U0066><U0072><U0069><U0063><U0061>"
+
+% Language name in English - "English"
 lang_name     "<U0045><U006E><U0067><U006C><U0069><U0073><U0068>"
+
+% CEPT MAILCODES are suggested
+% Alternatively use the code found on your countries postal item tracking number
+% "ZA"
+country_post   "<U005A><U0041>"
+
+% UN Geneve 1949:68 Distinguishing signs of vehicles in international traffic
+% http://www.unece.org/trans/conventn/disting-signs-5-2001.pdf
+% "ZA"
+country_car   "<U005A><U0041>"
+
+% ISO 2108
+% http://www.isbn-international.org/html/prefix/prefa.htm
+country_isbn  0
+
+% ISO 639 language abbreviations:
+% 639-1 2 letter, 639-2 3 letter terminology
+% http://www.loc.gov/standards/iso639-2/englagn.html
+% "en", "eng"
+lang_ab       "<U0065><U006E>"
+lang_term     "<U0065><U006E><U0067>"
+lang_lib      "<U0065><U006E><U0067>"
+
+% ISO 3166 country number and 2 and 3 letter abreviations
+% http://www.unicode.org/onlinedat/countries.html
+% "ZA", "ZAF"
 country_ab2   "<U005A><U0041>"
 country_ab3   "<U005A><U0041><U0046>"
 country_num   710
+
 END LC_ADDRESS
diff --git a/malloc/hooks.c b/malloc/hooks.c
index 8a94fd0be8..a5c97f3133 100644
--- a/malloc/hooks.c
+++ b/malloc/hooks.c
@@ -157,15 +157,16 @@ mem2chunk_check(mem) Void_t* mem;
 
   if(!aligned_OK(mem)) return NULL;
   p = mem2chunk(mem);
-  if( (char*)p>=mp_.sbrk_base &&
-      (char*)p<(mp_.sbrk_base+main_arena.system_mem) ) {
+  if (!chunk_is_mmapped(p)) {
     /* Must be a chunk in conventional heap memory. */
-    if(chunk_is_mmapped(p) ||
-       ( (sz = chunksize(p)),
-	 ((char*)p + sz)>=(mp_.sbrk_base+main_arena.system_mem) ) ||
+    int contig = contiguous(&main_arena);
+    sz = chunksize(p);
+    if((contig &&
+	((char*)p<mp_.sbrk_base ||
+	 ((char*)p + sz)>=(mp_.sbrk_base+main_arena.system_mem) )) ||
        sz<MINSIZE || sz&MALLOC_ALIGN_MASK || !inuse(p) ||
        ( !prev_inuse(p) && (p->prev_size&MALLOC_ALIGN_MASK ||
-                            (long)prev_chunk(p)<(long)mp_.sbrk_base ||
+                            (contig && (char*)prev_chunk(p)<mp_.sbrk_base) ||
                             next_chunk(prev_chunk(p))!=p) ))
       return NULL;
     magic = MAGICBYTE(p);
@@ -213,8 +214,13 @@ top_check()
   INTERNAL_SIZE_T front_misalign, sbrk_size;
   unsigned long pagesz = malloc_getpagesize;
 
-  if((char*)t + chunksize(t) == mp_.sbrk_base + main_arena.system_mem ||
-     t == initial_top(&main_arena)) return 0;
+  if (t == initial_top(&main_arena) ||
+      (!chunk_is_mmapped(t) &&
+       chunksize(t)>=MINSIZE &&
+       prev_inuse(t) &&
+       (!contiguous(&main_arena) ||
+	(char*)t + chunksize(t) == mp_.sbrk_base + main_arena.system_mem)))
+    return 0;
 
   malloc_printerr (check_action, "malloc: top chunk is corrupt", t);
 
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 981781807b..7d9054481f 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,15 @@
+2004-12-15  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
+
+2004-12-14  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/powerpc/tcb-offsets.sym: Add TID.
+	* sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
+
+	* tst-getpid1.c: If child crashes, report this first.  Print which
+	signal.
+
 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
 
 	* init.c (__pthread_initialize_minimal_internal): Also unblock
diff --git a/nptl/sysdeps/powerpc/tcb-offsets.sym b/nptl/sysdeps/powerpc/tcb-offsets.sym
index fddd466f08..a9701fb5b7 100644
--- a/nptl/sysdeps/powerpc/tcb-offsets.sym
+++ b/nptl/sysdeps/powerpc/tcb-offsets.sym
@@ -12,3 +12,4 @@
 MULTIPLE_THREADS_OFFSET		thread_offsetof (header.multiple_threads)
 #endif
 PID				thread_offsetof (pid)
+TID				thread_offsetof (tid)
diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S b/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S
new file mode 100644
index 0000000000..e19579e842
--- /dev/null
+++ b/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S
@@ -0,0 +1,3 @@
+#define RESET_PID
+#include <tcb-offsets.h>
+#include <sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S>
diff --git a/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S b/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S
new file mode 100644
index 0000000000..f87adf4737
--- /dev/null
+++ b/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S
@@ -0,0 +1,3 @@
+#define RESET_PID
+#include <tcb-offsets.h>
+#include <sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S>
diff --git a/nptl/tst-getpid1.c b/nptl/tst-getpid1.c
index 061b48d735..497bebed56 100644
--- a/nptl/tst-getpid1.c
+++ b/nptl/tst-getpid1.c
@@ -1,5 +1,6 @@
 #include <sched.h>
 #include <signal.h>
+#include <string.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <sys/types.h>
@@ -66,20 +67,6 @@ do_test (void)
       }
   while  (si.si_signo != sig || si.si_code != SI_QUEUE);
 
-  if (si.si_int != (int) p)
-    {
-      printf ("expected PID %d, got si_int %d\n", (int) p, si.si_int);
-      kill (p, SIGKILL);
-      return 1;
-    }
-
-  if (si.si_pid != p)
-    {
-      printf ("expected PID %d, got si_pid %d\n", (int) p, (int) si.si_pid);
-      kill (p, SIGKILL);
-      return 1;
-    }
-
   int e;
   if (waitpid (p, &e, __WCLONE) != p)
     {
@@ -89,7 +76,10 @@ do_test (void)
     }
   if (!WIFEXITED (e))
     {
-      puts ("did not terminate correctly");
+      if (WIFSIGNALED (e))
+	printf ("died from signal %s\n", strsignal (WTERMSIG (e)));
+      else
+	puts ("did not terminate correctly");
       return 1;
     }
   if (WEXITSTATUS (e) != 0)
@@ -98,6 +88,20 @@ do_test (void)
       return 1;
     }
 
+  if (si.si_int != (int) p)
+    {
+      printf ("expected PID %d, got si_int %d\n", (int) p, si.si_int);
+      kill (p, SIGKILL);
+      return 1;
+    }
+
+  if (si.si_pid != p)
+    {
+      printf ("expected PID %d, got si_pid %d\n", (int) p, (int) si.si_pid);
+      kill (p, SIGKILL);
+      return 1;
+    }
+
   if (getpid () != mypid)
     {
       puts ("my PID changed");
diff --git a/sysdeps/mips/bits/dlfcn.h b/sysdeps/mips/bits/dlfcn.h
index c5b4c5950b..a5b5bf53ff 100644
--- a/sysdeps/mips/bits/dlfcn.h
+++ b/sysdeps/mips/bits/dlfcn.h
@@ -1,5 +1,6 @@
 /* System dependent definitions for run-time dynamic loading.
-   Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1999, 2000, 2001, 2004
+	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
@@ -24,8 +25,9 @@
 /* The MODE argument to `dlopen' contains one of the following: */
 #define RTLD_LAZY	0x0001	/* Lazy function call binding.  */
 #define RTLD_NOW	0x0002	/* Immediate function call binding.  */
-#define	RTLD_BINDING_MASK  0x3	/* Mask of binding time value.  */
+#define RTLD_BINDING_MASK  0x3	/* Mask of binding time value.  */
 #define RTLD_NOLOAD	0x00008	/* Do not load the object.  */
+#define RTLD_DEEPBIND	0x00010	/* Use deep binding.  */
 
 /* If the following bit is set in the MODE argument to `dlopen',
    the symbols of the loaded object and its dependencies are made
diff --git a/sysdeps/posix/sysconf.c b/sysdeps/posix/sysconf.c
index cdd1fe9636..de72e84829 100644
--- a/sysdeps/posix/sysconf.c
+++ b/sysdeps/posix/sysconf.c
@@ -1227,9 +1227,9 @@ __sysconf_check_spec (const char *spec)
   size_t getconf_dirlen = strlen (getconf_dir);
   size_t speclen = strlen (spec);
 
-  char name[getconf_dirlen + sizeof ("/_POSIX_V6_") + speclen];
+  char name[getconf_dirlen + sizeof ("/POSIX_V6_") + speclen];
   memcpy (mempcpy (mempcpy (name, getconf_dir, getconf_dirlen),
-		   "/_POSIX_V6_", sizeof ("/_POSIX_V6_") - 1),
+		   "/POSIX_V6_", sizeof ("/POSIX_V6_") - 1),
 	  spec, speclen + 1);
 
   struct stat64 st;
diff --git a/sysdeps/powerpc/powerpc64/ppc-mcount.S b/sysdeps/powerpc/powerpc64/ppc-mcount.S
index eaa586a0d8..46cb9fdc8a 100644
--- a/sysdeps/powerpc/powerpc64/ppc-mcount.S
+++ b/sysdeps/powerpc/powerpc64/ppc-mcount.S
@@ -17,11 +17,6 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-/* This would be bad.  */
-#ifdef PROF
-#undef PROF
-#endif
-
 #include <sysdep.h>
 /* We don't need to save the parameter-passing registers as gcc takes
    care of that for us.  Thus this function looks fairly normal.
diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h
index e05f2a6d4d..154501fba2 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h
@@ -1,5 +1,5 @@
 /* Definitions for POSIX memory map interface.  Linux/MIPS version.
-   Copyright (C) 1997, 2000, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2000, 2003, 2004 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
@@ -34,6 +34,10 @@
 #define PROT_WRITE	0x2		/* Page can be written.  */
 #define PROT_EXEC	0x4		/* Page can be executed.  */
 #define PROT_NONE	0x0		/* Page can not be accessed.  */
+#define PROT_GROWSDOWN	0x01000000	/* Extend change to start of
+					   growsdown vma (mprotect only).  */
+#define PROT_GROWSUP	0x02000000	/* Extend change to start of
+					   growsup vma (mprotect only).  */
 
 /* Sharing types (must choose one and only one of these).  */
 #define MAP_SHARED	0x01		/* Share changes.  */
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket.h b/sysdeps/unix/sysv/linux/mips/bits/socket.h
index a10c3a711a..1dd82eb866 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket.h
@@ -1,5 +1,6 @@
 /* System-specific socket constants and types.  Linux/MIPS version.
-   Copyright (C) 1991,92,1994-1999,2000,2001 Free Software Foundation, Inc.
+   Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004
+	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
@@ -261,7 +262,7 @@ extern struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr,
 #  define _EXTERN_INLINE extern __inline
 # endif
 _EXTERN_INLINE struct cmsghdr *
-__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
+__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
 {
   if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
     /* The kernel header does this so there may be a reason.  */
diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h
index e5180f9475..1183b867b8 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/tas.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h
@@ -34,7 +34,7 @@ extern int _test_and_set (int *p, int v) __THROW;
 # endif
 
 _EXTERN_INLINE int
-_test_and_set (int *p, int v) __THROW
+__NTH (_test_and_set (int *p, int v))
 {
   int r, t;
 
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S
index 11768bcbb7..891cf83631 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S
@@ -1,5 +1,5 @@
 /* Wrapper around clone system call.
-   Copyright (C) 1997,98,99,2000,02 Free Software Foundation, Inc.
+   Copyright (C) 1997,98,99,2000,02,2004 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
@@ -24,6 +24,10 @@
 #include <bp-sym.h>
 #include <bp-asm.h>
 
+#define CLONE_VM	0x00000100
+#define CLONE_THREAD	0x00010000
+
+
 /* This is the only really unusual system call in PPC linux, but not
    because of any weirdness in the system call itself; because of
    all the freaky stuff we have to do to make the call useful.  */
@@ -44,11 +48,15 @@ ENTRY (BP_SYM (__clone))
 	beq-	cr0,L(badargs)
 
 	/* Set up stack frame for parent.  */
-	stwu	r1,-32(r1)
-#ifndef __ASSUME_FIXED_CLONE_SYSCALL
-	stmw	r29,16(r1)
+	stwu	r1,-36(r1)
+#ifdef RESET_PID
+	stmw	r28,16(r1)
 #else
+# ifndef __ASSUME_FIXED_CLONE_SYSCALL
+	stmw	r29,16(r1)
+# else
 	stmw	r30,16(r1)
+# endif
 #endif
 
 	/* Set up stack frame for child.  */
@@ -61,6 +69,9 @@ ENTRY (BP_SYM (__clone))
 #ifndef __ASSUME_FIXED_CLONE_SYSCALL
 	mr	r29,r4			/* Stack pointer in r29.  */
 #endif
+#ifdef RESET_PID
+	mr	r28,r5
+#endif
 	mr	r31,r6			/* Argument in r31.  */
 
 	/* 'flags' argument is first parameter to clone syscall. (The other
@@ -88,6 +99,19 @@ ENTRY (BP_SYM (__clone))
 	mr	r1,r29
 #endif
 
+#ifdef RESET_PID
+	andis.	r0,r28,1	/* This is & CLONE_THREAD */
+	bne+	r0,L(oldpid)
+	andi.	r0,r28,CLONE_VM
+	li	r3,-1
+	bne-	r0,L(nomoregetpid)
+	DO_CALL(SYS_ify(getpid))
+L(nomoregetpid):
+	stw	r3,TID(r2)
+	stw	r3,PID(r2)
+L(oldpid):
+#endif
+
 	/* Call procedure.  */
 	mtctr	r30
 	mr	r3,r31
@@ -97,12 +121,16 @@ ENTRY (BP_SYM (__clone))
 
 L(parent):
 	/* Parent.  Restore registers & return.  */
-#ifndef __ASSUME_FIXED_CLONE_SYSCALL
-	lmw	r29,16(r1)
+#ifdef RESET_PID
+	lmw	r28,16(r1)
 #else
+# ifndef __ASSUME_FIXED_CLONE_SYSCALL
+	lmw	r29,16(r1)
+# else
 	lmw	r30,16(r1)
+# endif
 #endif
-	addi	r1,r1,32
+	addi	r1,r1,36
 	bnslr+
 	b	JUMPTARGET(__syscall_error)
 
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S
index 233697bf5e..3f74f55271 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S
@@ -29,6 +29,7 @@
 	.tc __curbrk[TC],__curbrk
 	.section ".text"
 ENTRY (BP_SYM (__brk))
+	CALL_MCOUNT 1
 	DISCARD_BOUNDS (r3)	/* the bounds are meaningless, so toss 'em.  */
 
 	stdu    r1,-64(r1)
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S
index 1386b2fa22..be069c90c8 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S
@@ -23,6 +23,9 @@
 #include <bp-sym.h>
 #include <bp-asm.h>
 
+#define CLONE_VM	0x00000100
+#define CLONE_THREAD	0x00010000
+
 /* This is the only really unusual system call in PPC linux, but not
    because of any weirdness in the system call itself; because of
    all the freaky stuff we have to do to make the call useful.  */
@@ -32,6 +35,7 @@
                   void *tls [r8], void *child_tid [r9]); */
 
 ENTRY (BP_SYM (__clone))
+	CALL_MCOUNT 7
 	/* GKM FIXME: add bounds checks, where sensible.  */
 	DISCARD_BOUNDS (r4)
 	DISCARD_BOUNDS (r6)
@@ -44,10 +48,13 @@ ENTRY (BP_SYM (__clone))
 	beq-	cr0,L(badargs)
 
 	/* Set up stack frame for parent.  */
-	stdu	r1,-80(r1)
+	stdu	r1,-88(r1)
 	std	r29,56(r1)
 	std	r30,64(r1)
 	std	r31,72(r1)
+#ifdef RESET_PID
+	std	r28,80(r1)
+#endif
 
 	/* Set up stack frame for child.  */
 	clrrdi	r4,r4,4
@@ -57,6 +64,9 @@ ENTRY (BP_SYM (__clone))
 	/* Save fn, args, stack across syscall.  */
 	mr	r29,r3			/* Function in r29.  */
 	mr	r30,r4			/* Stack pointer in r30.  */
+#ifdef RESET_PID
+	mr	r28,r5			/* Flags in r28.  */
+#endif
 	mr	r31,r6			/* Argument in r31.  */
 
 	/* 'flags' argument is first parameter to clone syscall. (The other
@@ -80,6 +90,20 @@ ENTRY (BP_SYM (__clone))
 	   it adds a race condition if a signal is sent to a thread
 	   just after it is created (in the previous three instructions).  */
 	mr	r1,r30
+
+#ifdef RESET_PID
+	andis.	r0,r28,1	/* This is & CLONE_THREAD */
+	bne+	r0,L(oldpid)
+	andi.	r0,r28,CLONE_VM
+	li	r3,-1
+	bne-	r0,L(nomoregetpid)
+	DO_CALL(SYS_ify(getpid))
+L(nomoregetpid):
+	stw	r3,TID(r13)
+	stw	r3,PID(r13)
+L(oldpid):
+#endif
+
 	/* Call procedure.  */
 	ld	r0,0(r29)
 	ld	r2,8(r29)
@@ -95,10 +119,13 @@ ENTRY (BP_SYM (__clone))
 
 L(parent):
 	/* Parent.  Restore registers & return.  */
+#ifdef RESET_PID
+	ld	r28,88(r1)
+#endif
 	ld	r31,72(r1)
 	ld	r30,64(r1)
 	ld	r29,56(r1)
-	addi	r1,r1,80
+	addi	r1,r1,88
 	bnslr+
 	b	JUMPTARGET(__syscall_error)
 
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S
index 851a171fa3..0f392366eb 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S
@@ -30,6 +30,7 @@
 
 #if SHLIB_COMPAT (libc, GLIBC_2_3, GLIBC_2_3_4)
 ENTRY(__novec_getcontext)
+	CALL_MCOUNT 1
 #ifdef __ASSUME_NEW_RT_SIGRETURN_SYSCALL
   std  r0,(SIGCONTEXT_GP_REGS+(PT_R0*8))(r3)
   std  r1,(SIGCONTEXT_GP_REGS+(PT_R1*8))(r3)
@@ -167,6 +168,7 @@ compat_symbol (libc, __novec_getcontext, getcontext, GLIBC_2_3)
 
 	.machine	"altivec"
 ENTRY(__getcontext)
+	CALL_MCOUNT 1
 #ifdef __ASSUME_NEW_RT_SIGRETURN_SYSCALL
   std  r0,(SIGCONTEXT_GP_REGS+(PT_R0*8))(r3)
   std  r1,(SIGCONTEXT_GP_REGS+(PT_R1*8))(r3)
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S
index adfeb3ee72..8034559200 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S
@@ -26,6 +26,7 @@
 #include <asm/errno.h>
 
 ENTRY(__makecontext)
+	CALL_MCOUNT 3
 #ifdef __ASSUME_NEW_RT_SIGRETURN_SYSCALL
   /* Save parameters into the parameter save area of callers frame.  */
   std  r3,FRAME_PARM1_SAVE(r1) /* ucontext_t *ucp  */
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S
index 278489fb36..6514f442a6 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S
@@ -29,6 +29,7 @@
 
 #if SHLIB_COMPAT (libc, GLIBC_2_3, GLIBC_2_3_4)
 ENTRY(__novec_setcontext)
+	CALL_MCOUNT 1
 #ifdef __ASSUME_NEW_RT_SIGRETURN_SYSCALL
   mflr  r0
   std   r31,-8(1)
@@ -194,6 +195,7 @@ compat_symbol (libc, __novec_setcontext, setcontext, GLIBC_2_3)
 
 	.machine	"altivec"
 ENTRY(__setcontext)
+	CALL_MCOUNT 1
 #ifdef __ASSUME_NEW_RT_SIGRETURN_SYSCALL
   mflr  r0
   std   r31,-8(1)
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S
index a6dbcea24f..ec3ab5d9e6 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S
@@ -51,6 +51,7 @@
 
 	.text
 ENTRY(__socket)
+	CALL_MCOUNT NARGS
 	cfi_startproc
 	stdu r1,-144(r1)
 	cfi_adjust_cfa_offset(144)
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
index ad1ba6963b..6644c8abff 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
@@ -29,6 +29,7 @@
 
 #if SHLIB_COMPAT (libc, GLIBC_2_3, GLIBC_2_3_4)
 ENTRY(__novec_swapcontext)
+	CALL_MCOUNT 2
 #ifdef __ASSUME_NEW_RT_SIGRETURN_SYSCALL
   std  r0,(SIGCONTEXT_GP_REGS+(PT_R0*8))(r3)
   std  r1,(SIGCONTEXT_GP_REGS+(PT_R1*8))(r3)
@@ -289,6 +290,7 @@ compat_symbol (libc, __novec_swapcontext, swapcontext, GLIBC_2_3)
 
 	.machine	"altivec"
 ENTRY(__swapcontext)
+	CALL_MCOUNT 2
 #ifdef __ASSUME_NEW_RT_SIGRETURN_SYSCALL
   std  r0,(SIGCONTEXT_GP_REGS+(PT_R0*8))(r3)
   std  r1,(SIGCONTEXT_GP_REGS+(PT_R1*8))(r3)
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S
index d36b917e1c..2f5df38cf8 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S
@@ -27,6 +27,7 @@
    and the process ID of the new process to the old process.  */
 
 ENTRY (__vfork)
+	CALL_MCOUNT 0
 
 #ifdef __NR_vfork