[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
No Subject
#include <stdio.h>
#include <glob.h>
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
glob(NULL, GLOB_BRACE|GLOB_NOCHECK|GLOB_QUOTE|GLOB_TILDE|
#ifdef GLOB_MAXPATH
GLOB_MAXPATH
#else
GLOB_LIMIT
#endif
,
NULL, NULL);
;
return 0;
}
according to config.log, this is compiled like this (ok, I stripped some -R):
gcc -o conftest -g -O2 -D__NO_STRING_INLINES -I/pdc/mpkg/db/4
.0.14/include -I/pdc/mpkg/flex/2.5.4a/include -I/pdc/mpkg/hesiod/3.0.2/include -
I/pdc/mpkg/krb4/1.3e3/include -I/pdc/mpkg/openssl/0.9.7b/include -I/pdc/mpkg/rea
dline/4.3/include -L/pdc/mpkg/db/4.0.14/lib -L/pdc/mpkg/flex/2.5.4a/lib
-L/pdc/mpkg/heimdal/0.6/lib -L/pdc/mpkg/hesiod/3.0.2/lib -L/pdc/mpkg/k
rb4/1.3e3/lib -L/pdc/mpkg/ncurses/5.3/lib -L/pdc/mpkg/openssl/0.9.7b/lib -L/pdc/
mpkg/readline/4.3/lib -L/pdc/mpkg/tcltk/8.4.1/lib -L/pdc/mpkg/zlib/1.1.4/lib con
ftest.c -lresolv
As I have a glob.h in /pdc/mpkg/krb4/1.3e3/include it compiles nicely
with that prototype and then conftest is linked with glob() from libc.
configure:16171: checking for working glob
configure:16226: result: yes
Which is not true because the combination of the glob_t prototype from
krb4 libroken and the glob() from glibc2.2 interprets the filled in
glob_t wrong.
Glibc2.2:
typedef struct {
size_t gl_pathc; /* Count of paths matched so far */
char **gl_pathv; /* List of matched pathnames. */
size_t gl_offs; /* Slots to reserve in `gl_pathv'. */
(....)
} glob_t;
Krb4 libroken:
typedef struct {
int gl_pathc; /* Count of total paths so far. */
int gl_matchc; /* Count of paths matching pattern. */
int gl_offs; /* Reserved at beginning of gl_pathv. */
int gl_flags; /* Copy of flags parameter to glob. */
char **gl_pathv; /* List of paths matching pattern. */
/* Copy of errfunc parameter to glob. */
int (*gl_errfunc) (const char *, int);
(....)
} glob_t;
And now the question: Anyone who has a configure test that really tests if glob
works instead of AC_TRY_LINK which apparently is not good enough?
Harald.