removed the bundled libltdl
This commit is contained in:
@ -34,5 +34,12 @@ libqsehttp_la_SOURCES = \
|
||||
|
||||
libqsehttp_la_CPPFLAGS = $(CPPFLAGS_ALL_COMMON) $(CPPFLAGS_HTTPD_MOD) $(LTDLINCL)
|
||||
libqsehttp_la_LDFLAGS = -L../si -L../cmn -version-info 1:0:0 -no-undefined
|
||||
libqsehttp_la_LIBADD = -lqsesi -lqsecmn $(SOCKET_LIBS) $(SENDFILE_LIBS) $(SSL_LIBS) $(LIBLTDL)
|
||||
libqsehttp_la_LIBADD = -lqsesi -lqsecmn $(SOCKET_LIBS) $(SENDFILE_LIBS) $(SSL_LIBS)
|
||||
|
||||
if ENABLE_LIBLTDL
|
||||
libqsehttp_la_LIBADD += $(LTDL_LIBS)
|
||||
else
|
||||
libqsehttp_la_LIBADD += $(DL_LIBS)
|
||||
endif
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.15 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
@ -15,7 +15,17 @@
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
@ -78,21 +88,20 @@ PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
@ENABLE_LIBLTDL_TRUE@am__append_1 = $(LTDL_LIBS)
|
||||
@ENABLE_LIBLTDL_FALSE@am__append_2 = $(DL_LIBS)
|
||||
subdir = lib/http
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||
$(top_srcdir)/ac/depcomp
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/argz.m4 \
|
||||
$(top_srcdir)/m4/ax_check_sign.m4 \
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_sign.m4 \
|
||||
$(top_srcdir)/m4/ax_cxx_namespace.m4 \
|
||||
$(top_srcdir)/m4/ax_lib_mysql.m4 $(top_srcdir)/m4/ax_numval.m4 \
|
||||
$(top_srcdir)/m4/ax_pthread.m4 $(top_srcdir)/m4/libtool.m4 \
|
||||
$(top_srcdir)/m4/ltdl.m4 $(top_srcdir)/m4/ltoptions.m4 \
|
||||
$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
|
||||
$(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/m4/lx_find_mpi.m4 $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/include/qse/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
@ -127,9 +136,11 @@ am__uninstall_files_from_dir = { \
|
||||
am__installdirs = "$(DESTDIR)$(libdir)"
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
am__DEPENDENCIES_1 =
|
||||
@ENABLE_LIBLTDL_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
|
||||
@ENABLE_LIBLTDL_FALSE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1)
|
||||
libqsehttp_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
|
||||
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
|
||||
$(am__DEPENDENCIES_1)
|
||||
$(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3)
|
||||
am_libqsehttp_la_OBJECTS = libqsehttp_la-http.lo libqsehttp_la-htre.lo \
|
||||
libqsehttp_la-htrd.lo libqsehttp_la-httpd.lo \
|
||||
libqsehttp_la-httpd-cgi.lo libqsehttp_la-httpd-dir.lo \
|
||||
@ -204,12 +215,12 @@ am__define_uniq_tagged_files = \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/ac/depcomp
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
ARGZ_H = @ARGZ_H@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
@ -229,6 +240,7 @@ CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DL_LIBS = @DL_LIBS@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO = @ECHO@
|
||||
@ -240,7 +252,6 @@ EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
HAVE_CXX = @HAVE_CXX@
|
||||
INCLTDL = @INCLTDL@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
@ -248,11 +259,6 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBADD_DL = @LIBADD_DL@
|
||||
LIBADD_DLD_LINK = @LIBADD_DLD_LINK@
|
||||
LIBADD_DLOPEN = @LIBADD_DLOPEN@
|
||||
LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
|
||||
LIBLTDL = @LIBLTDL@
|
||||
LIBM = @LIBM@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
@ -260,13 +266,9 @@ LIBTOOL = @LIBTOOL@
|
||||
LIBTOOL_DEPS = @LIBTOOL_DEPS@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTDLDEPS = @LTDLDEPS@
|
||||
LTDLINCL = @LTDLINCL@
|
||||
LTDLOPEN = @LTDLOPEN@
|
||||
LTDL_LIBS = @LTDL_LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_CONFIG_H = @LT_CONFIG_H@
|
||||
LT_DLLOADERS = @LT_DLLOADERS@
|
||||
LT_DLPREOPEN = @LT_DLPREOPEN@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
@ -365,8 +367,6 @@ libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
ltdl_LIBOBJS = @ltdl_LIBOBJS@
|
||||
ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
@ -377,8 +377,6 @@ psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
subdirs = @subdirs@
|
||||
sys_symbol_underscore = @sys_symbol_underscore@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
@ -416,7 +414,8 @@ libqsehttp_la_SOURCES = \
|
||||
|
||||
libqsehttp_la_CPPFLAGS = $(CPPFLAGS_ALL_COMMON) $(CPPFLAGS_HTTPD_MOD) $(LTDLINCL)
|
||||
libqsehttp_la_LDFLAGS = -L../si -L../cmn -version-info 1:0:0 -no-undefined
|
||||
libqsehttp_la_LIBADD = -lqsesi -lqsecmn $(SOCKET_LIBS) $(SENDFILE_LIBS) $(SSL_LIBS) $(LIBLTDL)
|
||||
libqsehttp_la_LIBADD = -lqsesi -lqsecmn $(SOCKET_LIBS) \
|
||||
$(SENDFILE_LIBS) $(SSL_LIBS) $(am__append_1) $(am__append_2)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
@ -433,7 +432,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign lib/http/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign lib/http/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
@ -826,6 +824,8 @@ uninstall-am: uninstall-libLTLIBRARIES
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
|
@ -110,6 +110,32 @@ static void* mod_open (qse_httpd_t* httpd, const qse_char_t* sysname)
|
||||
|
||||
QSE_ASSERT (QSE_SIZEOF(h) <= QSE_SIZEOF(void*));
|
||||
return h;
|
||||
#elif defined(USE_DLFCN)
|
||||
|
||||
void* h;
|
||||
qse_mchar_t* modpath;
|
||||
|
||||
#if defined(QSE_CHAR_IS_MCHAR)
|
||||
modpath = sysname;
|
||||
#else
|
||||
modpath = qse_wcstombsdup (sysname, QSE_NULL, httpd->mmgr);
|
||||
if (!modpath)
|
||||
{
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_ENOMEM);
|
||||
return QSE_NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
h = dlopen(modpath, RTLD_NOW);
|
||||
if (!h) qse_httpd_seterrnum (httpd, QSE_HTTPD_ESYSERR);
|
||||
|
||||
#if defined(QSE_CHAR_IS_MCHAR)
|
||||
/* do nothing */
|
||||
#else
|
||||
QSE_MMGR_FREE (httpd->mmgr, modpath);
|
||||
#endif
|
||||
|
||||
return h;
|
||||
|
||||
#else
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_ENOIMPL);
|
||||
@ -127,6 +153,8 @@ static void mod_close (qse_httpd_t* httpd, void* handle)
|
||||
DosFreeModule ((HMODULE)handle);
|
||||
#elif defined(__DOS__) && defined(QSE_ENABLE_DOS_DYNAMIC_MODULE)
|
||||
FreeModule (handle);
|
||||
#elif defined(USE_DLFCN)
|
||||
dlclose (handle);
|
||||
#else
|
||||
/* nothing to do */
|
||||
#endif
|
||||
@ -168,6 +196,9 @@ static void* mod_symbol (qse_httpd_t* httpd, void* handle, const qse_char_t* nam
|
||||
#elif defined(__DOS__) && defined(QSE_ENABLE_DOS_DYNAMIC_MODULE)
|
||||
s = GetProcAddress (handle, mname);
|
||||
if (s == QSE_NULL) qse_httpd_seterrnum (httpd, syserr_to_errnum(errno));
|
||||
#elif defined(USE_DLFCN)
|
||||
s = dlsym (handle, mname);
|
||||
if (s == QSE_NULL) qse_httpd_seterrnum (httpd, QSE_HTTPD_ESYSERR);
|
||||
#else
|
||||
s = QSE_NULL;
|
||||
qse_httpd_seterrnum (httpd, QSE_HTTPD_ENOIMPL);
|
||||
|
@ -52,9 +52,9 @@
|
||||
# define EPOCH_DIFF_YEARS (QSE_EPOCH_YEAR-QSE_EPOCH_YEAR_WIN)
|
||||
# define EPOCH_DIFF_DAYS ((qse_long_t)EPOCH_DIFF_YEARS*365+EPOCH_DIFF_YEARS/4-3)
|
||||
# define EPOCH_DIFF_SECS ((qse_long_t)EPOCH_DIFF_DAYS*24*60*60)
|
||||
# if defined(QSE_HAVE_CONFIG_H)
|
||||
# if defined(QSE_HAVE_CONFIG_H) && defined(QSE_ENABLE_LIBLTDL)
|
||||
# include <ltdl.h>
|
||||
# define USE_LTDL
|
||||
# define USE_LTDL
|
||||
# endif
|
||||
|
||||
# undef AF_UNIX
|
||||
@ -132,8 +132,16 @@
|
||||
# endif
|
||||
|
||||
# include <unistd.h>
|
||||
# include <ltdl.h>
|
||||
# define USE_LTDL
|
||||
|
||||
# if defined(QSE_ENABLE_LIBLTDL)
|
||||
# include <ltdl.h>
|
||||
# define USE_LTDL
|
||||
# elif defined(HAVE_DLFCN_H)
|
||||
# include <dlfcn.h>
|
||||
# define USE_DLFCN
|
||||
# else
|
||||
# error UNSUPPORTED DYNAMIC LINKER
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_OPENSSL_SSL_H) && defined(HAVE_SSL)
|
||||
@ -767,12 +775,28 @@ qse_httpd_t* qse_httpd_openstdwithmmgr (qse_mmgr_t* mmgr, qse_size_t xtnsize, qs
|
||||
* lt_dlexit() shuts down libltdl if it's called as many times as
|
||||
* corresponding lt_dlinit(). so it's safe to call lt_dlinit()
|
||||
* and lt_dlexit() at the library level. */
|
||||
if (lt_dlinit () != 0) goto oops;
|
||||
if (lt_dlinit () != 0)
|
||||
{
|
||||
if (errnum) *errnum = QSE_HTTPD_ESYSERR;
|
||||
goto oops;
|
||||
}
|
||||
lt_dlinited = 1;
|
||||
#elif defined(USE_DLFCN)
|
||||
/* don't care about failure */
|
||||
if (qse_httpd_setopt (httpd, QSE_HTTPD_MODPOSTFIX, QSE_T(".so")) <= -1)
|
||||
{
|
||||
if (errnum) *errnum = qse_httpd_geterrnum(httpd);
|
||||
goto oops;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(USE_SSL)
|
||||
if (init_xtn_peer_ssl (httpd) <= -1) goto oops;
|
||||
if (init_xtn_peer_ssl (httpd) <= -1)
|
||||
{
|
||||
if (errnum) *errnum = qse_httpd_geterrnum(httpd);
|
||||
goto oops;
|
||||
}
|
||||
#endif
|
||||
|
||||
set_httpd_callbacks (httpd);
|
||||
|
Reference in New Issue
Block a user