mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
Update.
1998-05-12 12:15 Ulrich Drepper <drepper@cygnus.com> * posix/glob.c: Move to ... * sysdeps/generic/glob.c: ...here. * posix/glob.h (glob_t): Use correct types for gl_pathc and gl_offs elements. * sysdeps/unix/sysv/linux/alpha/glob.c: New file. * sysdeps/unix/sysv/linux/alpha/oldglob.c: New file. * sysdeps/unix/sysv/linux/alpha/Dist: Add oldglob.c. * sysdeps/unix/sysv/linux/alpha/Makefile: Compile oldglob in posix subdir. * libc.map [GLIBC_2.1]: Add glob and globfree. 1998-05-12 Ulrich Drepper <drepper@cygnus.com> * sunrpc/Makefile (generated): Restore old list. 1998-05-11 Andreas Jaeger <aj@arthur.rhein-neckar.de> * rt/Makefile (tests): Define only if we have a thread library. * nis/ypclnt.c: Add: #include <errno.h>. 1998-05-10 15:39 Zack Weinberg <zack@rabi.phys.columbia.edu> * configure.in: Define and substitute RELEASE as well as VERSION. * config.make.in: Add RELEASE and VERSION to be substituted. * Makeconfig: Delete all references to version.mk. * Make-dist: Likewise. * MakeTAGS: Likewise. * elf/Makefile: Likewise. 1998-05-10 Thorsten Kukuk <kukuk@vt.uni-paderborn.de> * nis/ypclnt.c: Move "(none)" domainname check from __yp_check to yp_get_default_domain. 1998-05-12 Ulrich Drepper <drepper@cygnus.com> * sysdeps/posix/profil.c (__profil): Don't define act and timer variables as static. Patch by Joe Keane <jgk@jgk.org>. 1998-05-12 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de> * malloc/malloc.c: Fix for NO_THREADS case. Remove statfs and fstatfs. and pwrite as EXTRA. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
This commit is contained in:
parent
de7e6366d6
commit
ee74a442e8
@ -22,4 +22,4 @@ releases
|
||||
crypt
|
||||
linuxthreads
|
||||
|
||||
aio
|
||||
libc.prj .libc.prcs_aux
|
||||
|
53
ChangeLog
53
ChangeLog
@ -1,10 +1,57 @@
|
||||
1998-05-12 12:15 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* posix/glob.c: Move to ...
|
||||
* sysdeps/generic/glob.c: ...here.
|
||||
* posix/glob.h (glob_t): Use correct types for gl_pathc and gl_offs
|
||||
elements.
|
||||
* sysdeps/unix/sysv/linux/alpha/glob.c: New file.
|
||||
* sysdeps/unix/sysv/linux/alpha/oldglob.c: New file.
|
||||
* sysdeps/unix/sysv/linux/alpha/Dist: Add oldglob.c.
|
||||
* sysdeps/unix/sysv/linux/alpha/Makefile: Compile oldglob in posix
|
||||
subdir.
|
||||
* libc.map [GLIBC_2.1]: Add glob and globfree.
|
||||
|
||||
1998-05-12 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* sunrpc/Makefile (generated): Restore old list.
|
||||
|
||||
1998-05-11 Andreas Jaeger <aj@arthur.rhein-neckar.de>
|
||||
|
||||
* rt/Makefile (tests): Define only if we have a thread library.
|
||||
|
||||
* nis/ypclnt.c: Add: #include <errno.h>.
|
||||
|
||||
1998-05-10 15:39 Zack Weinberg <zack@rabi.phys.columbia.edu>
|
||||
|
||||
* configure.in: Define and substitute RELEASE as well as
|
||||
VERSION.
|
||||
* config.make.in: Add RELEASE and VERSION to be substituted.
|
||||
* Makeconfig: Delete all references to version.mk.
|
||||
* Make-dist: Likewise.
|
||||
* MakeTAGS: Likewise.
|
||||
* elf/Makefile: Likewise.
|
||||
|
||||
1998-05-10 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
|
||||
|
||||
* nis/ypclnt.c: Move "(none)" domainname check from __yp_check to
|
||||
yp_get_default_domain.
|
||||
|
||||
1998-05-12 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
* sysdeps/posix/profil.c (__profil): Don't define act and timer
|
||||
variables as static. Patch by Joe Keane <jgk@jgk.org>.
|
||||
|
||||
1998-05-12 Wolfram Gloger <wmglo@dent.med.uni-muenchen.de>
|
||||
|
||||
* malloc/malloc.c: Fix for NO_THREADS case.
|
||||
|
||||
1998-05-11 18:02 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* sysdeps/unix/sysv/linux/alpha/Makefile (sysdep_routines):
|
||||
Remove statfs and fstatfs.
|
||||
Remove statfs and fstatfs.
|
||||
* sysdeps/unix/sysv/linux/alpha/syscalls.list: Don't mark pread
|
||||
and pwrite as EXTRA.
|
||||
* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
|
||||
and pwrite as EXTRA.
|
||||
* sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
|
||||
|
||||
1998-05-09 Ulrich Drepper <drepper@cygnus.com>
|
||||
|
||||
|
@ -132,7 +132,6 @@ foo:=$(shell echo '+tsrcs=$(+tsrcs)'>&2)
|
||||
foo:=$(shell echo foobie, dammit! >&2)
|
||||
|
||||
ifndef tardir
|
||||
-include $(common-objpfx)version.mk
|
||||
export tardir := glibc-$(version)
|
||||
endif
|
||||
|
||||
|
3
MakeTAGS
3
MakeTAGS
@ -163,9 +163,6 @@ $P/subdirs.pot: $(subdirs:%=$P/%.pot)
|
||||
do sed "/^#:/s% % $$d/%g" $P/$$d.pot; done) > $@.new
|
||||
mv -f $@.new $@
|
||||
|
||||
# Get $(version) defined.
|
||||
include $(common-objpfx)version.mk
|
||||
|
||||
# Combine all the messages into the final sorted template translation file.
|
||||
# The following code requires GNU date.
|
||||
$P/libc.pot: $(all-pot)
|
||||
|
14
Makeconfig
14
Makeconfig
@ -657,15 +657,6 @@ ifndef BUILD_CC
|
||||
BUILD_CC = $(CC)
|
||||
endif
|
||||
|
||||
# Figure out the version numbers from version.h.
|
||||
|
||||
$(common-objpfx)version.mk: $(..)version.h $(..)Makeconfig
|
||||
sed -n -e 's/^.*RELEASE.*"\([^"]*\)".*$$/release=\1/p' \
|
||||
-e 's/^.*VERSION.*"\([^"]*\)".*$$/version=\1/p' \
|
||||
< $< > $@-new
|
||||
mv -f $@-new $@
|
||||
|
||||
common-generated += version.mk
|
||||
|
||||
ifeq (yes, $(build-shared))
|
||||
|
||||
@ -704,11 +695,6 @@ endif
|
||||
|
||||
postclean-generated += soversions.mk
|
||||
|
||||
ifndef avoid-generated
|
||||
# Get $(version) defined with the release version number.
|
||||
-include $(common-objpfx)version.mk
|
||||
endif
|
||||
|
||||
# Generate the header containing the names of all shared libraries.
|
||||
# We use a stamp file to avoid uncessary recompilations.
|
||||
before-compile += $(common-objpfx)gnu/lib-names.h
|
||||
|
@ -2,6 +2,9 @@
|
||||
# From $Id$.
|
||||
# Don't edit this file. Put configuration parameters in configparms instead.
|
||||
|
||||
version = @VERSION@
|
||||
release = @RELEASE@
|
||||
|
||||
# Installation prefixes.
|
||||
install_root =
|
||||
prefix = @prefix@
|
||||
|
5
configure
vendored
5
configure
vendored
@ -2870,7 +2870,9 @@ else
|
||||
config_makefile=Makefile
|
||||
fi
|
||||
|
||||
VERSION=`sed -e 's/^#define VERSION "\([^"]*\)"/\1/p' -e d < $srcdir/version.h`
|
||||
VERSION=`sed -n -e 's/^#define VERSION "\([^"]*\)"/\1/p' < $srcdir/version.h`
|
||||
RELEASE=`sed -n -e 's/^#define RELEASE "\([^"]*\)"/\1/p' < $srcdir/version.h`
|
||||
|
||||
|
||||
|
||||
trap '' 1 2 15
|
||||
@ -3067,6 +3069,7 @@ s%@static_nss@%$static_nss%g
|
||||
s%@nopic_initfini@%$nopic_initfini%g
|
||||
s%@DEFINES@%$DEFINES%g
|
||||
s%@VERSION@%$VERSION%g
|
||||
s%@RELEASE@%$RELEASE%g
|
||||
|
||||
CEOF
|
||||
EOF
|
||||
|
@ -1159,8 +1159,10 @@ else
|
||||
config_makefile=Makefile
|
||||
fi
|
||||
|
||||
VERSION=`sed -e 's/^#define VERSION "\([^"]*\)"/\1/p' -e d < $srcdir/version.h`
|
||||
VERSION=`sed -n -e 's/^#define VERSION "\([^"]*\)"/\1/p' < $srcdir/version.h`
|
||||
RELEASE=`sed -n -e 's/^#define RELEASE "\([^"]*\)"/\1/p' < $srcdir/version.h`
|
||||
AC_SUBST(VERSION)
|
||||
AC_SUBST(RELEASE)
|
||||
|
||||
AC_OUTPUT(config.make glibcbug ${config_makefile} ${config_uname}, ,
|
||||
[echo '$config_vars' >> config.make; test -d bits || mkdir bits])
|
||||
|
@ -191,8 +191,8 @@ sed $($(ldd-shell)-ldd-rewrite) < $< | sed -f $(ldd-rewrite-script) > $@.new
|
||||
endef
|
||||
endif
|
||||
|
||||
$(objpfx)ldd: ldd.$(ldd-shell).in $(common-objpfx)version.mk \
|
||||
$(common-objpfx)soversions.mk $(common-objpfx)config.make
|
||||
$(objpfx)ldd: ldd.$(ldd-shell).in $(common-objpfx)soversions.mk \
|
||||
$(common-objpfx)config.make
|
||||
$(gen-ldd)
|
||||
chmod 555 $@.new
|
||||
mv -f $@.new $@
|
||||
|
2
libc.map
2
libc.map
@ -470,7 +470,7 @@ GLIBC_2.1 {
|
||||
__key_gendes_LOCAL;
|
||||
|
||||
# chown interface change.
|
||||
chown;
|
||||
chown; glob; globfree;
|
||||
|
||||
# Change in pthread_attr_t.
|
||||
pthread_attr_init;
|
||||
|
@ -1195,11 +1195,13 @@ static Void_t* realloc_check(Void_t* oldmem, size_t bytes,
|
||||
const Void_t *caller);
|
||||
static Void_t* memalign_check(size_t alignment, size_t bytes,
|
||||
const Void_t *caller);
|
||||
#ifndef NO_THREADS
|
||||
static Void_t* malloc_starter(size_t sz, const Void_t *caller);
|
||||
static void free_starter(Void_t* mem, const Void_t *caller);
|
||||
static Void_t* malloc_atfork(size_t sz, const Void_t *caller);
|
||||
static void free_atfork(Void_t* mem, const Void_t *caller);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
@ -1216,11 +1218,13 @@ static Void_t* malloc_check();
|
||||
static void free_check();
|
||||
static Void_t* realloc_check();
|
||||
static Void_t* memalign_check();
|
||||
#ifndef NO_THREADS
|
||||
static Void_t* malloc_starter();
|
||||
static void free_starter();
|
||||
static Void_t* malloc_atfork();
|
||||
static void free_atfork();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@ -1533,6 +1537,8 @@ static unsigned long max_mmapped_mem = 0;
|
||||
int __malloc_initialized = -1;
|
||||
|
||||
|
||||
#ifndef NO_THREADS
|
||||
|
||||
/* The following two functions are registered via thread_atfork() to
|
||||
make sure that the mutexes remain in a consistent state in the
|
||||
fork()ed version of a thread. Also adapt the malloc and free hooks
|
||||
@ -1605,6 +1611,8 @@ ptmalloc_init_all __MALLOC_P((void))
|
||||
(void)mutex_init(&list_lock);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* Initialization routine. */
|
||||
#if defined(_LIBC)
|
||||
#if 0
|
||||
@ -1624,6 +1632,7 @@ ptmalloc_init __MALLOC_P((void))
|
||||
|
||||
if(__malloc_initialized >= 0) return;
|
||||
__malloc_initialized = 0;
|
||||
#ifndef NO_THREADS
|
||||
#if defined _LIBC || defined MALLOC_HOOKS
|
||||
/* With some threads implementations, creating thread-specific data
|
||||
or initializing a mutex may call malloc() itself. Provide a
|
||||
@ -1633,18 +1642,17 @@ ptmalloc_init __MALLOC_P((void))
|
||||
__malloc_hook = malloc_starter;
|
||||
__free_hook = free_starter;
|
||||
#endif
|
||||
#if defined _LIBC && !defined NO_THREADS
|
||||
#ifdef _LIBC
|
||||
/* Initialize the pthreads interface. */
|
||||
if (__pthread_initialize != NULL)
|
||||
__pthread_initialize();
|
||||
#endif
|
||||
#ifndef NO_THREADS
|
||||
mutex_init(&main_arena.mutex);
|
||||
mutex_init(&list_lock);
|
||||
tsd_key_create(&arena_key, NULL);
|
||||
tsd_setspecific(arena_key, (Void_t *)&main_arena);
|
||||
thread_atfork(ptmalloc_lock_all, ptmalloc_unlock_all, ptmalloc_init_all);
|
||||
#endif
|
||||
#endif /* !defined NO_THREADS */
|
||||
#if defined _LIBC || defined MALLOC_HOOKS
|
||||
if((s = getenv("MALLOC_TRIM_THRESHOLD_")))
|
||||
mALLOPt(M_TRIM_THRESHOLD, atoi(s));
|
||||
@ -1655,8 +1663,10 @@ ptmalloc_init __MALLOC_P((void))
|
||||
if((s = getenv("MALLOC_MMAP_MAX_")))
|
||||
mALLOPt(M_MMAP_MAX, atoi(s));
|
||||
s = getenv("MALLOC_CHECK_");
|
||||
#ifndef NO_THREADS
|
||||
__malloc_hook = save_malloc_hook;
|
||||
__free_hook = save_free_hook;
|
||||
#endif
|
||||
if(s) {
|
||||
if(s[0]) mALLOPt(M_CHECK_ACTION, (int)(s[0] - '0'));
|
||||
__malloc_check_init();
|
||||
@ -4431,6 +4441,8 @@ memalign_check(alignment, bytes, caller)
|
||||
return chunk2mem_check(p, bytes);
|
||||
}
|
||||
|
||||
#ifndef NO_THREADS
|
||||
|
||||
/* The following hooks are used when the global initialization in
|
||||
ptmalloc_init() hasn't completed yet. */
|
||||
|
||||
@ -4525,6 +4537,8 @@ free_atfork(mem, caller) Void_t* mem; const Void_t *caller;
|
||||
(void)mutex_unlock(&ar_ptr->mutex);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* defined _LIBC || defined MALLOC_HOOKS */
|
||||
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
@ -379,6 +380,12 @@ yp_get_default_domain (char **outdomain)
|
||||
{
|
||||
if (getdomainname (__ypdomainname, NIS_MAXNAMELEN))
|
||||
result = YPERR_NODOM;
|
||||
else if (strcmp (__ypdomainname, "(none)") == 0)
|
||||
{
|
||||
/* If domainname is not set, some Systems will return "(none)" */
|
||||
__ypdomainname[0] = '\0';
|
||||
result = YPERR_NODOM;
|
||||
}
|
||||
else
|
||||
*outdomain = __ypdomainname;
|
||||
}
|
||||
@ -398,8 +405,6 @@ __yp_check (char **domain)
|
||||
if (__ypdomainname[0] == '\0')
|
||||
if (yp_get_default_domain (&unused))
|
||||
return 0;
|
||||
else if (strcmp (__ypdomainname, "(none)") == 0)
|
||||
return 0;
|
||||
|
||||
if (domain)
|
||||
*domain = __ypdomainname;
|
||||
|
@ -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.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
@ -92,9 +92,9 @@ struct stat;
|
||||
#endif
|
||||
typedef struct
|
||||
{
|
||||
int gl_pathc; /* Count of paths matched by the pattern. */
|
||||
size_t gl_pathc; /* Count of paths matched by the pattern. */
|
||||
char **gl_pathv; /* List of matched pathnames. */
|
||||
int gl_offs; /* Slots to reserve in `gl_pathv'. */
|
||||
size_t gl_offs; /* Slots to reserve in `gl_pathv'. */
|
||||
int gl_flags; /* Set to FLAGS, maybe | GLOB_MAGCHAR. */
|
||||
|
||||
/* If the GLOB_ALTDIRFUNC flag is set, the following functions
|
||||
|
@ -30,8 +30,6 @@ librt-routines := aio_cancel aio_error aio_fsync aio_misc aio_read \
|
||||
|
||||
librt-map := librt.map
|
||||
|
||||
tests := tst-aio
|
||||
|
||||
# Make sure that everything is distributed independent of configuration.
|
||||
distribute := aio_misc.h $(librt-routines:=.c) $(librt-map)
|
||||
|
||||
@ -39,6 +37,8 @@ include ../Makeconfig
|
||||
|
||||
ifeq ($(have-thread-library),yes)
|
||||
|
||||
tests := tst-aio
|
||||
|
||||
extra-libs := librt
|
||||
extra-libs-others := $(extra-libs)
|
||||
|
||||
|
@ -55,8 +55,7 @@ headers = $(addprefix rpc/,auth.h auth_unix.h clnt.h netdb.h pmap_clnt.h \
|
||||
$(rpcsvc:%=rpcsvc/%)
|
||||
install-others = $(inst_sysconfdir)/rpc
|
||||
generated = $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \
|
||||
rpc-proto.c rpc-proto.d rpcgen
|
||||
generated-dirs = rpcsvc
|
||||
$(rpcsvc:%.x=rpcsvc/%.stmp) $rpc-proto.c rpc-proto.d rpcgen
|
||||
|
||||
routines := auth_none auth_unix authuxprot bindrsvprt \
|
||||
clnt_gen clnt_perr clnt_raw clnt_simp clnt_tcp \
|
||||
|
@ -10,6 +10,7 @@ kernel_sigaction.h
|
||||
kernel_stat.h
|
||||
kernel_termios.h
|
||||
net/route.h
|
||||
oldglob.c
|
||||
rt_sigaction.S
|
||||
sizes.h
|
||||
sys/acct.h
|
||||
|
@ -1,3 +1,7 @@
|
||||
ifeq ($(subdir),posix)
|
||||
sysdep_routines += oldglob
|
||||
endif
|
||||
|
||||
ifeq ($(subdir),misc)
|
||||
sysdep_headers += alpha/ptrace.h alpha/regdef.h
|
||||
|
||||
|
30
sysdeps/unix/sysv/linux/alpha/glob.c
Normal file
30
sysdeps/unix/sysv/linux/alpha/glob.c
Normal file
@ -0,0 +1,30 @@
|
||||
/* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* For Linux/Alpha we have to make the glob symbols versioned. */
|
||||
#define glob(pattern, flags, errfunc, pglob) \
|
||||
__new_glob (pattern, flags, errfunc, pglob) \
|
||||
#define globfree(pglob) \
|
||||
__new_globfree (pglob)
|
||||
|
||||
#include_next <glob.c>
|
||||
|
||||
#undef glob
|
||||
#undef globfree
|
||||
|
||||
default_symbol_version(__new_glob, glob, GLIBC_2.1)
|
||||
default_symbol_version(__new_globfree, globfree, GLIBC_2.1)
|
94
sysdeps/unix/sysv/linux/alpha/oldglob.c
Normal file
94
sysdeps/unix/sysv/linux/alpha/oldglob.c
Normal file
@ -0,0 +1,94 @@
|
||||
/* Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public License as
|
||||
published by the Free Software Foundation; either version 2 of the
|
||||
License, or (at your option) any later version.
|
||||
|
||||
This 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
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; see the file COPYING.LIB. If not,
|
||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* This file contains only wrappers around the real glob functions. It
|
||||
became necessary since the glob_t structure changed. */
|
||||
#include <glob.h>
|
||||
|
||||
#if defined PIC && DO_VERSIONING
|
||||
|
||||
/* This is the old structure. The difference is that the gl_pathc and
|
||||
gl_offs elements have type `int'. */
|
||||
typedef struct
|
||||
{
|
||||
int gl_pathc; /* Count of paths matched by the pattern. */
|
||||
char **gl_pathv; /* List of matched pathnames. */
|
||||
int gl_offs; /* Slots to reserve in `gl_pathv'. */
|
||||
int gl_flags; /* Set to FLAGS, maybe | GLOB_MAGCHAR. */
|
||||
|
||||
/* If the GLOB_ALTDIRFUNC flag is set, the following functions
|
||||
are used instead of the normal file access functions. */
|
||||
void (*gl_closedir) __P ((void *));
|
||||
struct dirent *(*gl_readdir) __P ((void *));
|
||||
__ptr_t (*gl_opendir) __P ((__const char *));
|
||||
int (*gl_lstat) __P ((__const char *, struct stat *));
|
||||
int (*gl_stat) __P ((__const char *, struct stat *));
|
||||
} old_glob_t;
|
||||
|
||||
|
||||
int
|
||||
__old_glob (const char *pattern, int flags,
|
||||
int (*errfunc) __P ((const char *, int)),
|
||||
old_glob_t *pglob)
|
||||
{
|
||||
glob_t correct;
|
||||
int result;
|
||||
|
||||
/* Construct an object of correct type. */
|
||||
correct.gl_pathc = pglob->gl_pathc;
|
||||
correct.gl_pathv = pglob->gl_pathv;
|
||||
correct.gl_offs = pglob->gl_offs;
|
||||
correct.gl_flags = pglob->gl_flags;
|
||||
correct.gl_closedir = pglob->gl_closedir;
|
||||
correct.gl_readdir = pglob->gl_readdir;
|
||||
correct.gl_opendir = pglob->gl_opendir;
|
||||
correct.gl_lstat = pglob->gl_lstat;
|
||||
correct.gl_stat = pglob->gl_stat;
|
||||
|
||||
result = glob (pattern, flags, errfunc, &correct);
|
||||
|
||||
/* And convert it back. */
|
||||
pglob->gl_pathc = correct.gl_pathc;
|
||||
pglob->gl_pathv = correct.gl_pathv;
|
||||
pglob->gl_offs = correct.gl_offs;
|
||||
pglob->gl_flags = correct.gl_flags;
|
||||
pglob->gl_closedir = correct.gl_closedir;
|
||||
pglob->gl_readdir = correct.gl_readdir;
|
||||
pglob->gl_opendir = correct.gl_opendir;
|
||||
pglob->gl_lstat = correct.gl_lstat;
|
||||
pglob->gl_stat = correct.gl_stat;
|
||||
|
||||
return result;
|
||||
}
|
||||
symbol_version(__old_glob, glob, GLIBC_2.0)
|
||||
|
||||
|
||||
/* Free storage allocated in PGLOB by a previous `glob' call. */
|
||||
void
|
||||
__old_globfree (old_glob_t *pglob)
|
||||
{
|
||||
glob_t correct;
|
||||
|
||||
/* We only need these two symbols. */
|
||||
correct.gl_pathc = pglob->gl_pathc;
|
||||
correct.gl_pathv = pglob->gl_pathv;
|
||||
|
||||
globfree (&correct);
|
||||
}
|
||||
symbol_version(__old_globfree, globfree, GLIBC_2.0)
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user