Browse Source

make (compile and link) cleanly under cygwin

personal/stbuehler/mod-csrf-old
Glenn Strauss 6 years ago
parent
commit
4db255ca39
  1. 71
      src/Makefile.am
  2. 1
      src/response.c
  3. 4
      src/server.c

71
src/Makefile.am

@ -92,184 +92,187 @@ if NO_RDYNAMIC
# if the linker doesn't allow referencing symbols of the binary
# we have to put everything into a shared-lib and link it into
# everything
common_ldflags = -avoid-version -no-undefined
lib_LTLIBRARIES += liblightcomp.la
liblightcomp_la_SOURCES=$(common_src)
liblightcomp_la_CFLAGS=$(AM_CFLAGS) $(LIBEV_CFLAGS)
liblightcomp_la_LDFLAGS = -avoid-version -no-undefined
liblightcomp_la_LDFLAGS = $(common_ldflags)
liblightcomp_la_LIBADD = $(PCRE_LIB) $(SSL_LIB) $(FAM_LIBS) $(LIBEV_LIBS)
common_libadd = liblightcomp.la
else
src += $(common_src)
common_ldflags = -avoid-version
common_libadd =
endif
common_module_ldflags = -module -export-dynamic $(common_ldflags)
lib_LTLIBRARIES += mod_flv_streaming.la
mod_flv_streaming_la_SOURCES = mod_flv_streaming.c
mod_flv_streaming_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_flv_streaming_la_LDFLAGS = $(common_module_ldflags)
mod_flv_streaming_la_LIBADD = $(common_libadd)
lib_LTLIBRARIES += mod_evasive.la
mod_evasive_la_SOURCES = mod_evasive.c
mod_evasive_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_evasive_la_LDFLAGS = $(common_module_ldflags)
mod_evasive_la_LIBADD = $(common_libadd)
lib_LTLIBRARIES += mod_webdav.la
mod_webdav_la_SOURCES = mod_webdav.c
mod_webdav_la_CFLAGS = $(AM_CFLAGS) $(XML_CFLAGS) $(SQLITE_CFLAGS)
mod_webdav_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_webdav_la_LDFLAGS = $(common_module_ldflags)
mod_webdav_la_LIBADD = $(common_libadd) $(XML_LIBS) $(SQLITE_LIBS) $(UUID_LIBS)
lib_LTLIBRARIES += mod_magnet.la
mod_magnet_la_SOURCES = mod_magnet.c mod_magnet_cache.c
mod_magnet_la_CFLAGS = $(AM_CFLAGS) $(LUA_CFLAGS)
mod_magnet_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_magnet_la_LDFLAGS = $(common_module_ldflags)
mod_magnet_la_LIBADD = $(common_libadd) $(LUA_LIBS) -lm
lib_LTLIBRARIES += mod_cml.la
mod_cml_la_SOURCES = mod_cml.c mod_cml_lua.c mod_cml_funcs.c
mod_cml_la_CFLAGS = $(AM_CFLAGS) $(LUA_CFLAGS)
mod_cml_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_cml_la_LDFLAGS = $(common_module_ldflags)
mod_cml_la_LIBADD = $(MEMCACHED_LIB) $(common_libadd) $(LUA_LIBS) -lm
lib_LTLIBRARIES += mod_trigger_b4_dl.la
mod_trigger_b4_dl_la_SOURCES = mod_trigger_b4_dl.c
mod_trigger_b4_dl_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_trigger_b4_dl_la_LDFLAGS = $(common_module_ldflags)
mod_trigger_b4_dl_la_LIBADD = $(GDBM_LIB) $(MEMCACHED_LIB) $(PCRE_LIB) $(common_libadd)
lib_LTLIBRARIES += mod_mysql_vhost.la
mod_mysql_vhost_la_SOURCES = mod_mysql_vhost.c
mod_mysql_vhost_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_mysql_vhost_la_LDFLAGS = $(common_module_ldflags)
mod_mysql_vhost_la_LIBADD = $(MYSQL_LIBS) $(common_libadd)
mod_mysql_vhost_la_CPPFLAGS = $(MYSQL_INCLUDE)
lib_LTLIBRARIES += mod_cgi.la
mod_cgi_la_SOURCES = mod_cgi.c
mod_cgi_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_cgi_la_LDFLAGS = $(common_module_ldflags)
mod_cgi_la_LIBADD = $(common_libadd)
lib_LTLIBRARIES += mod_scgi.la
mod_scgi_la_SOURCES = mod_scgi.c
mod_scgi_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_scgi_la_LDFLAGS = $(common_module_ldflags)
mod_scgi_la_LIBADD = $(common_libadd)
lib_LTLIBRARIES += mod_staticfile.la
mod_staticfile_la_SOURCES = mod_staticfile.c
mod_staticfile_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_staticfile_la_LDFLAGS = $(common_module_ldflags)
mod_staticfile_la_LIBADD = $(common_libadd)
lib_LTLIBRARIES += mod_dirlisting.la
mod_dirlisting_la_SOURCES = mod_dirlisting.c
mod_dirlisting_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_dirlisting_la_LDFLAGS = $(common_module_ldflags)
mod_dirlisting_la_LIBADD = $(common_libadd) $(PCRE_LIB)
lib_LTLIBRARIES += mod_indexfile.la
mod_indexfile_la_SOURCES = mod_indexfile.c
mod_indexfile_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_indexfile_la_LDFLAGS = $(common_module_ldflags)
mod_indexfile_la_LIBADD = $(common_libadd)
lib_LTLIBRARIES += mod_setenv.la
mod_setenv_la_SOURCES = mod_setenv.c
mod_setenv_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_setenv_la_LDFLAGS = $(common_module_ldflags)
mod_setenv_la_LIBADD = $(common_libadd)
lib_LTLIBRARIES += mod_alias.la
mod_alias_la_SOURCES = mod_alias.c
mod_alias_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_alias_la_LDFLAGS = $(common_module_ldflags)
mod_alias_la_LIBADD = $(common_libadd)
lib_LTLIBRARIES += mod_userdir.la
mod_userdir_la_SOURCES = mod_userdir.c
mod_userdir_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_userdir_la_LDFLAGS = $(common_module_ldflags)
mod_userdir_la_LIBADD = $(common_libadd)
lib_LTLIBRARIES += mod_rrdtool.la
mod_rrdtool_la_SOURCES = mod_rrdtool.c
mod_rrdtool_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_rrdtool_la_LDFLAGS = $(common_module_ldflags)
mod_rrdtool_la_LIBADD = $(common_libadd)
lib_LTLIBRARIES += mod_usertrack.la
mod_usertrack_la_SOURCES = mod_usertrack.c
mod_usertrack_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_usertrack_la_LDFLAGS = $(common_module_ldflags)
mod_usertrack_la_LIBADD = $(common_libadd)
lib_LTLIBRARIES += mod_proxy.la
mod_proxy_la_SOURCES = mod_proxy.c
mod_proxy_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_proxy_la_LDFLAGS = $(common_module_ldflags)
mod_proxy_la_LIBADD = $(common_libadd)
lib_LTLIBRARIES += mod_ssi.la
mod_ssi_la_SOURCES = mod_ssi_exprparser.c mod_ssi_expr.c mod_ssi.c
mod_ssi_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_ssi_la_LDFLAGS = $(common_module_ldflags)
mod_ssi_la_LIBADD = $(common_libadd) $(PCRE_LIB)
lib_LTLIBRARIES += mod_secdownload.la
mod_secdownload_la_SOURCES = mod_secdownload.c
mod_secdownload_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_secdownload_la_LDFLAGS = $(common_module_ldflags)
mod_secdownload_la_LIBADD = $(common_libadd)
#lib_LTLIBRARIES += mod_httptls.la
#mod_httptls_la_SOURCES = mod_httptls.c
#mod_httptls_la_LDFLAGS = -module -export-dynamic -avoid-version
#mod_httptls_la_LDFLAGS = $(common_module_ldflags)
#mod_httptls_la_LIBADD = $(common_libadd)
lib_LTLIBRARIES += mod_expire.la
mod_expire_la_SOURCES = mod_expire.c
mod_expire_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_expire_la_LDFLAGS = $(common_module_ldflags)
mod_expire_la_LIBADD = $(common_libadd)
lib_LTLIBRARIES += mod_evhost.la
mod_evhost_la_SOURCES = mod_evhost.c
mod_evhost_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_evhost_la_LDFLAGS = $(common_module_ldflags)
mod_evhost_la_LIBADD = $(common_libadd)
lib_LTLIBRARIES += mod_simple_vhost.la
mod_simple_vhost_la_SOURCES = mod_simple_vhost.c
mod_simple_vhost_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_simple_vhost_la_LDFLAGS = $(common_module_ldflags)
mod_simple_vhost_la_LIBADD = $(common_libadd)
lib_LTLIBRARIES += mod_fastcgi.la
mod_fastcgi_la_SOURCES = mod_fastcgi.c
mod_fastcgi_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_fastcgi_la_LDFLAGS = $(common_module_ldflags)
mod_fastcgi_la_LIBADD = $(common_libadd)
lib_LTLIBRARIES += mod_extforward.la
mod_extforward_la_SOURCES = mod_extforward.c
mod_extforward_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_extforward_la_LDFLAGS = $(common_module_ldflags)
mod_extforward_la_LIBADD = $(common_libadd)
lib_LTLIBRARIES += mod_access.la
mod_access_la_SOURCES = mod_access.c
mod_access_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_access_la_LDFLAGS = $(common_module_ldflags)
mod_access_la_LIBADD = $(common_libadd)
lib_LTLIBRARIES += mod_compress.la
mod_compress_la_SOURCES = mod_compress.c
mod_compress_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_compress_la_LDFLAGS = $(common_module_ldflags)
mod_compress_la_LIBADD = $(Z_LIB) $(BZ_LIB) $(common_libadd)
lib_LTLIBRARIES += mod_auth.la
mod_auth_la_SOURCES = mod_auth.c http_auth.c
mod_auth_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_auth_la_LDFLAGS = $(common_module_ldflags)
mod_auth_la_LIBADD = $(CRYPT_LIB) $(SSL_LIB) $(LDAP_LIB) $(LBER_LIB) $(common_libadd)
lib_LTLIBRARIES += mod_rewrite.la
mod_rewrite_la_SOURCES = mod_rewrite.c
mod_rewrite_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_rewrite_la_LDFLAGS = $(common_module_ldflags)
mod_rewrite_la_LIBADD = $(PCRE_LIB) $(common_libadd)
lib_LTLIBRARIES += mod_redirect.la
mod_redirect_la_SOURCES = mod_redirect.c
mod_redirect_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_redirect_la_LDFLAGS = $(common_module_ldflags)
mod_redirect_la_LIBADD = $(PCRE_LIB) $(common_libadd)
lib_LTLIBRARIES += mod_status.la
mod_status_la_SOURCES = mod_status.c
mod_status_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_status_la_LDFLAGS = $(common_module_ldflags)
mod_status_la_LIBADD = $(common_libadd)
lib_LTLIBRARIES += mod_accesslog.la
mod_accesslog_la_SOURCES = mod_accesslog.c
mod_accesslog_la_LDFLAGS = -module -export-dynamic -avoid-version
mod_accesslog_la_LDFLAGS = $(common_module_ldflags)
mod_accesslog_la_LIBADD = $(common_libadd)

1
src/response.c

@ -448,7 +448,6 @@ handler_t http_response_prepare(server *srv, connection *con) {
if (con->physical.rel_path->used > 1) {
buffer *b = con->physical.rel_path;
size_t len = buffer_string_length(b);
size_t i;
/* strip trailing " /" or "./" once */
if (len > 1 &&

4
src/server.c

@ -835,7 +835,7 @@ int main (int argc, char **argv) {
}
if (srv->event_handler == FDEVENT_HANDLER_SELECT) {
srv->max_fds = rlim.rlim_cur < ((int)FD_SETSIZE) - 200 ? rlim.rlim_cur : FD_SETSIZE - 200;
srv->max_fds = rlim.rlim_cur < (rlim_t)FD_SETSIZE - 200 ? (int)rlim.rlim_cur : (int)FD_SETSIZE - 200;
} else {
srv->max_fds = rlim.rlim_cur;
}
@ -970,7 +970,7 @@ int main (int argc, char **argv) {
}
if (srv->event_handler == FDEVENT_HANDLER_SELECT) {
srv->max_fds = rlim.rlim_cur < ((int)FD_SETSIZE) - 200 ? rlim.rlim_cur : FD_SETSIZE - 200;
srv->max_fds = rlim.rlim_cur < (rlim_t)FD_SETSIZE - 200 ? (int)rlim.rlim_cur : (int)FD_SETSIZE - 200;
} else {
srv->max_fds = rlim.rlim_cur;
}

Loading…
Cancel
Save