[SCM] Samba Shared Repository - branch v3-devel updated - release-3-2-0pre2-3788-g25fed05

Michael Adam obnox at samba.org
Thu Aug 21 10:15:28 GMT 2008


The branch, v3-devel has been updated
       via  25fed055c0ee1d892b902caae2a1188977316f14 (commit)
       via  b476400f0afcaf4e1a37b9f0b358f01dc7a194be (commit)
       via  fe62098666a16b31b025867f273d407e77152c4c (commit)
       via  f0e47bce2e98131812e96fb88cc3d1fe939e8d6c (commit)
       via  28688cfd57c322937f2c63087380c377bd961018 (commit)
      from  8027197635b988b3dcf9d3d00126a024e768fa62 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-devel


- Log -----------------------------------------------------------------
commit 25fed055c0ee1d892b902caae2a1188977316f14
Author: Michael Adam <obnox at samba.org>
Date:   Thu Aug 21 10:57:36 2008 +0200

    gitignore: add examples/libsmbclient/Makefile.internal - a generated file
    
    Michael

commit b476400f0afcaf4e1a37b9f0b358f01dc7a194be
Author: Michael Adam <obnox at samba.org>
Date:   Thu Aug 21 10:50:49 2008 +0200

    build: add [clean_]libsmbclient_examples targets to top level Makefile
    
    Michael

commit fe62098666a16b31b025867f273d407e77152c4c
Author: Michael Adam <obnox at samba.org>
Date:   Thu Aug 21 10:49:57 2008 +0200

    libsmbclient examples: source/bin to the library search path for smbwrapper build
    
    Michael

commit f0e47bce2e98131812e96fb88cc3d1fe939e8d6c
Author: Michael Adam <obnox at samba.org>
Date:   Thu Aug 21 10:48:44 2008 +0200

    libsmbclient examples: add Makefile.internal.in for building from a samba source
    
    Without needing to install libsmbclient to /usr/local/samba first.
    
    Michael

commit 28688cfd57c322937f2c63087380c377bd961018
Author: Michael Adam <obnox at samba.org>
Date:   Thu Aug 21 10:41:11 2008 +0200

    libsmbclient examples: fix prototype for readlink
    
    Michael

-----------------------------------------------------------------------

Summary of changes:
 .gitignore                                 |    1 +
 examples/libsmbclient/Makefile.internal.in |  138 ++++++++++++++++++++++++++++
 examples/libsmbclient/smbwrapper/Makefile  |    2 +-
 examples/libsmbclient/smbwrapper/wrapper.c |    2 +-
 source/Makefile.in                         |   11 ++
 source/configure.in                        |    1 +
 6 files changed, 153 insertions(+), 2 deletions(-)
 create mode 100644 examples/libsmbclient/Makefile.internal.in


Changeset truncated at 500 lines:

diff --git a/.gitignore b/.gitignore
index ca09083..edb1b3d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -65,6 +65,7 @@ examples/libsmbclient/testutime
 examples/libsmbclient/testwrite
 examples/libsmbclient/testtruncate
 examples/libsmbclient/tree
+examples/libsmbclient/Makefile.internal
 source/librpc/gen_ndr/cli_krb5pac.*
 source/librpc/gen_ndr/cli_messaging.*
 source/librpc/gen_ndr/cli_misc.*
diff --git a/examples/libsmbclient/Makefile.internal.in b/examples/libsmbclient/Makefile.internal.in
new file mode 100644
index 0000000..dd4518f
--- /dev/null
+++ b/examples/libsmbclient/Makefile.internal.in
@@ -0,0 +1,138 @@
+# Makefile.internal.in for building the libsmbclient examples
+# from within a samba build.
+#
+# Use Makfile for building the examples with a libsmbclient
+# installed to /usr/local/samba
+
+CC = @CC@
+
+SAMBA_DIR = ../../source
+SAMBA_INCLUDES = -I$(SAMBA_DIR)/include
+SAMBA_LIBPATH = -L$(SAMBA_DIR)/bin
+
+GTK_CFLAGS = `gtk-config --cflags`
+GTK_LIBS  = `gtk-config --libs`
+
+#GTK_CFLAGS = `pkg-config gtk+-2.0 --cflags`
+#GTK_LIBS = `pkg-config gtk+-2.0 --libs`
+
+FLAGS = @CPPFLAGS@ @CFLAGS@ $(GTK_CFLAGS) $(SAMBA_INCLUDES)
+
+PICFLAG=@PICFLAG@
+LDFLAGS= $(SAMBA_LIBPATH) @PIE_LDFLAGS@ @LDFLAGS@
+
+EXTERNAL_LIBS = @LIBS@ @LDAP_LIBS@ @KRB5_LIBS@ @NSCD_LIBS@
+LIBSMBCLIENT_LIBS = -lwbclient -lsmbclient -ltalloc -ltdb -ldl -lresolv
+CMDLINE_LIBS = @POPTLIBS@
+LIBS = $(EXTERNAL_LIBS) $(LIBSMBCLIENT_LIBS)
+
+# Compile a source file. (.c --> .o)
+COMPILE_CC = $(CC) -I. $(FLAGS) $(PICFLAG) -c $< -o $@
+COMPILE = $(COMPILE_CC)
+
+MAKEDIR = || exec false; \
+	  if test -d "$$dir"; then :; else \
+	  echo mkdir "$$dir"; \
+	  mkdir -p "$$dir" >/dev/null 2>&1 || \
+	  test -d "$$dir" || \
+	  mkdir "$$dir" || \
+	  exec false; fi || exec false
+
+TESTS=	testsmbc \
+	testacl \
+	testacl2 \
+	testacl3 \
+	testbrowse \
+	testbrowse2 \
+	teststat \
+	teststat2 \
+	teststat3 \
+	testtruncate \
+	testchmod \
+	testutime \
+	testread \
+	testwrite
+
+#	tree \
+
+all:	$(TESTS) smbsh
+
+.c.o:
+	@if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
+	dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
+	@echo Compiling $*.c
+	@$(COMPILE) && exit 0;\
+		echo "The following command failed:" 1>&2;\
+		echo "$(COMPILE_CC)" 1>&2;\
+		$(COMPILE_CC) >/dev/null 2>&1
+
+testsmbc: testsmbc.o
+	@echo Linking testsmbc
+	@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
+
+tree: tree.o
+	@echo Linking tree
+	@$(CC) $(GTK_CFLAGS) $(FLAGS) $(LDFLAGS) -o $@ $< $(GTK_LIBS) $(LIBS)
+
+testacl: testacl.o
+	@echo Linking testacl
+	@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
+
+testacl2: testacl2.o
+	@echo Linking testacl2
+	@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
+
+testacl3: testacl3.o
+	@echo Linking testacl3
+	@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
+
+testbrowse: testbrowse.o
+	@echo Linking testbrowse
+	@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
+
+testbrowse2: testbrowse2.o
+	@echo Linking testbrowse2
+	@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
+
+teststat: teststat.o
+	@echo Linking teststat
+	@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
+
+teststat2: teststat2.o
+	@echo Linking teststat2
+	@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
+
+teststat3: teststat3.o
+	@echo Linking teststat3
+	@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
+
+testtruncate: testtruncate.o
+	@echo Linking testtruncate
+	@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
+
+testchmod: testchmod.o
+	@echo Linking testchmod
+	@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
+
+testutime: testutime.o
+	@echo Linking testutime
+	@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
+
+testread: testread.o
+	@echo Linking testread
+	@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
+
+testwrite: testwrite.o
+	@echo Linking testwrite
+	@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
+
+testctx: testctx.o
+	@echo Linking testctx
+	@$(CC) $(FLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(CMDLINE_LIBS)
+
+smbsh:
+	make -C smbwrapper
+
+clean:
+	@rm -f *.o *~ $(TESTS)
+	@make -C smbwrapper clean
diff --git a/examples/libsmbclient/smbwrapper/Makefile b/examples/libsmbclient/smbwrapper/Makefile
index 7f5c17c..eb47005 100644
--- a/examples/libsmbclient/smbwrapper/Makefile
+++ b/examples/libsmbclient/smbwrapper/Makefile
@@ -3,7 +3,7 @@ DEFS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
 
 CFLAGS = -I$(SAMBA_INCL) $(EXTLIB_INCL)
 
-LDFLAGS = -L/usr/local/samba/lib
+LDFLAGS = -L/usr/local/samba/lib -L../../../source/bin
 
 SMBINCLUDE = -I../../../source/include
 CFLAGS= -fpic -g -O0 $(DEFS) $(SMBINCLUDE)
diff --git a/examples/libsmbclient/smbwrapper/wrapper.c b/examples/libsmbclient/smbwrapper/wrapper.c
index 958e006..3811b04 100644
--- a/examples/libsmbclient/smbwrapper/wrapper.c
+++ b/examples/libsmbclient/smbwrapper/wrapper.c
@@ -1109,7 +1109,7 @@ int utimes(const char *name, const struct timeval *tvp)
         return (* smbw_libc.utimes)((char *) name, (struct timeval *) tvp);
 }
 
-int readlink(const char *path, char *buf, size_t bufsize)
+ssize_t readlink(const char *path, char *buf, size_t bufsize)
 {
         check_init("readlink");
         
diff --git a/source/Makefile.in b/source/Makefile.in
index 923a600..c77404b 100644
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -2720,3 +2720,14 @@ valgrindtest:: all torture timelimit
 	 SMBD_VALGRIND="xterm -n smbd -e valgrind -q --db-attach=yes --num-callers=30" \
 	 VALGRIND="valgrind -q --num-callers=30 --log-file=${selftest_prefix}/valgrind.log" \
 	 PERL="$(PERL)" $(srcdir)/script/tests/selftest.sh ${selftest_prefix} all "${smbtorture4_path}"
+
+
+##
+## Examples:
+##
+
+libsmbclient_examples:
+	$(MAKE) -C ../examples/libsmbclient -f Makefile.internal
+
+clean_libsmbclient_examples:
+	$(MAKE) -C ../examples/libsmbclient -f Makefile.internal clean
diff --git a/source/configure.in b/source/configure.in
index c769859..2f99e7c 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -6149,6 +6149,7 @@ AC_OUTPUT(Makefile
 	  pkgconfig/wbclient.pc
 	  pkgconfig/netapi.pc
 	  pkgconfig/smbsharemodes.pc
+	  ../examples/libsmbclient/Makefile.internal
 	  )
 
 #################################################


-- 
Samba Shared Repository


More information about the samba-cvs mailing list