From 6077fe6e4d860f5fc53c49a4266d50437f3a2817 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 9 Jul 1998 13:42:26 +0000 Subject: Update. 1998-07-09 13:39 Ulrich Drepper * Versions: Add __pthread_mutexattr_gettype and __pthread_mutexattr_settype. * lockfile.c: Use __pthread_mutexattr_settype instead of __pthread_mutexattr_setkind_np. * mutex.c: Define __pthread_mutexattr_gettype and __pthread_mutexattr_settype. * weak.c: Likewise. --- Makerules | 2 +- grp/grp.h | 4 ++-- intl/dcgettext.c | 3 ++- io/fcntl.h | 4 ++-- io/sys/stat.h | 9 +++++++-- io/utime.h | 4 ++-- libio/Versions | 5 ++--- libio/stdio.h | 1 - linuxthreads/ChangeLog | 10 ++++++++++ linuxthreads/Versions | 1 + linuxthreads/lockfile.c | 4 ++-- linuxthreads/mutex.c | 6 ++++-- linuxthreads/weaks.c | 4 ++-- 13 files changed, 37 insertions(+), 20 deletions(-) diff --git a/Makerules b/Makerules index 230b800..a339caa 100644 --- a/Makerules +++ b/Makerules @@ -280,7 +280,7 @@ endif ifeq ($(versioning),yes) -include $(common-objpfx)sysd-versions $(addprefix $(common-objpfx),$(version-maps)): $(common-objpfx)sysd-versions -generated += $(versin-maps) +generated += $(version-maps) ifndef avoid-generated $(common-objpfx)sysd-versions: $(..)Versions.def $(..)scripts/versions.awk \ diff --git a/grp/grp.h b/grp/grp.h index 11883ab..265f3c2 100644 --- a/grp/grp.h +++ b/grp/grp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 92, 95, 96, 97, 98 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,7 +34,7 @@ __BEGIN_DECLS /* For the Single Unix specification we must define this type here. */ -#if defined __USE_UNIX98 && !defined gid_t +#if defined __USE_XOPEN && !defined gid_t typedef __gid_t gid_t; # define gid_t gid_t #endif diff --git a/intl/dcgettext.c b/intl/dcgettext.c index 9f76abf..77de76f 100644 --- a/intl/dcgettext.c +++ b/intl/dcgettext.c @@ -430,7 +430,8 @@ find_msg (domain_file, msgid) struct loaded_l10nfile *domain_file; const char *msgid; { - size_t top, act, bottom; + size_t act = 0; + size_t top, bottom; struct loaded_domain *domain; if (domain_file->decided == 0) diff --git a/io/fcntl.h b/io/fcntl.h index 7c654c0..9f9fe8d 100644 --- a/io/fcntl.h +++ b/io/fcntl.h @@ -32,8 +32,8 @@ __BEGIN_DECLS numbers and flag bits for `open', `fcntl', et al. */ #include -/* For Unix98 all symbols from should also be available. */ -#ifdef __USE_UNIX98 +/* For XPG all symbols from should also be available. */ +#ifdef __USE_XOPEN # include #endif diff --git a/io/sys/stat.h b/io/sys/stat.h index 0847c0c..ab27f7c 100644 --- a/io/sys/stat.h +++ b/io/sys/stat.h @@ -27,7 +27,10 @@ #include /* For __mode_t and __dev_t. */ -#ifdef __USE_UNIX98 +#ifdef __USE_XOPEN +# define __need_time_t +# include /* For time_t. */ + /* The Single Unix specification says that some more types are available here. */ # ifndef dev_t @@ -72,7 +75,9 @@ typedef __off64_t off_t; typedef __uid_t uid_t; # define uid_t uid_t # endif +#endif /* X/Open */ +#ifdef __USE_UNIX98 # ifndef pid_t typedef __pid_t pid_t; # define pid_t pid_t @@ -83,7 +88,7 @@ __BEGIN_DECLS #include -#if defined __USE_BSD || defined __USE_MISC || defined __USE_UNIX98 +#if defined __USE_BSD || defined __USE_MISC || defined __USE_XOPEN # define S_IFMT __S_IFMT # define S_IFDIR __S_IFDIR # define S_IFCHR __S_IFCHR diff --git a/io/utime.h b/io/utime.h index 3bfdd09..bc82bca 100644 --- a/io/utime.h +++ b/io/utime.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1996, 1997, 1998 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 @@ -29,7 +29,7 @@ __BEGIN_DECLS #include -#ifdef __USE_UNIX98 +#ifdef __USE_XOPEN # define __need_time_t # include #endif diff --git a/libio/Versions b/libio/Versions index 83fc6ed..467ba22 100644 --- a/libio/Versions +++ b/libio/Versions @@ -49,10 +49,9 @@ libc { # f* fclose; fcloseall; fdopen; feof; feof_locked; feof_unlocked; ferror; ferror_locked; ferror_unlocked; fflush; fflush_locked; fflush_unlocked; - fgetc; fgetpos; fgets; fileno; fileno_locked; fileno_unlocked; flockfile; + fgetc; fgetpos; fgets; fileno; fileno_locked; fileno_unlocked; fopen; fopencookie; fputc; fputc_locked; fputc_unlocked; fputs; - fread; freopen; fseek; fsetpos; ftell; ftrylockfile; funlockfile; - fwrite; + fread; freopen; fseek; fsetpos; ftell; fwrite; # g* getc; getc_locked; getc_unlocked; getchar; getchar_unlocked; getdelim; diff --git a/libio/stdio.h b/libio/stdio.h index 1167d3c..eb0d98d 100644 --- a/libio/stdio.h +++ b/libio/stdio.h @@ -185,7 +185,6 @@ extern int fflush __P ((FILE *__stream)); #ifdef __USE_MISC /* Faster versions when locking is not required. */ -extern int fclose_unlocked __P ((FILE *__stream)); extern int fflush_unlocked __P ((FILE *__stream)); #endif diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index e5fff75..4c4cfdf 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,3 +1,13 @@ +1998-07-09 13:39 Ulrich Drepper + + * Versions: Add __pthread_mutexattr_gettype and + __pthread_mutexattr_settype. + * lockfile.c: Use __pthread_mutexattr_settype instead of + __pthread_mutexattr_setkind_np. + * mutex.c: Define __pthread_mutexattr_gettype and + __pthread_mutexattr_settype. + * weak.c: Likewise. + 1998-07-08 22:26 Ulrich Drepper * Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype. diff --git a/linuxthreads/Versions b/linuxthreads/Versions index abb2379..cc45a6c 100644 --- a/linuxthreads/Versions +++ b/linuxthreads/Versions @@ -92,6 +92,7 @@ libpthread { pthread_getconcurrency; pthread_setconcurrency; + __pthread_mutexattr_gettype; __pthread_mutexattr_settype; pthread_mutexattr_gettype; pthread_mutexattr_settype; } } diff --git a/linuxthreads/lockfile.c b/linuxthreads/lockfile.c index b0cb2ca..0c9cf27 100644 --- a/linuxthreads/lockfile.c +++ b/linuxthreads/lockfile.c @@ -1,5 +1,5 @@ /* lockfile - Handle locking and unlocking of stream. - Copyright (C) 1996 Free Software Foundation, Inc. + Copyright (C) 1996, 1998 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 @@ -77,7 +77,7 @@ __fresetlockfiles (void) pthread_mutexattr_t attr; __pthread_mutexattr_init (&attr); - __pthread_mutexattr_setkind_np (&attr, PTHREAD_MUTEX_RECURSIVE_NP); + __pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE_NP); for (fp = _IO_list_all; fp != NULL; fp = fp->_chain) __pthread_mutex_init (fp->_lock, &attr); diff --git a/linuxthreads/mutex.c b/linuxthreads/mutex.c index 44a17d5..a337bad 100644 --- a/linuxthreads/mutex.c +++ b/linuxthreads/mutex.c @@ -154,7 +154,8 @@ int __pthread_mutexattr_setkind_np(pthread_mutexattr_t *attr, int kind) return 0; } weak_alias (__pthread_mutexattr_setkind_np, pthread_mutexattr_setkind_np) -weak_alias (__pthread_mutexattr_setkind_np, pthread_mutexattr_settype) +strong_alias (__pthread_mutexattr_setkind_np, __pthread_mutexattr_settype) +weak_alias (__pthread_mutexattr_settype, pthread_mutexattr_settype) int __pthread_mutexattr_getkind_np(const pthread_mutexattr_t *attr, int *kind) { @@ -162,7 +163,8 @@ int __pthread_mutexattr_getkind_np(const pthread_mutexattr_t *attr, int *kind) return 0; } weak_alias (__pthread_mutexattr_getkind_np, pthread_mutexattr_getkind_np) -weak_alias (__pthread_mutexattr_getkind_np, pthread_mutexattr_gettype) +strong_alias (__pthread_mutexattr_getkind_np, __pthread_mutexattr_gettype) +weak_alias (__pthread_mutexattr_gettype, pthread_mutexattr_gettype) /* Once-only execution */ diff --git a/linuxthreads/weaks.c b/linuxthreads/weaks.c index ac8e116..fc0873b 100644 --- a/linuxthreads/weaks.c +++ b/linuxthreads/weaks.c @@ -50,8 +50,8 @@ weak_alias (__pthread_return_0, pthread_mutex_init) weak_alias (__pthread_return_0, pthread_mutex_destroy) weak_alias (__pthread_return_0, pthread_mutex_lock) weak_alias (__pthread_return_0, pthread_mutex_unlock) -weak_alias (__pthread_return_0, pthread_mutexattr_setkind_np) -weak_alias (__pthread_return_0, pthread_mutexattr_getkind_np) +weak_alias (__pthread_return_0, __pthread_mutexattr_settype) +weak_alias (__pthread_return_0, __pthread_mutexattr_gettype) weak_alias (__pthread_return_0, pthread_condattr_init) weak_alias (__pthread_return_0, pthread_condattr_destroy) weak_alias (__pthread_return_0, pthread_setschedparam) -- cgit v1.1