Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
2003-04-19  Ulrich Drepper  <[email protected]>

	* catgets/nl_types.h: Remove __THROW marker from cancellation points.
	* dirent/dirent.h: Likewise.
	* dlfcn/dlfcn.h: Likewise.
	* grp/grp.h: Likewise.
	* iconv/iconv.h: Likewise.
	* io/fcntl.h: Likewise.
	* io/ftw.h: Likewise.
	* libio/stdio.h: Likewise.
	* misc/sys/mman.h: Likewise.
	* misc/sys/select.h: Likewise.
	* misc/sys/syslog.h: Likewise.
	* misc/sys/uio.h: Likewise.
	* posix/spawn.h: Likewise.
	* posix/unistd.h: Likewise.
	* posix/sys/wait.h: Likewise.
	* pwd/pwd.h: Likewise.
	* resolv/netdb.h: Likewise.
	* rt/aio.h: Likewise.
	* shadow/shadow.h: Likewise.
	* signal/signal.h: Likewise.
	* socket/sys/socket.h: Likewise.
	* stdlib/stdlib.h: Likewise.
	* streams/stropts.h: Likewise.
	* string/string.h: Likewise.
	* sysdeps/gnu/utmpx.h: Likewise.
	* sysvipc/sys/msg.h: Likewise.
	* termios/termios.h: Likewise.
	* time/time.h: Likewise.
	* wcsmbs/wchar.h: Likewise.
	* iconv/gconv_cache.c: Include <not-cancel.h> and use non-cancelable
	functions.
	* misc/daemon.c: Likewise.
	* sysdeps/generic/backtracesymsfd.c: Likewise.
	* sysdeps/generic/check_fds.c: Likewise.
	* sysdeps/unix/sysv/linux/gethostid.c: Likewise.
	* sysdeps/unix/sysv/linux/not-cancel.h: New file.
	* sysdeps/generic/not-cancel.h: New file.
	* csu/Makefile (distribute): Add not-cancel.h.
	* sysdeps/unix/sysv/linux/fatal-prepare.h: New file.
	* sysdeps/unix/sysv/linux/Makefile: Define FATAL_PREPARE_INCLUDE
	for assert.c and assert-perr.c to include <fatal-prepare.h>.
	* sysdeps/unix/sysv/linux/Dist: Add fatal-prepare.h.

	* sysdeps/posix/remove.c (remove): Rewrite.  No need to restore
	errno and unlink first.

	* io/ftw.c (ftw_dir): In all places assume fchdir is available.

2003-04-18  Ulrich Drepper  <[email protected]>

	* sysdeps/unix/sysv/linux/libc_fatal.c (__libc_fatal): Use
	INTERNAL_SYSCALL instead of INLINE_SYSCALL.
  • Loading branch information
Ulrich Drepper committed Apr 19, 2003
1 parent 76a6769 commit 2c00857
Show file tree
Hide file tree
Showing 45 changed files with 1,560 additions and 615 deletions.
55 changes: 55 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,58 @@
2003-04-19 Ulrich Drepper <[email protected]>

* catgets/nl_types.h: Remove __THROW marker from cancellation points.
* dirent/dirent.h: Likewise.
* dlfcn/dlfcn.h: Likewise.
* grp/grp.h: Likewise.
* iconv/iconv.h: Likewise.
* io/fcntl.h: Likewise.
* io/ftw.h: Likewise.
* libio/stdio.h: Likewise.
* misc/sys/mman.h: Likewise.
* misc/sys/select.h: Likewise.
* misc/sys/syslog.h: Likewise.
* misc/sys/uio.h: Likewise.
* posix/spawn.h: Likewise.
* posix/unistd.h: Likewise.
* posix/sys/wait.h: Likewise.
* pwd/pwd.h: Likewise.
* resolv/netdb.h: Likewise.
* rt/aio.h: Likewise.
* shadow/shadow.h: Likewise.
* signal/signal.h: Likewise.
* socket/sys/socket.h: Likewise.
* stdlib/stdlib.h: Likewise.
* streams/stropts.h: Likewise.
* string/string.h: Likewise.
* sysdeps/gnu/utmpx.h: Likewise.
* sysvipc/sys/msg.h: Likewise.
* termios/termios.h: Likewise.
* time/time.h: Likewise.
* wcsmbs/wchar.h: Likewise.
* iconv/gconv_cache.c: Include <not-cancel.h> and use non-cancelable
functions.
* misc/daemon.c: Likewise.
* sysdeps/generic/backtracesymsfd.c: Likewise.
* sysdeps/generic/check_fds.c: Likewise.
* sysdeps/unix/sysv/linux/gethostid.c: Likewise.
* sysdeps/unix/sysv/linux/not-cancel.h: New file.
* sysdeps/generic/not-cancel.h: New file.
* csu/Makefile (distribute): Add not-cancel.h.
* sysdeps/unix/sysv/linux/fatal-prepare.h: New file.
* sysdeps/unix/sysv/linux/Makefile: Define FATAL_PREPARE_INCLUDE
for assert.c and assert-perr.c to include <fatal-prepare.h>.
* sysdeps/unix/sysv/linux/Dist: Add fatal-prepare.h.

* sysdeps/posix/remove.c (remove): Rewrite. No need to restore
errno and unlink first.

* io/ftw.c (ftw_dir): In all places assume fchdir is available.

2003-04-18 Ulrich Drepper <[email protected]>

* sysdeps/unix/sysv/linux/libc_fatal.c (__libc_fatal): Use
INTERNAL_SYSCALL instead of INLINE_SYSCALL.

2003-04-17 Ulrich Drepper <[email protected]>

* sysdeps/unix/sysv/linux/Makefile: Remove db2 directory handling.
Expand Down
9 changes: 6 additions & 3 deletions catgets/nl_types.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
/* Copyright (C) 1996, 1997, 1999, 2003 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
Expand Down Expand Up @@ -36,8 +36,11 @@ typedef void *nl_catd;
/* Type used by `nl_langinfo'. */
typedef int nl_item;

/* Open message catalog for later use, returning descriptor. */
extern nl_catd catopen (__const char *__cat_name, int __flag) __THROW;
/* Open message catalog for later use, returning descriptor.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern nl_catd catopen (__const char *__cat_name, int __flag);

/* Return translation with NUMBER in SET of CATALOG; if not found
return STRING. */
Expand Down
2 changes: 1 addition & 1 deletion csu/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ omit-deps = $(patsubst %.o,%,$(start-installed-name) g$(start-installed-name) \
b$(start-installed-name) $(csu-dummies))
install-lib = $(start-installed-name) g$(start-installed-name) $(csu-dummies)
distribute = initfini.c gmon-start.c start.c defs.awk munch.awk \
abi-note.S init.c munch-tmpl.c
abi-note.S init.c munch-tmpl.c not-cancel.h
generated = version-info.h
before-compile = $(objpfx)version-info.h

Expand Down
38 changes: 25 additions & 13 deletions dirent/dirent.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 1991-1999, 2000 Free Software Foundation, Inc.
/* Copyright (C) 1991-1999, 2000, 2003 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
Expand Down Expand Up @@ -128,47 +128,59 @@ enum
typedef struct __dirstream DIR;

/* Open a directory stream on NAME.
Return a DIR stream on the directory, or NULL if it could not be opened. */
extern DIR *opendir (__const char *__name) __THROW;
Return a DIR stream on the directory, or NULL if it could not be opened.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern DIR *opendir (__const char *__name);

/* Close the directory stream DIRP.
Return 0 if successful, -1 if not. */
extern int closedir (DIR *__dirp) __THROW;
Return 0 if successful, -1 if not.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int closedir (DIR *__dirp);

/* Read a directory entry from DIRP. Return a pointer to a `struct
dirent' describing the entry, or NULL for EOF or error. The
storage returned may be overwritten by a later readdir call on the
same DIR stream.
If the Large File Support API is selected we have to use the
appropriate interface. */
appropriate interface.
This function is a possible cancellation point and therefore not
marked with __THROW. */
#ifndef __USE_FILE_OFFSET64
extern struct dirent *readdir (DIR *__dirp) __THROW;
extern struct dirent *readdir (DIR *__dirp);
#else
# ifdef __REDIRECT
extern struct dirent *__REDIRECT (readdir, (DIR *__dirp) __THROW, readdir64);
extern struct dirent *__REDIRECT (readdir, (DIR *__dirp), readdir64);
# else
# define readdir readdir64
# endif
#endif

#ifdef __USE_LARGEFILE64
extern struct dirent64 *readdir64 (DIR *__dirp) __THROW;
extern struct dirent64 *readdir64 (DIR *__dirp);
#endif

#if defined __USE_POSIX || defined __USE_MISC
/* Reentrant version of `readdir'. Return in RESULT a pointer to the
next entry. */
next entry.
This function is a possible cancellation point and therefore not
marked with __THROW. */
# ifndef __USE_FILE_OFFSET64
extern int readdir_r (DIR *__restrict __dirp,
struct dirent *__restrict __entry,
struct dirent **__restrict __result) __THROW;
struct dirent **__restrict __result);
# else
# ifdef __REDIRECT
extern int __REDIRECT (readdir_r,
(DIR *__restrict __dirp,
struct dirent *__restrict __entry,
struct dirent **__restrict __result) __THROW,
struct dirent **__restrict __result),
readdir64_r);
# else
# define readdir_r readdir64_r
Expand All @@ -178,7 +190,7 @@ extern int __REDIRECT (readdir_r,
# ifdef __USE_LARGEFILE64
extern int readdir64_r (DIR *__restrict __dirp,
struct dirent64 *__restrict __entry,
struct dirent64 **__restrict __result) __THROW;
struct dirent64 **__restrict __result);
# endif
#endif /* POSIX or misc */

Expand Down
7 changes: 5 additions & 2 deletions dlfcn/dlfcn.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@
__BEGIN_DECLS

/* Open the shared object FILE and map it in; return a handle that can be
passed to `dlsym' to get symbol values from it. */
extern void *dlopen (__const char *__file, int __mode) __THROW;
passed to `dlsym' to get symbol values from it.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern void *dlopen (__const char *__file, int __mode);

/* Unmap and close a shared object opened by `dlopen'.
The handle cannot be used again after calling `dlclose'. */
Expand Down
105 changes: 78 additions & 27 deletions grp/grp.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (C) 1991,92,95,96,97,98,99,2000,01 Free Software Foundation, Inc.
/* Copyright (C) 1991,1992,1995-2001, 2003 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
Expand Down Expand Up @@ -56,32 +56,57 @@ struct group


#if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN_EXTENDED
/* Rewind the group-file stream. */
extern void setgrent (void) __THROW;
/* Rewind the group-file stream.
/* Close the group-file stream. */
extern void endgrent (void) __THROW;
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern void setgrent (void);

/* Read an entry from the group-file stream, opening it if necessary. */
extern struct group *getgrent (void) __THROW;
/* Close the group-file stream.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern void endgrent (void);

/* Read an entry from the group-file stream, opening it if necessary.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern struct group *getgrent (void);
#endif

#ifdef __USE_SVID
/* Read a group entry from STREAM. */
extern struct group *fgetgrent (FILE *__stream) __THROW;
/* Read a group entry from STREAM.
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 struct group *fgetgrent (FILE *__stream);
#endif

#ifdef __USE_GNU
/* Write the given entry onto the given stream. */
/* Write the given entry onto the given stream.
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 putgrent (__const struct group *__restrict __p,
FILE *__restrict __f) __THROW;
FILE *__restrict __f);
#endif

/* Search for an entry with a matching group ID. */
extern struct group *getgrgid (__gid_t __gid) __THROW;
/* Search for an entry with a matching group ID.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern struct group *getgrgid (__gid_t __gid);

/* Search for an entry with a matching group name.
/* Search for an entry with a matching group name. */
extern struct group *getgrnam (__const char *__name) __THROW;
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern struct group *getgrnam (__const char *__name);

#if defined __USE_POSIX || defined __USE_MISC

Expand All @@ -97,32 +122,48 @@ extern struct group *getgrnam (__const char *__name) __THROW;
The interface may change in later versions of this library. But
the interface is designed following the principals used for the
other reentrant functions so the chances are good this is what the
POSIX people would choose. */
POSIX people would choose.
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. */

# ifdef __USE_GNU
extern int getgrent_r (struct group *__restrict __resultbuf,
char *__restrict __buffer, size_t __buflen,
struct group **__restrict __result) __THROW;
struct group **__restrict __result);
# endif

/* Search for an entry with a matching group ID. */
/* Search for an entry with a matching group ID.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int getgrgid_r (__gid_t __gid, struct group *__restrict __resultbuf,
char *__restrict __buffer, size_t __buflen,
struct group **__restrict __result) __THROW;
struct group **__restrict __result);

/* Search for an entry with a matching group name.
/* Search for an entry with a matching group name. */
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int getgrnam_r (__const char *__restrict __name,
struct group *__restrict __resultbuf,
char *__restrict __buffer, size_t __buflen,
struct group **__restrict __result) __THROW;
struct group **__restrict __result);

# ifdef __USE_SVID
/* Read a group entry from STREAM. This function is not standardized
an probably never will. */
an probably never will.
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 fgetgrent_r (FILE *__restrict __stream,
struct group *__restrict __resultbuf,
char *__restrict __buffer, size_t __buflen,
struct group **__restrict __result) __THROW;
struct group **__restrict __result);
# endif

#endif /* POSIX or reentrant */
Expand All @@ -138,14 +179,24 @@ extern int setgroups (size_t __n, __const __gid_t *__groups) __THROW;

/* Store at most *NGROUPS members of the group set for USER into
*GROUPS. Also include GROUP. The actual number of groups found is
returned in *NGROUPS. Return -1 if the if *NGROUPS is too small. */
returned in *NGROUPS. Return -1 if the if *NGROUPS is too small.
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 getgrouplist (__const char *__user, __gid_t __group,
__gid_t *__groups, int *__ngroups) __THROW;
__gid_t *__groups, int *__ngroups);

/* Initialize the group set for the current user
by reading the group database and using all groups
of which USER is a member. Also include GROUP. */
extern int initgroups (__const char *__user, __gid_t __group) __THROW;
of which USER is a member. Also include GROUP.
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 initgroups (__const char *__user, __gid_t __group);

#endif /* Use BSD. */

Expand Down
Loading

0 comments on commit 2c00857

Please sign in to comment.