[autobuild] rm module stub code for missing deps

remove module stub code since the build system(s) no longer build any
module when the dependencies for a given module are not present.
personal/stbuehler/mod-csrf
Glenn Strauss 7 years ago
parent c073a31f69
commit ac90699d28

@ -22,8 +22,6 @@
#include "plugin.h"
#ifdef HAVE_KRB5
#include <krb5.h>
#include <gssapi.h>
#include <gssapi/gssapi_krb5.h>
@ -794,13 +792,3 @@ int mod_authn_gssapi_plugin_init(plugin *p) {
return 0;
}
#else
int mod_authn_gssapi_plugin_init(plugin *p);
int mod_authn_gssapi_plugin_init(plugin *p) {
UNUSED(p);
return -1;
}
#endif

@ -1,15 +1,12 @@
#include "first.h"
#include "plugin.h"
#if defined(HAVE_LDAP_H) && defined(HAVE_LBER_H) && defined(HAVE_LIBLDAP) && defined(HAVE_LIBLBER)
#define USE_LDAP
#include <ldap.h>
#include "server.h"
#include "http_auth.h"
#include "log.h"
#include "plugin.h"
#include <ctype.h>
#include <errno.h>
@ -488,13 +485,3 @@ int mod_authn_ldap_plugin_init(plugin *p) {
return 0;
}
#else
int mod_authn_ldap_plugin_init(plugin *p);
int mod_authn_ldap_plugin_init(plugin *p) {
UNUSED(p);
return -1;
}
#endif

@ -18,16 +18,13 @@
* TODO: db connection pool (if asynchronous requests)
*/
#include "plugin.h"
#ifdef HAVE_MYSQL
#include <mysql.h>
#include "server.h"
#include "http_auth.h"
#include "log.h"
#include "md5.h"
#include "plugin.h"
#include <ctype.h>
#include <errno.h>
@ -542,13 +539,3 @@ int mod_authn_mysql_plugin_init(plugin *p) {
return 0;
}
#else
int mod_authn_mysql_plugin_init(plugin *p);
int mod_authn_mysql_plugin_init(plugin *p) {
UNUSED(p);
return -1;
}
#endif

@ -32,8 +32,6 @@ typedef char HASHHEX[HASHHEXLEN+1];
#endif
#define OUT
#ifdef HAVE_LUA_H
#include <lauxlib.h>
int f_crypto_md5(lua_State *L) {
@ -279,5 +277,3 @@ int f_memcache_get_long(lua_State *L) {
return 1;
}
#endif
#endif

@ -2,7 +2,6 @@
#define _MOD_CML_FUNCS_H_
#include "first.h"
#ifdef HAVE_LUA_H
#include <lua.h>
int f_crypto_md5(lua_State *L);
@ -15,4 +14,3 @@ int f_memcache_exists(lua_State *L);
int f_memcache_get_string(lua_State *L);
int f_memcache_get_long(lua_State *L);
#endif
#endif

@ -24,8 +24,6 @@ typedef char HASHHEX[HASHHEXLEN+1];
#endif
#define OUT
#ifdef HAVE_LUA_H
#include <lua.h>
#include <lualib.h>
#include <lauxlib.h>
@ -347,13 +345,3 @@ error:
return ret /* cache-error */;
}
#else
int cache_parse_lua(server *srv, connection *con, plugin_data *p, buffer *fn) {
UNUSED(srv);
UNUSED(con);
UNUSED(p);
UNUSED(fn);
/* error */
return -1;
}
#endif

@ -1,15 +1,12 @@
#include "first.h"
#include "plugin.h"
#ifdef HAVE_GEOIP
#include <GeoIP.h>
#include <GeoIPCity.h>
#include "base.h"
#include "log.h"
#include "buffer.h"
#include "plugin.h"
#include <stdlib.h>
#include <string.h>
@ -416,13 +413,3 @@ int mod_geoip_plugin_init(plugin *p) {
return 0;
}
#else
int mod_geoip_plugin_init(plugin *p);
int mod_geoip_plugin_init(plugin *p) {
UNUSED(p);
return -1;
}
#endif

@ -19,7 +19,6 @@
#include <assert.h>
#include <setjmp.h>
#ifdef HAVE_LUA_H
#include <lua.h>
#include <lauxlib.h>
@ -1093,14 +1092,3 @@ int mod_magnet_plugin_init(plugin *p) {
return 0;
}
#else
#pragma message("lua is required, but was not found")
int mod_magnet_plugin_init(plugin *p);
int mod_magnet_plugin_init(plugin *p) {
UNUSED(p);
return -1;
}
#endif

@ -7,7 +7,6 @@
#include <time.h>
#include <assert.h>
#ifdef HAVE_LUA_H
#include <lualib.h>
#include <lauxlib.h>
@ -127,5 +126,3 @@ lua_State *script_cache_get_script(server *srv, connection *con, script_cache *c
return sc->L;
}
#endif

@ -5,7 +5,6 @@
#include "buffer.h"
#include "base.h"
#ifdef HAVE_LUA_H
#include <lua.h>
typedef struct {
@ -31,4 +30,3 @@ lua_State *script_cache_get_script(server *srv, connection *con,
script_cache *cache, buffer *name);
#endif
#endif

@ -6,9 +6,7 @@
#include <fcntl.h>
#include <string.h>
#ifdef HAVE_MYSQL
#include <mysql.h>
#endif
#include "plugin.h"
#include "log.h"
@ -26,7 +24,6 @@
* /ada@riksnet.se 2004-12-06
*/
#ifdef HAVE_MYSQL
typedef struct {
MYSQL *mysql;
buffer *mysql_query;
@ -253,9 +250,7 @@ static int mod_mysql_vhost_patch_connection(server *srv, connection *con, plugin
plugin_config *s = p->config_storage[0];
PATCH(mysql_query);
#ifdef HAVE_MYSQL
PATCH(mysql);
#endif
/* skip the first, the global context */
for (i = 1; i < srv->config_context->used; i++) {
@ -402,13 +397,3 @@ int mod_mysql_vhost_plugin_init(plugin *p) {
return 0;
}
#else
/* we don't have mysql support, this plugin does nothing */
int mod_mysql_vhost_plugin_init(plugin *p);
int mod_mysql_vhost_plugin_init(plugin *p) {
p->version = LIGHTTPD_VERSION_ID;
p->name = buffer_init_string("mysql_vhost");
return 0;
}
#endif

@ -13,8 +13,6 @@
#include <fcntl.h>
#include <string.h>
#if (defined(HAVE_GDBM_H) || defined(USE_MEMCACHED)) && defined(HAVE_PCRE_H)
#if defined(HAVE_GDBM_H)
# include <gdbm.h>
#endif
@ -249,13 +247,6 @@ SETDEFAULTS_FUNC(mod_trigger_b4_dl_set_defaults) {
return HANDLER_ERROR;
#endif
}
#if (!defined(HAVE_GDBM_H) && !defined(USE_MEMCACHED)) || !defined(HAVE_PCRE_H)
log_error_write(srv, __FILE__, __LINE__, "s",
"(either gdbm or libmemcached) and pcre are require, but were not found, aborting");
return HANDLER_ERROR;
#endif
}
return HANDLER_GO_ON;
@ -605,15 +596,3 @@ int mod_trigger_b4_dl_plugin_init(plugin *p) {
return 0;
}
#else
#pragma message("(either gdbm or libmemcached) and pcre are required, but were not found")
int mod_trigger_b4_dl_plugin_init(plugin *p);
int mod_trigger_b4_dl_plugin_init(plugin *p) {
UNUSED(p);
return -1;
}
#endif

Loading…
Cancel
Save