mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Update.
1998-02-17 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/bits/errno.h (__set_errno): Don't assign to global errno variable anymore.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/* Error constants. Linux specific version.
|
||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||
Copyright (C) 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
|
||||
@ -31,16 +31,8 @@ extern int errno;
|
||||
extern int *__errno_location __P ((void)) __attribute__ ((__const__));
|
||||
|
||||
# if defined _LIBC
|
||||
# ifdef _LIBC_REENTRANT
|
||||
static inline int
|
||||
__set_errno (int __err)
|
||||
{
|
||||
return *__errno_location () = errno = __err;
|
||||
}
|
||||
# define __set_errno __set_errno
|
||||
# else /* !_LIBC_REENTRANT */
|
||||
# define __set_errno(val) errno = (val)
|
||||
# endif /* _LIBC_REENTRANT */
|
||||
/* We wouldn't need a special macro anymore but it is history. */
|
||||
# define __set_errno(val) (*__errno_location ()) = (val)
|
||||
# endif /* _LIBC */
|
||||
|
||||
# if !defined _LIBC || defined _LIBC_REENTRANT
|
||||
|
Reference in New Issue
Block a user