head 1.1; access; symbols OPENPKG_E1_MP_HEAD:1.1 OPENPKG_E1_MP:1.1 OPENPKG_E1_MP_2_STABLE:1.1.2.2 OPENPKG_E1_FP:1.1.2.2 OPENPKG_2_STABLE_MP:1.1 OPENPKG_2_STABLE_20061018:1.1.2.2 OPENPKG_2_STABLE:1.1.0.2 OPENPKG_CW_FP:1.1; locks; strict; comment @# @; 1.1 date 2004.05.18.08.47.07; author rse; state Exp; branches 1.1.2.1; next ; 1.1.2.1 date 2004.05.18.08.47.07; author rse; state dead; branches; next 1.1.2.2; commitid iZxwRSmmWscPXUQr; 1.1.2.2 date 2006.10.16.14.56.30; author rse; state Exp; branches; next ; commitid iZxwRSmmWscPXUQr; desc @@ 1.1 log @new package: smbget 0.6 (SMB Download Utility) @ text @Index: Makefile --- Makefile.orig 2003-10-20 22:23:19.000000000 +0200 +++ Makefile 2004-05-18 10:38:54.000000000 +0200 @@@@ -3,12 +3,15 @@@@ mandir = $(prefix)/share/man docdir = $(prefix)/share/doc INSTALL = install -CFLAGS = -Wall -g3 +CC = cc +CFLAGS = +LDFLAGS = +LIBS = -lpopt -lsmbclient all: smbget smbget: smbget.o - $(CC) -o $@@ $< -lpopt -lsmbclient + $(CC) -o $@@ $< $(LDFLAGS) $(LIBS) %.o: %.c $(CC) $(CFLAGS) -c $< -o $@@ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE Index: smbget.c --- smbget.c.orig 2003-11-15 18:15:03.000000000 +0100 +++ smbget.c 2004-05-18 10:45:38.000000000 +0200 @@@@ -6,7 +6,6 @@@@ #define VERSION "0.6" #define _GNU_SOURCE -#include #include #include #include @@@@ -29,6 +28,27 @@@@ #define OFF_T_FORMAT "%ld" #endif +static size_t my_strnlen(const char *string, size_t maxlen) +{ + const char *end = memchr(string, '\0', maxlen); + return end ? end - string : maxlen; +} + +static char *my_strndup(const char *s, size_t n) +{ + size_t len; + char *new; + + len = my_strnlen(s, n); + if ((new = malloc(len + 1)) == NULL) + return NULL; + new[len] = '\0'; + memcpy(new, s, len); + return new; +} + +#define strndup my_strndup + int columns = 0; time_t total_start_time = 0; @ 1.1.2.1 log @file smbget.patch was added on branch OPENPKG_2_STABLE on 2006-10-16 14:56:30 +0000 @ text @d1 60 @ 1.1.2.2 log @Mass merge from CURRENT to 2-STABLE (all packages except those of JUNK class) @ text @a0 60 Index: Makefile --- Makefile.orig 2003-10-20 22:23:19.000000000 +0200 +++ Makefile 2004-05-18 10:38:54.000000000 +0200 @@@@ -3,12 +3,15 @@@@ mandir = $(prefix)/share/man docdir = $(prefix)/share/doc INSTALL = install -CFLAGS = -Wall -g3 +CC = cc +CFLAGS = +LDFLAGS = +LIBS = -lpopt -lsmbclient all: smbget smbget: smbget.o - $(CC) -o $@@ $< -lpopt -lsmbclient + $(CC) -o $@@ $< $(LDFLAGS) $(LIBS) %.o: %.c $(CC) $(CFLAGS) -c $< -o $@@ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE Index: smbget.c --- smbget.c.orig 2003-11-15 18:15:03.000000000 +0100 +++ smbget.c 2004-05-18 10:45:38.000000000 +0200 @@@@ -6,7 +6,6 @@@@ #define VERSION "0.6" #define _GNU_SOURCE -#include #include #include #include @@@@ -29,6 +28,27 @@@@ #define OFF_T_FORMAT "%ld" #endif +static size_t my_strnlen(const char *string, size_t maxlen) +{ + const char *end = memchr(string, '\0', maxlen); + return end ? end - string : maxlen; +} + +static char *my_strndup(const char *s, size_t n) +{ + size_t len; + char *new; + + len = my_strnlen(s, n); + if ((new = malloc(len + 1)) == NULL) + return NULL; + new[len] = '\0'; + memcpy(new, s, len); + return new; +} + +#define strndup my_strndup + int columns = 0; time_t total_start_time = 0; @