Age | Commit message (Collapse) | Author |
|
WG14 decided to use the name C23 as the informal name of the next
revision of the C standard (notwithstanding the publication date in
2024). Update references to C2X in glibc to use the C23 name.
This is intended to update everything *except* where it involves
renaming files (the changes involving renaming tests are intended to
be done separately). In the case of the _ISOC2X_SOURCE feature test
macro - the only user-visible interface involved - support for that
macro is kept for backwards compatibility, while adding
_ISOC23_SOURCE.
Tested for x86_64.
|
|
|
|
In documentation, call strings like "CST" time zone abbreviations, not
time zone names. This terminology is more precise, and is what tzdb uses.
A string like "CST" is ambiguous and does not fully name a time zone.
|
|
strftime(3) doesn't accept null pointers in any of the parameters.
Cc: Paul Eggert <eggert@cs.ucla.edu>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
|
|
The next revision of the ISO C standard has added the timegm function
(that was already supported in glibc). Update the feature test
conditionals on its declaration in <time.h> accordingly.
Tested for x86_64.
|
|
clock_settime()
clock_settime64()
clock_gettime()
clock_gettime64()
Add __nonnull((2)) to avoid null pointer access.
Link: https://sourceware.org/bugzilla/show_bug.cgi?id=27662
Link: https://sourceware.org/bugzilla/show_bug.cgi?id=29084
Signed-off-by: Xiaoming Ni <nixiaoming@huawei.com>
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
|
|
I used these shell commands:
../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright
(cd ../glibc && git commit -am"[this commit message]")
and then ignored the output, which consisted lines saying "FOO: warning:
copyright statement not found" for each of 7061 files FOO.
I then removed trailing white space from math/tgmath.h,
support/tst-support-open-dev-null-range.c, and
sysdeps/x86_64/multiarch/strlen-vec.S, to work around the following
obscure pre-commit check failure diagnostics from Savannah. I don't
know why I run into these diagnostics whereas others evidently do not.
remote: *** 912-#endif
remote: *** 913:
remote: *** 914-
remote: *** error: lines with trailing whitespace found
...
remote: *** error: sysdeps/unix/sysv/linux/statx_cp.c: trailing lines
|
|
A new build flag, _TIME_BITS, enables the usage of the newer 64-bit
time symbols for legacy ABI (where 32-bit time_t is default). The 64
bit time support is only enabled if LFS (_FILE_OFFSET_BITS=64) is
also used.
Different than LFS support, the y2038 symbols are added only for the
required ABIs (armhf, csky, hppa, i386, m68k, microblaze, mips32,
mips64-n32, nios2, powerpc32, sparc32, s390-32, and sh). The ABIs with
64-bit time support are unchanged, both for symbol and types
redirection.
On Linux the full 64-bit time support requires a minimum of kernel
version v5.1. Otherwise, the 32-bit fallbacks are used and might
results in error with overflow return code (EOVERFLOW).
The i686-gnu does not yet support 64-bit time.
This patch exports following rediretions to support 64-bit time:
* libc:
adjtime
adjtimex
clock_adjtime
clock_getres
clock_gettime
clock_nanosleep
clock_settime
cnd_timedwait
ctime
ctime_r
difftime
fstat
fstatat
futimens
futimes
futimesat
getitimer
getrusage
gettimeofday
gmtime
gmtime_r
localtime
localtime_r
lstat_time
lutimes
mktime
msgctl
mtx_timedlock
nanosleep
nanosleep
ntp_gettime
ntp_gettimex
ppoll
pselec
pselect
pthread_clockjoin_np
pthread_cond_clockwait
pthread_cond_timedwait
pthread_mutex_clocklock
pthread_mutex_timedlock
pthread_rwlock_clockrdlock
pthread_rwlock_clockwrlock
pthread_rwlock_timedrdlock
pthread_rwlock_timedwrlock
pthread_timedjoin_np
recvmmsg
sched_rr_get_interval
select
sem_clockwait
semctl
semtimedop
sem_timedwait
setitimer
settimeofday
shmctl
sigtimedwait
stat
thrd_sleep
time
timegm
timerfd_gettime
timerfd_settime
timespec_get
utime
utimensat
utimes
utimes
wait3
wait4
* librt:
aio_suspend
mq_timedreceive
mq_timedsend
timer_gettime
timer_settime
* libanl:
gai_suspend
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
|
|
ISO C2X added the asctime_r, ctime_r, gmtime_r and localtime_r
functions from POSIX. It's now removed asctime_r and ctime_r again,
reflecting that they are marked obsolescent in POSIX; update glibc's
time.h accordingly.
The same change that removed those two functions from C2X also marked
asctime and ctime as deprecated (reflecting how POSIX shows them as
obsolescent), i.e. using the [[deprecated]] attribute in the
prototypes shown in C2X. It's less clear if we should explicitly
deprecate those functions like that in the glibc headers; this patch
does nothing regarding such a deprecation (there's no normative
requirement from C2X showing the functions as deprecated).
Tested for x86_64 and x86.
|
|
ISO C2X adds a timespec_getres function alongside the C11
timespec_get, with functionality similar to that of POSIX clock_getres
(including allowing a NULL pointer to be passed to the function).
Implement this function for glibc, similarly to the implementation of
timespec_get.
This includes a basic test like that of timespec_get, but no
documentation in the manual, given that TIME_UTC and timespec_get
aren't documented in the manual at all. The handling of 64-bit time
follows that in timespec_get; people maintaining patch series for
64-bit time will need to update them accordingly (to export
__timespec_getres64, redirect calls in time.h and run the test for
_TIME_BITS=64).
Tested for x86_64 and x86, and (previous version; only testcase
differs) with build-many-glibcs.py.
|
|
I used these shell commands:
../glibc/scripts/update-copyrights $PWD/../gnulib/build-aux/update-copyright
(cd ../glibc && git commit -am"[this commit message]")
and then ignored the output, which consisted lines saying "FOO: warning:
copyright statement not found" for each of 6694 files FOO.
I then removed trailing white space from benchtests/bench-pthread-locks.c
and iconvdata/tst-iconv-big5-hkscs-to-2ucs4.c, to work around this
diagnostic from Savannah:
remote: *** pre-commit check failed ...
remote: *** error: lines with trailing whitespace found
remote: error: hook declined to update refs/heads/master
|
|
|
|
C2X adds the asctime_r, ctime_r, gmtime_r and localtime_r functions.
This patch duly adds __GLIBC_USE (ISOC2X) to the conditions under
which <time.h> declares them.
Tested for x86_64.
|
|
Unconditionally, on all ports, use clock_settime to implement stime,
not settimeofday or a direct syscall. Then convert stime into a
compatibility symbol and remove its prototype from time.h.
Checked on x86_64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu,
powerpc64-linux-gnu, powerpc-linux-gnu, and aarch64-linux-gnu.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
|
|
Also, change sources.redhat.com to sourceware.org.
This patch was automatically generated by running the following shell
script, which uses GNU sed, and which avoids modifying files imported
from upstream:
sed -ri '
s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g
s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g
' \
$(find $(git ls-files) -prune -type f \
! -name '*.po' \
! -name 'ChangeLog*' \
! -path COPYING ! -path COPYING.LIB \
! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \
! -path manual/texinfo.tex ! -path scripts/config.guess \
! -path scripts/config.sub ! -path scripts/install-sh \
! -path scripts/mkinstalldirs ! -path scripts/move-if-change \
! -path INSTALL ! -path locale/programs/charmap-kw.h \
! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \
! '(' -name configure \
-execdir test -f configure.ac -o -f configure.in ';' ')' \
! '(' -name preconfigure \
-execdir test -f preconfigure.ac ';' ')' \
-print)
and then by running 'make dist-prepare' to regenerate files built
from the altered files, and then executing the following to cleanup:
chmod a+x sysdeps/unix/sysv/linux/riscv/configure
# Omit irrelevant whitespace and comment-only changes,
# perhaps from a slightly-different Autoconf version.
git checkout -f \
sysdeps/csky/configure \
sysdeps/hppa/configure \
sysdeps/riscv/configure \
sysdeps/unix/sysv/linux/csky/configure
# Omit changes that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines
git checkout -f \
sysdeps/powerpc/powerpc64/ppc-mcount.S \
sysdeps/unix/sysv/linux/s390/s390-64/syscall.S
# Omit change that caused a pre-commit check to fail like this:
# remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline
git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
|
|
* All files with FSF copyright notices: Update copyright dates
using scripts/update-copyrights.
* locale/programs/charmap-kw.h: Regenerated.
* locale/programs/locfile-kw.h: Likewise.
|
|
|
|
* All files with FSF copyright notices: Update copyright dates
using scripts/update-copyrights.
* locale/programs/charmap-kw.h: Regenerated.
* locale/programs/locfile-kw.h: Likewise.
|
|
<locale.h> is specified to define locale_t in POSIX.1-2008, and so are
all of the headers that define functions that take locale_t arguments.
Under _GNU_SOURCE, the additional headers that define such functions
have also always defined locale_t. Therefore, there is no need to use
__locale_t in public function prototypes, nor in any internal code.
* ctype/ctype-c99_l.c, ctype/ctype.h, ctype/ctype_l.c
* include/monetary.h, include/stdlib.h, include/time.h
* include/wchar.h, locale/duplocale.c, locale/freelocale.c
* locale/global-locale.c, locale/langinfo.h, locale/locale.h
* locale/localeinfo.h, locale/newlocale.c
* locale/nl_langinfo_l.c, locale/uselocale.c
* localedata/bug-usesetlocale.c, localedata/tst-xlocale2.c
* stdio-common/vfscanf.c, stdlib/monetary.h, stdlib/stdlib.h
* stdlib/strfmon_l.c, stdlib/strtod_l.c, stdlib/strtof_l.c
* stdlib/strtol.c, stdlib/strtol_l.c, stdlib/strtold_l.c
* stdlib/strtoll_l.c, stdlib/strtoul_l.c, stdlib/strtoull_l.c
* string/strcasecmp.c, string/strcoll_l.c, string/string.h
* string/strings.h, string/strncase.c, string/strxfrm_l.c
* sysdeps/ieee754/float128/strtof128_l.c
* sysdeps/ieee754/float128/wcstof128.c
* sysdeps/ieee754/float128/wcstof128_l.c
* sysdeps/ieee754/ldbl-128ibm/strtold_l.c
* sysdeps/ieee754/ldbl-64-128/strtold_l.c
* sysdeps/ieee754/ldbl-opt/nldbl-compat.c
* sysdeps/ieee754/ldbl-opt/nldbl-strfmon_l.c
* sysdeps/ieee754/ldbl-opt/nldbl-strtold_l.c
* sysdeps/ieee754/ldbl-opt/nldbl-wcstold_l.c
* sysdeps/powerpc/powerpc32/power7/strcasecmp.S
* sysdeps/powerpc/powerpc64/power7/strcasecmp.S
* sysdeps/x86_64/strcasecmp_l-nonascii.c
* sysdeps/x86_64/strncase_l-nonascii.c, time/strftime_l.c
* time/strptime_l.c, time/time.h, wcsmbs/mbsrtowcs_l.c
* wcsmbs/wchar.h, wcsmbs/wcscasecmp.c, wcsmbs/wcsncase.c
* wcsmbs/wcstod.c, wcsmbs/wcstod_l.c, wcsmbs/wcstof.c
* wcsmbs/wcstof_l.c, wcsmbs/wcstol_l.c, wcsmbs/wcstold.c
* wcsmbs/wcstold_l.c, wcsmbs/wcstoll_l.c, wcsmbs/wcstoul_l.c
* wcsmbs/wcstoull_l.c, wctype/iswctype_l.c
* wctype/towctrans_l.c, wctype/wcfuncs_l.c
* wctype/wctrans_l.c, wctype/wctype.h, wctype/wctype_l.c:
Change all uses of __locale_t to locale_t.
|
|
xlocale.h is already a single-type micro-header, defining struct
__locale_struct and the typedefs __locale_t and locale_t. This patch
brings it into the bits/types/ scheme: there are now
bits/types/__locale_t.h which defines only __locale_struct and
__locale_t, and bits/types/locale_t.h which defines locale_t as well
as the other two. None of *our* headers need __locale_t.h, but it
appears to me that libstdc++ could make use of it.
There are a lot of external uses of xlocale.h, but all the uses I
checked had an autoconf test or equivalent for its existence. It has
never been available from other C libraries, and it has always
contained a comment reading "This file is not standardized, don't rely
on it, it can go away without warning" so I think dropping it is
pretty safe.
I also took the opportunity to clean up comments in various public
header files that still talk about the *_l interfaces as though they
were completely nonstandard. There are a few of them, notably the
strtoX_l and wcstoX_l families, that haven't been standardized, but
the bulk are in POSIX.1-2008.
* locale/xlocale.h: Rename to...
* locale/bits/types/__locale_t.h: ...here. Adjust commentary.
Only define struct __locale_struct and __locale_t, not locale_t.
* locale/bits/types/locale_t.h: New file; define locale_t here.
* locale/Makefile (headers): Update to match.
* include/xlocale.h: Delete wrapper.
* include/bits/types/__locale_t.h: New wrapper.
* include/bits/types/locale_t.h: New wrapper.
* ctype/ctype.h, include/printf.h, include/time.h
* locale/langinfo.h, locale/locale.h, stdlib/monetary.h
* stdlib/stdlib.h, string/string.h, string/strings.h, time/time.h
* wcsmbs/wchar.h, wctype/wctype.h: Use bits/types/locale_t.h.
Correct outdated comments regarding the standardization status of
the functions that take locale_t arguments.
* stdlib/strtod_l.c, stdlib/strtof_l.c, stdlib/strtol_l.c
* stdlib/strtold_l.c, stdlib/strtoul_l.c, stdlib/strtoull_l.c
* sysdeps/ieee754/ldbl-128ibm/strtold_l.c
* sysdeps/ieee754/ldbl-64-128/strtold_l.c
* wcsmbs/wcstod.c, wcsmbs/wcstod_l.c, wcsmbs/wcstof.c
* wcsmbs/wcstof_l.c, wcsmbs/wcstold.c, wcsmbs/wcstold_l.c:
Don't include xlocale.h. If necessary, include locale.h instead.
* stdlib/strtold_l.c: Unconditionally include wchar.h.
|
|
glibc headers include some code (not particularly consistent or
systematic) to put various declarations in C++ namespaces std and
__c99, if _GLIBCPP_USE_NAMESPACES is defined.
As noted in <https://gcc.gnu.org/ml/libstdc++/2017-03/msg00025.html>,
this macro was removed from libstdc++ in 2000. I don't expect
compilation with such old versions of libstdc++ to work with current
glibc headers anyway (whereas old *binaries* are expected to stay
working with current glibc); this patch (which should be a no-op with
any libstdc++ version postdating that removal) removes all this code
from the glibc headers.
The begin-end-check.pl test, whose comments say it is about checking
these namespace macro calls, is also removed. The code in that test
would have covered __BEGIN_DECLS / __END_DECLS as well, but if those
weren't properly matched it would show up with the
check-installed-headers-cxx tests, so I don't think there is an actual
use for keeping begin-end-check.pl with the namespace code removed.
Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch).
* misc/sys/cdefs.h (__BEGIN_NAMESPACE_STD): Remove macro.
(__END_NAMESPACE_STD): Likewise.
(__USING_NAMESPACE_STD): Likewise.
(__BEGIN_NAMESPACE_C99): Likewise.
(__END_NAMESPACE_C99): Likewise.
(__USING_NAMESPACE_C99): Likewise.
* math/math.h (_Mdouble_BEGIN_NAMESPACE): Do not define and
undefine macro.
(_Mdouble_END_NAMESPACE): Likewise.
* ctype/ctype.h: Do not handle C++ namespaces.
* libio/bits/stdio-ldbl.h: Likewise.
* libio/stdio.h: Likewise.
* locale/locale.h: Likewise.
* math/bits/mathcalls.h: Likewise.
* setjmp/setjmp.h: Likewise.
* signal/signal.h: Likewise.
* stdlib/bits/stdlib-float.h: Likewise.
* stdlib/bits/stdlib-ldbl.h: Likewise.
* stdlib/stdlib.h: Likewise.
* string/string.h: Likewise.
* sysdeps/x86/fpu/bits/mathinline.h: Likewise.
* time/bits/types/clock_t.h: Likewise.
* time/bits/types/struct_tm.h: Likewise.
* time/bits/types/time_t.h: Likewise.
* time/time.h: Likewise.
* wcsmbs/bits/wchar-ldbl.h: Likewise.
* wcsmbs/uchar.h: Likewise.
* wcsmbs/wchar.h: Likewise.
[_GLIBCPP_USE_NAMESPACES] (wint_t): Remove conditional definition.
* wctype/wctype.h: Do not handle C++ namespaces.
* scripts/begin-end-check.pl: Remove.
* Makefile (installed-headers): Likewise.
(tests-special): Do not add $(objpfx)begin-end-check.out.
($(objpfx)begin-end-check.out): Remove.
|
|
|
|
Many headers are expected to expose a subset of the type definitions
in time.h. time.h has a whole bunch of messy logic for conditionally
defining some its types and structs, but, as best I can tell, this
has never worked 100%. In particular, __need_timespec is ineffective
if _TIME_H has already been defined, which means that if you compile
#include <time.h>
#include <sched.h>
with e.g. -fsyntax-only -std=c89 -Wall -Wsystem-headers, you will get
In file included from test.c:2:0:
/usr/include/sched.h:74:57: warning: "struct timespec" declared inside
parameter list will not be visible outside of this definition or declaration
extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW;
^~~~~~~~
And if you want to _use_ sched_rr_get_interval in a TU compiled that
way, you're hosed.
This patch replaces all of that with small bits/types/TYPE.h headers
as introduced earlier. time.h and bits/time.h are now *much* simpler,
and a lot of other headers are slightly simpler.
* time/time.h, bits/time.h, sysdeps/unix/sysv/linux/bits/time.h:
Remove all logic conditional on __need macros. Move all the
conditionally defined types to their own headers...
* time/bits/types/clock_t.h: Define clock_t here.
* time/bits/types/clockid_t.h: Define clockid_t here.
* time/bits/types/struct_itimerspec.h: Define struct itimerspec here.
* time/bits/types/struct_timespec.h: Define struct timespec here.
* time/bits/types/struct_timeval.h: Define struct timeval here.
* time/bits/types/struct_tm.h: Define struct tm here.
* time/bits/types/time_t.h: Define time_t here.
* time/bits/types/timer_t.h: Define timer_t here.
* time/Makefile: Install the new headers.
* bits/resource.h, io/fcntl.h, io/sys/poll.h, io/sys/stat.h
* io/utime.h, misc/sys/select.h, posix/sched.h, posix/sys/times.h
* posix/sys/types.h, resolv/netdb.h, rt/aio.h, rt/mqueue.h
* signal/signal.h, pthread/semaphore.h, sysdeps/nptl/pthread.h
* sysdeps/unix/sysv/linux/alpha/bits/resource.h
* sysdeps/unix/sysv/linux/alpha/sys/acct.h
* sysdeps/unix/sysv/linux/bits/resource.h
* sysdeps/unix/sysv/linux/bits/timex.h
* sysdeps/unix/sysv/linux/mips/bits/resource.h
* sysdeps/unix/sysv/linux/net/ppp_defs.h
* sysdeps/unix/sysv/linux/sparc/bits/resource.h
* sysdeps/unix/sysv/linux/sys/acct.h
* sysdeps/unix/sysv/linux/sys/timerfd.h
* sysvipc/sys/msg.h, sysvipc/sys/sem.h, sysvipc/sys/shm.h
* time/sys/time.h, time/sys/timeb.h
Use the new bits/types headers.
* include/time.h: Remove __need logic.
* include/bits/time.h
* include/bits/types/clock_t.h, include/bits/types/clockid_t.h
* include/bits/types/time_t.h, include/bits/types/timer_t.h
* include/bits/types/struct_itimerspec.h
* include/bits/types/struct_timespec.h
* include/bits/types/struct_timeval.h
* include/bits/types/struct_tm.h:
New wrapper headers.
|
|
|
|
|
|
This patch completes the headers cleanup consequent on removal of
_BSD_SOURCE and _SVID_SOURCE (apart from any subsequent deprecations):
* #endif conditionals that referred to BSD or SVID are updated.
* Redundant __USE_* tests in cases involving __USE_MISC are removed.
This includes cases such as __USE_MISC || __USE_ISOC99, where
__USE_MISC is redundant (because __USE_MISC is only ever defined in
the default / _DEFAULT_SOURCE / _GNU_SOURCE case, when __USE_ISOC99
is also defined; the same applies to the non-XSI-extended POSIX
versions), and cases involving __USE_GNU, where __USE_GNU is
redundant (because if __USE_GNU is defined, so are the other __USE_*
macros). There may well be other cases of __USE_FOO || __USE_BAR
tests that could be simplified because one macro implies the other;
this patch only addresses cases involving __USE_MISC.
Tested x86_64.
* bits/fcntl.h [__USE_MISC]: Remove redundant conditionals.
* bits/sigaction.h [__USE_MISC]: Likewise.
* bits/waitstatus.h: Update #endif comments.
* ctype/ctype.h: Likewise.
* dirent/dirent.h: Likewise.
[__USE_MISC]: Remove redundant conditionals.
* grp/grp.h: Update #endif comments.
[__USE_GNU]: Remove redundant conditionals.
[__USE_MISC]: Likewise.
* inet/netinet/in.h [__USE_GNU]: Likewise.
* io/sys/stat.h [__USE_MISC]: Likewise.
* libio/bits/stdio-ldbl.h [__USE_MISC]: Likewise.
* libio/bits/stdio.h: Update #endif comments.
[__USE_MISC]: Remove redundant conditionals.
* libio/bits/stdio2.h [__USE_MISC]: Likewise.
* libio/stdio.h: Update #endif comments.
[__USE_MISC]: Remove redundant conditionals.
* math/bits/math-finite.h [__USE_MISC]: Likewise.
* math/bits/mathcalls.h [__USE_MISC]: Likewise.
* math/math.h: Update #else and #endif comments.
[__USE_MISC]: Remove redundant conditionals.
* misc/sys/uio.h: Update #endif comments.
* posix/bits/unistd.h [__USE_MISC]: Remove redundant conditionals.
* posix/glob.h [__USE_MISC]: Likewise.
* posix/sys/types.h: Update #endif comments.
[__USE_MISC]: Remove redundant conditionals.
* posix/sys/wait.h: Update #endif comments.
[__USE_MISC]: Remove redundant conditionals.
* posix/unistd.h: Update #endif comments.
[__USE_MISC]: Remove redundant conditionals.
* pwd/pwd.h [__USE_GNU]: Likewise.
[__USE_MISC]: Likewise.
* resolv/netdb.h [__USE_GNU]: Likewise.
* signal/signal.h: Update #endif comments.
[__USE_MISC]: Remove redundant conditionals.
* stdlib/stdlib.h: Update #else and #endif comments.
[__USE_MISC]: Remove redundant conditionals.
[__USE_GNU]: Likewise.
* string/bits/string2.h [__USE_MISC]: Likewise.
* string/string.h: Update #endif comments.
[__USE_MISC]: Remove redundant conditionals.
* sysdeps/m68k/m680x0/fpu/bits/mathinline.h [__USE_MISC]:
Likewise.
* sysdeps/mach/hurd/bits/fcntl.h [__USE_MISC]: Likewise.
* sysdeps/mach/hurd/bits/stat.h [__USE_MISC]: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/sigaction.h [__USE_MISC]:
Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/stat.h [__USE_MISC]:
Likewise.
* sysdeps/unix/sysv/linux/bits/fcntl-linux.h: Update #endif
comments.
[__USE_MISC]: Remove redundant conditionals.
* sysdeps/unix/sysv/linux/bits/in.h [__USE_GNU]: Likewise.
* sysdeps/unix/sysv/linux/bits/sigaction.h [__USE_MISC]: Likewise.
* sysdeps/unix/sysv/linux/bits/socket.h [__USE_GNU]: Likewise.
* sysdeps/unix/sysv/linux/bits/stat.h [__USE_MISC]: Likewise.
* sysdeps/unix/sysv/linux/ia64/bits/sigaction.h [__USE_MISC]:
Likewise.
* sysdeps/unix/sysv/linux/m68k/bits/stat.h [__USE_MISC]: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/sigaction.h [__USE_MISC]:
Likewise.
* sysdeps/unix/sysv/linux/mips/bits/stat.h [__USE_MISC]: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/stat.h [__USE_MISC]:
Likewise.
* sysdeps/unix/sysv/linux/s390/bits/sigaction.h [__USE_MISC]:
Likewise.
* sysdeps/unix/sysv/linux/s390/bits/stat.h [__USE_MISC]: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/sigaction.h [__USE_MISC]:
Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/stat.h [__USE_MISC]:
Likewise.
* sysdeps/unix/sysv/linux/x86/bits/stat.h [__USE_MISC]: Likewise.
* sysdeps/x86/bits/string.h: Update #endif comments.
* sysdeps/x86/fpu/bits/mathinline.h [__USE_MISC]: Remove redundant
conditionals.
* time/sys/time.h: Update #endif comments.
* time/time.h: Likewise.
[__USE_MISC]: Remove redundant conditionals.
|
|
This patch cleans up cases of __USE_MISC that are trivially redundant
after the recent substitution of __USE_MISC for __USE_BSD and
__USE_SVID: either in constructs such as "defined __USE_MISC ||
defined __USE_MISC", or else (in the bits/mman.h case) a conditional
on __USE_MISC nested inside another __USE_MISC conditional. (The
cleanups remaining after this patch are still quite large, but it
seems a reasonable piece to separate out.)
Tested x86_64.
* bits/mman.h [__USE_MISC]: Remove redundant conditionals.
* ctype/ctype.h [__USE_MISC]: Likewise.
* dirent/dirent.h [__USE_MISC]: Likewise.
* grp/grp.h [__USE_MISC]: Likewise.
* io/fcntl.h [__USE_MISC]: Likewise.
* io/sys/stat.h [__USE_MISC]: Likewise.
* libio/stdio.h [__USE_MISC]: Likewise.
* posix/unistd.h [__USE_MISC]: Likewise.
* pwd/pwd.h [__USE_MISC]: Likewise.
* stdlib.h [__USE_MISC]: Likewise.
* string/bits/string2.h [__USE_MISC]: Likewise.
* string/string.h [__USE_MISC]: Likewise.
* time/time.h [__USE_MISC]: Likewise.
|
|
This patch cleans up following the obsoletion of _BSD_SOURCE and
_SVID_SOURCE by combining __USE_BSD and __USE_SVID into __USE_MISC.
The only non-mechanical part of this patch is the changes to
features.h; everything else is simple substitution of __USE_MISC for
the old macros. Thus, this patch leaves obviously redundant
conditionals such as "defined __USE_MISC || defined __USE_MISC", and
does not update #endif comments where they referred to BSD or SVID in
words instead of the literal macro name. This is intended to
facilitate patch review by separating the less mechanical changes from
these purely mechanical changes into a separate patch. (I do intend
to integrate all the changes from
<https://sourceware.org/ml/libc-alpha/2013-12/msg00226.html>, which I
believe includes all the trailing comment updates, in subsequent
patches.)
Tested x86_64.
* include/features.h (__USE_BSD): Remove macro definitions.
(__USE_SVID): Likewise.
(_BSD_SOURCE): Likewise.
(_SVID_SOURCE): Likewise.
[!defined _BSD_SOURCE && !defined _SVID_SOURCE]: Remove condition
from definition of _DEFAULT_SOURCE.
[_BSD_SOURCE || _SVID_SOURCE]: Change condition to
[_DEFAULT_SOURCE].
* bits/fcntl.h [__USE_BSD]: Change condition to [__USE_MISC].
* bits/mman.h [__USE_BSD]: Likewise.
* bits/termios.h [__USE_BSD]: Likewise.
* bits/waitstatus.h [__USE_BSD]: Likewise.
* ctype/ctype.h [__USE_SVID]: Likewise.
* dirent/dirent.h [__USE_BSD]: Likewise.
* grp/grp.h [__USE_SVID]: Likewise.
[__USE_BSD]: Likewise.
* inet/netinet/igmp.h [__USE_BSD]: Likewise.
* io/fcntl.h [__USE_BSD]: Likewise.
* io/ftw.h [__USE_BSD]: Likewise.
* io/sys/stat.h [__USE_BSD]: Likewise.
* libio/bits/stdio-ldbl.h [__USE_BSD]: Likewise.
* libio/bits/stdio2.h [__USE_BSD]: Likewise.
* libio/stdio.h [__USE_SVID]: Likewise.
[__USE_BSD]: Likewise.
* math/math.h [__USE_SVID]: Likewise.
[__USE_BSD]: Likewise.
* misc/bits/syslog-ldbl.h [__USE_BSD]: Likewise.
* misc/bits/syslog.h [__USE_BSD]: Likewise.
* misc/search.h [__USE_SVID]: Likewise.
* misc/sys/mman.h [__USE_BSD]: Likewise.
* misc/sys/syslog.h [__USE_BSD]: Likewise.
* misc/sys/uio.h [__USE_BSD]: Likewise.
* posix/bits/unistd.h [__USE_BSD]: Likewise.
* posix/glob.h [__USE_BSD]: Likewise.
* posix/regex.h [__USE_BSD]: Likewise.
* posix/sys/types.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* posix/sys/utsname.h [__USE_SVID]: Likewise.
* posix/sys/wait.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* posix/unistd.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* pwd/pwd.h [__USE_SVID]: Likewise.
* resolv/netdb.h [__USE_BSD]: Likewise.
* setjmp/setjmp.h [__USE_BSD]: Likewise.
* signal/signal.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* socket/sys/socket.h [__USE_BSD]: Likewise.
* stdlib/fmtmsg.h [__USE_SVID]: Likewise.
* stdlib/stdlib.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* string/bits/string2.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* string/bits/string3.h [__USE_BSD]: Likewise.
* string/endian.h [__USE_BSD]: Likewise.
* string/string.h [__USE_SVID]: Likewise.
[__USE_BSD]: Likewise.
* string/strings.h [__USE_BSD]: Likewise.
* sysdeps/generic/netinet/ip.h [__USE_BSD]: Likewise.
* sysdeps/gnu/netinet/ip_icmp.h [__USE_BSD]: Likewise.
* sysdeps/mach/hurd/bits/fcntl.h [__USE_BSD]: Likewise.
* sysdeps/mach/hurd/bits/stat.h [__USE_BSD]: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/mman.h [__USE_BSD]: Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/termios.h [__USE_BSD]:
Likewise.
* sysdeps/unix/sysv/linux/bits/fcntl-linux.h [__USE_BSD]:
Likewise.
* sysdeps/unix/sysv/linux/bits/mman-linux.h [__USE_BSD]: Likewise.
* sysdeps/unix/sysv/linux/bits/sys_errlist.h [__USE_BSD]:
Likewise.
* sysdeps/unix/sysv/linux/bits/termios.h [__USE_BSD]: Likewise.
* sysdeps/unix/sysv/linux/mips/bits/termios.h [__USE_BSD]:
Likewise.
* sysdeps/unix/sysv/linux/netinet/if_ether.h [__USE_BSD]:
Likewise.
* sysdeps/unix/sysv/linux/netinet/if_fddi.h [__USE_BSD]: Likewise.
* sysdeps/unix/sysv/linux/netinet/if_tr.h [__USE_BSD]: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/termios.h [__USE_BSD]:
Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/termios.h [__USE_BSD]:
Likewise.
* sysdeps/x86/bits/string.h [__USE_BSD]: Likewise.
* sysvipc/sys/ipc.h [__USE_SVID]: Likewise.
* termios/termios.h [__USE_BSD]: Likewise.
* time/sys/time.h [__USE_BSD]: Likewise.
* time/time.h [__USE_BSD]: Likewise.
[__USE_SVID]: Likewise.
* sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_BSD]: Change
condition to [__USE_MISC].
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
No more __const.
|
|
|
|
|
|
* wcsmbs/wchar.h: mbsnrtowcs, open_wmemstream, wcpcpy, wcpncpy,
wcscasecmp, wcsdup, wcsncasecmp, wcsnlen, wcsnrtombs,
wcscasecmp_l, wcsncasecmp_l, wcscoll_l, and wcsxfrm_l.
* sysdeps/mach/hurd/bits/posix_opt.h: Reset value of macros from
200112L to 200809L.
* sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
* posix/getconf.c (vars): Add _SC_THREAD_ROBUST_PRIO_INHERIT and
_SC_THREAD_ROBUST_PRIO_PROTECT entries.
* bits/confname.h: Add _SC_THREAD_ROBUST_PRIO_INHERIT and
_SC_THREAD_ROBUST_PRIO_PROTECT.
* posix/unistd.h: fexecve is in POSIX 2008.
* time/time.h: strftime_l is in POSIX 2008.
* io/sys/stat.h: futimens is in POSIX 2008.
* string/strings.h: strcasecmp_l and strncasecmp_l are in POSIX 2008.
* string/string.h: stpcpy, stpncpy, strndup, strnlen, strsignal,
strcoll_l, strerror_l, and strxfrm_l are in POSIX 2008.
* stdlib/stdlib.h: mkdtemp is in POSIX 2008.
|
|
* time/time.h [__need_timespec et al]: Include <bits/types.h> here too.
|
|
|
|
|
|
2003-04-19 Ulrich Drepper <drepper@redhat.com>
* 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 <drepper@redhat.com>
* sysdeps/unix/sysv/linux/libc_fatal.c (__libc_fatal): Use
INTERNAL_SYSCALL instead of INLINE_SYSCALL.
|
|
2002-12-30 Jakub Jelinek <jakub@redhat.com>
* forward.c: Make all functions available by default again. It
caused too much trouble.
* internals.h (struct pthread_functions): Rename ptr_pthread_exit
and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
ptr___pthread_attr_init_2_*.
* pthread.c (pthread_functions): Adjust.
|
|
|
|
* ctype/ctype-extn.c (isblank_l): Add weak alias.
* sysdeps/generic/strtol_l.c (strtol_l): Likewise.
* sysdeps/generic/strtoll_l.c (strtoll_l): Likewise.
* sysdeps/generic/strtoul_l.c (strtoul_l): Likewise.
* sysdeps/generic/strtoull_l.c (strtoull_l): Likewise.
* wctype/iswctype_l.c (iswctype_l): Likewise.
* time/strftime.c [USE_IN_EXTENDED_LOCALE_MODEL]: No libc_hidden_def.
* ctype/ctype.h (__exctype_l): Don't declare __ name.
* stdlib/stdlib.h: Don't declare __*_l names.
* include/stdlib.h: Declare them here instead.
* include/string.h: Don't declare __*_l names.
* string/string.h: Declare them here instead.
* time/time.h: Don't declare __*_l names.
* include/time.h: Declare them here instead.
* wcsmbs/wchar.h: Don't declare __*_l names.
* include/wchar.h: Declare them here instead.
* wctype/wctype.h: Declare iswalnum_l, not __iswalnum_l.
Don't declare __*_l names.
* include/wctype.h: Declare them here instead.
* stdlib/monetary.h: Declare strfmon_l, not __strfmon_l.
* stdlib/strfmon_l.c (strfmon_l): Define as weak alias.
* locale/langinfo.h: Don't declare __nl_langinfo_l.
* include/langinfo.h: Declare it here with __typeof.
|
|
* time/time.h (__strftime_l, strftime_l): Declare them.
* wcsmbs/wchar.h (__wcsftime_l, wcsftime_l): Declare them.
* time/strftime_l.c: New file.
* time/wcsftime_l.c: New file.
* time/Makefile (routines): Add strftime_l, wcsftime_l.
* time/Versions (libc: GLIBC_2.3): Add __strftime_l, __wcsftime_l,
strftime_l, wcsftime_l.
|
|
* time/time.h (struct timespec): Use __time_t for tv_sec element.
* sysdeps/generic/inttypes.h: Define __wchar_t. Use it instead of
wchar_t for function declarations and defintions.
* misc/sys/select.h: Define __need_time_t before including <time.h>.
Define suseconds_t if it hasn't happened yet.
* iconv/gconv.h: Define __need_wchar_t before including <stddef.h>.
* conform/data/sys/uio.h-data: Allow UIO_MAXIOV to be defined.
* sysdeps/generic/stdint.h: Don't get definition of wchar_t from
<stddef.h>.
* conform/data/stddef.h-data: Remove wint_t.
|