AC_ARG_ENABLE(socket-wrapper,
[ --enable-socket-wrapper Turn on socket wrapper library (default=no)])
-DEFAULT_TEST_TARGET=test-noswrap
+DEFAULT_TEST_OPTIONS=
HAVE_SOCKET_WRAPPER=no
if eval "test x$developer = xyes"; then
enable_socket_wrapper=yes
fi
-
+
if eval "test x$enable_socket_wrapper = xyes"; then
AC_DEFINE(SOCKET_WRAPPER,1,[Use socket wrapper library])
- DEFAULT_TEST_TARGET=test-swrap
+ DEFAULT_TEST_OPTIONS=--socket-wrapper
HAVE_SOCKET_WRAPPER=yes
# this is only used for samba3
SOCKET_WRAPPER_OBJS="lib/socket_wrapper/socket_wrapper.o"
fi
-AC_SUBST(DEFAULT_TEST_TARGET)
+AC_SUBST(DEFAULT_TEST_OPTIONS)
AC_SUBST(HAVE_SOCKET_WRAPPER)
AC_SUBST(SOCKET_WRAPPER_OBJS)
--- /dev/null
+##############################
+# Start SUBSYSTEM SOCKET_WRAPPER
+[SUBSYSTEM::SOCKET_WRAPPER]
+PRIVATE_DEPENDENCIES = LIBREPLACE_NETWORK
+# End SUBSYSTEM SOCKET_WRAPPER
+##############################
+
+SOCKET_WRAPPER_OBJ_FILES = $(socketwrappersrcdir)/socket_wrapper.o
return -1;
}
- my_addr = malloc(my_addrlen);
+ my_addr = (struct sockaddr *)malloc(my_addrlen);
if (my_addr == NULL) {
return -1;
}
#define __SOCKET_WRAPPER_H__
const char *socket_wrapper_dir(void);
+unsigned int socket_wrapper_default_iface(void);
int swrap_socket(int family, int type, int protocol);
int swrap_accept(int s, struct sockaddr *addr, socklen_t *addrlen);
int swrap_connect(int s, const struct sockaddr *serv_addr, socklen_t addrlen);
#define close(s) swrap_close(s)
#endif
+
#endif /* __SOCKET_WRAPPER_H__ */
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
+ the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "includes.h"