1995-06-22 09:00:11 +00:00
|
|
|
/* Header with interface version macros for library pieces copied elsewhere.
|
2023-01-06 21:08:04 +00:00
|
|
|
Copyright (C) 1995-2023 Free Software Foundation, Inc.
|
1996-11-15 04:08:00 +00:00
|
|
|
This file is part of the GNU C Library.
|
1995-06-22 09:00:11 +00:00
|
|
|
|
1996-11-15 04:08:00 +00:00
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
2001-07-06 04:58:11 +00:00
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
1995-06-22 09:00:11 +00:00
|
|
|
|
1996-11-15 04:08:00 +00:00
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2001-07-06 04:58:11 +00:00
|
|
|
Lesser General Public License for more details.
|
1995-06-22 09:00:11 +00:00
|
|
|
|
2001-07-06 04:58:11 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
2012-02-09 23:18:22 +00:00
|
|
|
License along with the GNU C Library; if not, see
|
Prefer https to http for gnu.org and fsf.org URLs
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
2019-09-07 05:40:42 +00:00
|
|
|
<https://www.gnu.org/licenses/>. */
|
1995-06-22 09:00:11 +00:00
|
|
|
|
|
|
|
#ifndef _GNU_VERSIONS_H
|
|
|
|
#define _GNU_VERSIONS_H 1
|
|
|
|
|
|
|
|
/* This file exists to define these few macros. Each specifies a version
|
|
|
|
number associated with the library interface of a piece of the C library
|
|
|
|
which is also distributed with other GNU packages. These pieces are
|
|
|
|
both part of the GNU C library and also distributed with other GNU
|
|
|
|
packages so those packages may use their facilities on systems lacking
|
|
|
|
the GNU C library. The source files for each piece surround all their
|
|
|
|
code with `#ifndef ELIDE_CODE' after defining it with this:
|
|
|
|
|
|
|
|
#define OBSTACK_INTERFACE_VERSION 1
|
|
|
|
#if !defined (_LIBC) && defined (__GNU_LIBRARY__) && __GNU_LIBRARY__ > 1
|
|
|
|
#include <gnu-versions.h>
|
|
|
|
#if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
|
|
|
|
#define ELIDE_CODE
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
This allows those one to avoid compiling those files when part of a GNU
|
|
|
|
package not libc, on a system using a GNU C library that supports the
|
|
|
|
same interface.
|
|
|
|
|
|
|
|
Please preserve the format of the comments after each macro. And
|
|
|
|
remember, if any of these versions change, the libc.so major version
|
|
|
|
number must change too (so avoid it)! */
|
|
|
|
|
1997-07-19 21:18:32 +00:00
|
|
|
#define _GNU_OBSTACK_INTERFACE_VERSION 1 /* vs malloc/obstack.c */
|
1995-06-22 09:00:11 +00:00
|
|
|
#define _GNU_REGEX_INTERFACE_VERSION 1 /* vs posix/regex.c */
|
posix: Add compat glob symbol to not follow dangling symbols
This patch follows commit 5554304f0 (posix: Allow glob to match dangling
symlinks [BZ #866]) by adding a compat symbol that follow previous
semantic of not following dangling symlinks and thus avoiding call
gl_lstat with GLOB_ALTDIRFUNC.
It avoids failure with old binaries that not set the alternate function
pointer for lstat (GNUmake for instance). The following scenario, for
instance, fails with current GNUmake because glibc will access unitialized
memory when calling gl_lstat:
$ cat src/t/t.c
int main ()
{
return 0;
}
$ cat Makefile
SRC = $(wildcard src/*/t.c)
OBJ = $(patsubst src/%.c, obj/%.o, $(SRC))
prog: $(OBJ)
$(CC) $(CFLAGS) $(LDFLAGS) $(LIBS) $(OBJ) -o prog
obj/%.o: src/%.c
$(CC) $(CFLAGS) -c $< -o $@
$ make
This works as expected with the patch applied. Since it is for generic
ABI, default compat symbols are added with override for Linux due LFS.
Now we have two compat symbols for glob on Linux:
1. sysdeps/unix/sysv/linux/oldglob.c which implements glob64 with
the old dirent layout. For this implementation I also set it to
not follow dangling symlinks (which is the safest path).
2. sysdeps/unix/sysv/linux/glob{64}-lstat-compat.c which implements
the compat symbol for dangling symlinks. As for generic glob,
the implementation uses XSTAT_IS_XSTAT64 to define whether
both __glob_lstat_compat and __glob64_lstat_compat should be
different implementations. For archictures that define
XSTAT_IS_XSTAT64, __glob_lstat_compat is aliased to
__glob64_lstat_compat.
3. sysdeps/unix/sysv/linux/alpha/oldglob.c with a different glob_t
layout. As for 1. this patch changes it to not follow dangling
symlinks.
The patch also bumps _GNU_GLOB_INTERFACE_VERSION to 2 to advertise the
new semantic. On GNUmake, for instance, it will force to it use its
internal glob implementation instead and avoiding triggering the same
failure on builds against newer GLIBCs.
Checked on x86_64-linux-gnu and i686-linux-gnu. I also checked
with a build against the major ABIs required to check for the abilist.
The changes should also work on gnulib (I run gnulib-tool.py check glob
and it shown no regressions).
[BZ #22183]
* include/gnu-versions.h (_GNU_GLOB_INTERFACE_VERSION): Increase
version to 2.
* posix/Makefile (routines): Add glob-lstat-compat and
glob64-lstat-compat.
* posix/Versions (GLIBC_2.27, glob, glob64): Add symbol version.
* posix/glob-lstat-compat.c: New file.
* posix/glob64-lstat-compat.c: Likewise.
* posix/tst-glob_lstat_compat.c: Likewise.
* sysdeps/unix/sysv/linux/glob-lstat-compat.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/glob-lstat-compat.c: Likewise.
* sysdeps/unix/sysv/linux/glob64-lstat-compat.c: Likewise.
* sysdeps/unix/sysv/linux/alpha/glob.c: Remove file.
* posix/glob.c (glob_lstat): New function.
(glob): Rename to __glob and add versioned symbol to 2.27.
(glob_in_dir): Use glob_lstat.
* posix/glob64.c (glob64): Add GLOB_ATTRIBUTE.
* sysdeps/unix/sysv/linux/arm/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/glob.c (glob): Add versioned symbol for
2.27.
* sysdeps/unix/sysv/linux/glob64.c (glob64): Likewise.
* sysdeps/unix/sysv/linux/oldglob.c (GLOB_NO_LSTAT): Define.
* sysdeps/unix/sysv/linux/alpha/oldglob.c (__old_glob): Do not use
gl_lstat on glob call.
* sysdeps/unix/sysv/linux/aarch64/libc.abilist: Add GLIBC_2.27 glob
and glob64 symbols.
* sysdeps/unix/sysv/linux/alpha/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/hppa/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/i386/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/ia64/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/microblaze/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/nios2/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist:
Likewise.
* sysdeps/unix/linux/powerpc/powerpc32/nofpu/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/sh/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/64/libc.abilist: Likewise.
* sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist: Likewise.
2017-09-15 14:31:13 +00:00
|
|
|
#define _GNU_GLOB_INTERFACE_VERSION 2 /* vs posix/glob.c */
|
update from main archive 970121
Thu Jan 23 04:06:42 1997 Ulrich Drepper <drepper@cygnus.com>
* Make-dist (.PHONY: dist): Remove duplicate declaration.
(README): Depend on version.h not version.c.
* Makefile (README): Depend on version.h not version.c.
* Makeconfig (inst_libdir, inst_slibdir, inst_includedir,
inst_datadir, inst_zonedir, inst_localedir, inst_i18ndir, inst_bindir,
inst_sbindir, inst_infodir, inst_sysconfdir): New variables. Same
as variable withough inst_ but prepended with $(install_root).
(localtime-time): Use $(inst_sysconfdir) not $(sysconfdir).
* Makefile (install-others): Use $(inst_includedir).
(gnu/stabs.h, gnu/lib-names.h): Use $(inst_includedir).
* Makerules (tons of install rules): Use inst_% variables.
* elf/Makefile: Likewise.
* hurd/Makefile: Likewise.
* intl/Makefile: Likewise.
* manual/Makefile: Likewise.
* po/Makefile: Likewise.
* sunrpc/Makefile: Likewise.
* sysdeps/mach/hurd/Makefile: Likewise.
* sysdeps/standalone/i386/force_cpu386/Makefile: Likewise.
* time/Makefile: Likewise.
* config.make.in: Revert patch from Sat Jan 18 22:15:26 1997,
leave install_root in place.
* gnu-versions.h (_GNU_GETOPT_INTERFACE_VERSION): Define to 2.
* posix/getopt.c (GETOPT_INTERFACE_VERSION): Define to 2.
* posix/getopt1.c (GETOPT_INTERFACE_VERSION): Define to 2.
* elf/Makefile [yes==$(has-ldconfig)]: Correct dependencies of
ldconfig.
(CFLAGS-dl-load.c): New variable, avoid gcc warning.
* sysdeps/mach/hurd/configure.in: Add _LIBC_REENTRENT to DEFINES.
* sysdeps/mach/hurd/getdents.c: Update copyright. De-ANSI-declfy.
* sysdeps/stub/getdents.c: Likewise. Correct return value.
* sysdeps/unix/getdents.c: Likewise.
* sysdeps/unix/sysv/getdents.c: Likewise.
* sysdeps/unix/readdir.c: Update copyright.
* sysdeps/unix/bsd/sony/newsos4/Makefile: Correct ifeq arguments.
* sysdeps/unix/bsd/sun/sunos4/Makefile: Likewise.
* sysdeps/unix/sysv/Makefile: Likewise.
* sysdeps/unix/sysv/linux/Makefile: Likewise.
* sysdeps/unix/sysv/linux/alpha/Makefile: Likewise.
* sysdeps/unix/sysv/linux/i386/Makefile: Likewise.
* sysdeps/unix/sysv/linux/Dist: Don't distribute kernel_termios.h,
but sys/kernel_termios.h.
* sysdeps/unix/sysv/linux/alpha/Dist: Likewise.
* sysdeps/unix/sysv/linux/Makefile [$(subdir)==termios]
(sysdep_headers): Add sys/kernel_termios.h.
* sysdeps/unix/sysv/linux/kernel_termios.h: Moved to...
* sysdeps/unix/sysv/linux/sys/kernel_termios.h: ...here.
* sysdeps/unix/sysv/linux/sys/tcgetattr.c: Use __kernel_termios and
__KERNEL_NCCS instead of kernel_termios and KERNEL_NCCS resp.
* sysdeps/unix/sysv/linux/alpha/ioctls.h: New file.
* sysdeps/unix/sysv/linux/getdents.c: Correct problems with alignment.
* sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove getdents.
Reported by Eirik Fuller <eirik@netcom.com>.
* time/Banner: Removed. Wrong and unnecessary information. It's now
in...
* time/README: New file.
* time/Makefile (distribute): Remove Banner, add README.
Wed Jan 22 13:19:56 1997 Richard Henderson <rth@tamu.edu>
* sysdeps/unix/sysv/linux/alpha/ioperm.c (platforms): Add Sable.
(init_iosys): Recognize /etc/alpha_systype as a four-tuple for
the purpose of supporting brand new systems.
(*): The type of iosys variables should be iosys_t.
1997-01-22 Paul Eggert <eggert@twinsun.com>
* strftime.c (_strftime_copytm):
New function, to work around Solaris 2.5 tzset bug.
Wed Jan 22 23:05:14 1997 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/mach/hurd/vdprintf.c: Complete de-ANSI-declfication.
* sysdeps/posix/pipestream.c (writedecl): Fix typo.
Reported by Marcus G. Daniels <marcus@shannon.sysc.pdx.edu>.
Wed Jan 22 13:58:56 1997 Andreas Jaeger <aj@arthur.pfalz.de>
* elf/Makefile (CFLAGS-dl-load.c): New Variable to keep gcc silent
since name_copy is initialized.
Wed Jan 22 16:58:12 1997 Ulrich Drepper <drepper@cygnus.com>
* stdio-common/Makefile (tests): Remove scanf11.
* stdio-common/scanf11.c: Removed.
* stdio-common/vfscanf.c Revert patch of Thu Jan 16 23:39:25 1997.
Although the Corrigendum 1 describes the result as implemented the
even more recent Amendement 1 seconds the position of ISO C:1990
where the %n directive has no effect on the assignment count.
* stdio-common/bug10.c: Likewise.
* stdio-common/scanf1.c: Likewise.
* stdio-common/scanf3.c: Likewise.
* stdio-common/scanf10.c: Likewise.
* stdio-common/tstdiomisc.c: Likewise.
* new-malloc/obstack.h: Don't define malloc using bcopy if malloc
is not available. This leads to problems since bcopy does not
return a value. Instead define _obstack_memcpy based on memcpy or
bcopy. This name isn't used outside obstack.h and so no problems
from using the memcpy function in a file including obstack.h can
result.
Reported by Martin Trapp <trapp@ipd.info.uni-karlsruhe.de>.
Tue Jan 21 18:35:55 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* misc/regexp.h (compile): Fix typos.
Tue Jan 21 01:01:59 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/unix/sysv/linux/sys/procfs.h (struct elf_prpsinfo): Fix
type of pr_{pid,ppid,pgrp,sid} fields.
* sysdeps/unix/sysv/linux/alpha/sys/procfs.h (struct
elf_prpsinfo): Likewise.
1997-01-23 04:24:20 +00:00
|
|
|
#define _GNU_GETOPT_INTERFACE_VERSION 2 /* vs posix/getopt.c and
|
1996-12-30 01:47:46 +00:00
|
|
|
posix/getopt1.c */
|
1995-06-22 09:00:11 +00:00
|
|
|
|
|
|
|
#endif /* gnu-versions.h */
|