From 74cfd6a7a694f722a494f45b05b746b635fadd6c Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Thu, 14 Oct 2004 05:55:21 +0000 Subject: [PATCH] * configure.ac: Add detection for libgen.h. * yasm.c: Conditionally include libgen.h for dirname() definition. * yasm-module.c: Conditionally include libgen.h for basename() definition. svn path=/trunk/yasm/; revision=1164 --- configure.ac | 2 +- frontends/yasm/yasm-module.c | 6 ++++-- frontends/yasm/yasm.c | 6 ++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 850ca562..b3c5e408 100644 --- a/configure.ac +++ b/configure.ac @@ -101,7 +101,7 @@ AM_WITH_DMALLOC # AC_HEADER_STDC AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS([alloca.h limits.h sys/cdefs.h sys/ipc.h sys/msg.h sys/param.h sys/types.h sys/queue.h unistd.h]) +AC_CHECK_HEADERS([alloca.h limits.h sys/cdefs.h sys/ipc.h sys/msg.h sys/param.h sys/types.h sys/queue.h unistd.h libgen.h]) # REQUIRE standard C headers if test "$ac_cv_header_stdc" != yes; then diff --git a/frontends/yasm/yasm-module.c b/frontends/yasm/yasm-module.c index 759cd1b5..3f631182 100644 --- a/frontends/yasm/yasm-module.c +++ b/frontends/yasm/yasm-module.c @@ -30,13 +30,15 @@ #include #include +#ifdef HAVE_LIBGEN_H +#include +#endif + #include "ltdl.h" #include "yasm-module.h" -extern char *basename(const char *path); - extern const lt_dlsymlist lt_preloaded_symbols[]; typedef struct module { diff --git a/frontends/yasm/yasm.c b/frontends/yasm/yasm.c index 06f66c9c..decbdfbf 100644 --- a/frontends/yasm/yasm.c +++ b/frontends/yasm/yasm.c @@ -31,6 +31,10 @@ #include #include +#ifdef HAVE_LIBGEN_H +#include +#endif + #ifndef WIN32 #include "ltdl.h" #endif @@ -44,8 +48,6 @@ #endif #ifndef WIN32 -extern char *dirname(const char *path); - extern const lt_dlsymlist lt_preloaded_symbols[]; #endif -- 2.40.0