r15318: Don't create empty static libraries as some hosts have trouble with them.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 29 Apr 2006 11:32:54 +0000 (11:32 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:05:12 +0000 (14:05 -0500)
(This used to be commit 1505d7c6001f8a35e728a14af2885b813c32ebe7)

source4/build/smb_build/TODO
source4/build/smb_build/makefile.pm
source4/build/smb_build/output.pm
source4/lib/socket_wrapper/config.mk
source4/lib/util/util_str.c

index cc15e9099abcb5a858ce05b991a10f0cf9e17c42..148abd6eda1116a5c188d54970b691bd9111c86e 100644 (file)
@@ -1,4 +1,3 @@
-- replace StrnCpy() with strlcpy()
 - Add --export-dynamic for each subsystem that has modules
 - let the build system implement some make functions($(patsubst),$(wildcard),...) and use our own implementations where `make' does not support them
 - include extra_flags.txt using Makefile construction if 
index e6865d5e60a1b970ec655012e5772cb57a7a6e23..8313044bc99d1b393f5a0fbe4b5c18bc5e51c896 100644 (file)
@@ -323,6 +323,8 @@ sub StaticLibrary($$)
 {
        my ($self,$ctx) = @_;
 
+       return unless (defined($ctx->{OBJ_FILES}));
+
        push (@{$self->{static_libs}}, $ctx->{TARGET});
 
        $self->output("$ctx->{TYPE}_$ctx->{NAME}_OUTPUT = $ctx->{OUTPUT}\n");
index 85c78cf3b46278376b16755742fd187a6552185b..e6cbcc0036c62781f16ca5276bca4f2c89abf2fb 100644 (file)
@@ -86,7 +86,11 @@ sub generate_static_library($)
        push(@{$lib->{LINK_FLAGS}}, "\$($lib->{TYPE}_$lib->{NAME}\_OBJ_LIST)");
 
        $lib->{TARGET} = "bin/$lib->{LIBRARY_NAME}";
-       $lib->{OUTPUT} = "-l".lc($link_name);
+       if (defined($lib->{OBJ_FILES})) {
+               $lib->{OUTPUT} = $lib->{TARGET};
+       } else {
+               $lib->{OUTPUT} = "";
+       }
 }
 
 sub generate_binary($)
index baa11b4675f147d79fcabe960b700804c3f34f3b..9e194230dc1ebd63a5e8ec028918783f431dd998 100644 (file)
@@ -6,5 +6,6 @@ SO_VERSION = 0
 DESCRIPTION = Wrapper library for testing TCP/IP connections using Unix Sockets
 PUBLIC_HEADERS = socket_wrapper.h
 OBJ_FILES = socket_wrapper.o
+PRIVATE_DEPENDENCIES = EXT_SOCKET
 # End SUBSYSTEM SOCKET_WRAPPER
 ##############################
index df9fd44cd6ba28eee8457e0d477bde86e65c1e80..ec6a1cbbead4c0a5a78f9486801066d134e61781 100644 (file)
@@ -775,8 +775,9 @@ _PUBLIC_ int strwicmp(const char *psz1, const char *psz2)
 **/
 _PUBLIC_ void string_replace(char *s, char oldc, char newc)
 {
-       for (;s && *s; s++) {
+       while (*s) {
                if (*s == oldc) *s = newc;
+               s++;
        }
 }