1998-07-09 13:39  Ulrich Drepper  <drepper@cygnus.com>

	* 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.
This commit is contained in:
Ulrich Drepper 1998-07-09 13:42:26 +00:00
parent 4bae556733
commit 6077fe6e4d
13 changed files with 37 additions and 20 deletions

View File

@ -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 \

View File

@ -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

View File

@ -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)

View File

@ -32,8 +32,8 @@ __BEGIN_DECLS
numbers and flag bits for `open', `fcntl', et al. */
#include <bits/fcntl.h>
/* For Unix98 all symbols from <sys/stat.h> should also be available. */
#ifdef __USE_UNIX98
/* For XPG all symbols from <sys/stat.h> should also be available. */
#ifdef __USE_XOPEN
# include <sys/stat.h>
#endif

View File

@ -27,7 +27,10 @@
#include <bits/types.h> /* For __mode_t and __dev_t. */
#ifdef __USE_UNIX98
#ifdef __USE_XOPEN
# define __need_time_t
# include <time.h> /* 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 <bits/stat.h>
#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

View File

@ -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 <bits/types.h>
#ifdef __USE_UNIX98
#ifdef __USE_XOPEN
# define __need_time_t
# include <time.h>
#endif

View File

@ -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;

View File

@ -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

View File

@ -1,3 +1,13 @@
1998-07-09 13:39 Ulrich Drepper <drepper@cygnus.com>
* 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 <drepper@cygnus.com>
* Versions: Add pthread_mutexattr_gettype, pthread_mutexattr_settype.

View File

@ -92,6 +92,7 @@ libpthread {
pthread_getconcurrency; pthread_setconcurrency;
__pthread_mutexattr_gettype; __pthread_mutexattr_settype;
pthread_mutexattr_gettype; pthread_mutexattr_settype;
}
}

View File

@ -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);

View File

@ -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 */

View File

@ -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)