From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10c696,917e8d099bf8d199 X-Google-Attributes: gid10c696,public X-Google-Thread: 111c93,917e8d099bf8d199 X-Google-Attributes: gid111c93,public From: Ulrich Drepper Subject: Re: libc6 and glob.h Date: 1998/07/02 Message-ID: #1/1 X-Deja-AN: 368197513 References: <5ju3505ag7.fsf@plato.lanl.gov> Content-Type: text/plain; charset=US-ASCII X-fingerprint: BE 3B 21 04 BC 77 AC F0 61 92 E4 CB AC DD B9 5A Organization: Cygnus Solutions Mime-Version: 1.0 (generated by tm-edit 7.108) Reply-To: drepper@cygnus.com (Ulrich Drepper) Newsgroups: comp.os.linux.development.apps,comp.os.linux.alpha Alex Kent writes: > Having some trouble compiling some software that requires some > functionality that used to be present in libc5 but now seems to be gone > in libc6, specifically on under Linux-AXP. (I checked on a libc6 intel > box and it was missing there as well) > > The following existed in glob.h under a libc5 system but is gone under > libc6: > #if !defined (_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined (_GNU_SOURCE) > /* If they are not NULL, `glob' uses these functions to read directories. */ > extern __ptr_t (*__glob_opendir_hook) __P ((__const char *__directory)); > extern __const char *(*__glob_readdir_hook) __P ((__ptr_t __stream)); > extern void (*__glob_closedir_hook) __P ((__ptr_t __stream)); > #endif > > > Does anyone know what happened here and how I can get similar > functionality under libc6? The glob.h used in libc5 was very old and the interface to this extended functionality was bad. It isn't thread safe. See the definition of glob_t in the glibc glob.h header and you'll see that there are similar elements to these variables and this interface is thread-safe. -- ---------------. drepper at gnu.org ,-. 1325 Chesapeake Terrace Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA Cygnus Solutions `--' drepper at cygnus.com `------------------------