OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /v/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src Date: 19-Jun-2007 16:24:55 Branch: HEAD Handle: 2007061915245500 Modified files: openpkg-src/file file.patch file.spec Log: resolve namespace pollution problems caused by symbols sread and strndup Summary: Revision Changes Path 1.7 +74 -3 openpkg-src/file/file.patch 1.69 +1 -1 openpkg-src/file/file.spec ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/file/file.patch ============================================================================ $ cvs diff -u -r1.6 -r1.7 file.patch --- openpkg-src/file/file.patch 25 May 2007 15:09:26 -0000 1.6 +++ openpkg-src/file/file.patch 19 Jun 2007 14:24:55 -0000 1.7 @@ -1,7 +1,7 @@ Index: src/apprentice.c ---- src/apprentice.c.orig 2007-01-19 20:54:39 +0100 -+++ src/apprentice.c 2007-03-03 18:03:23 +0100 -@@ -533,6 +533,7 @@ +--- src/apprentice.c.orig 2007-05-16 22:51:40 +0200 ++++ src/apprentice.c 2007-06-19 16:00:43 +0200 +@@ -534,6 +534,7 @@ file_oomem(ms, maxmagic * sizeof(*marray)); return -1; } @@ -9,3 +9,74 @@ marraycount = 0; /* print silly verbose header for USG compat. */ +Index: src/compress.c +--- src/compress.c.orig 2007-03-05 03:41:29 +0100 ++++ src/compress.c 2007-06-19 16:00:43 +0200 +@@ -158,7 +158,7 @@ + * `safe' read for sockets and pipes. + */ + protected ssize_t +-sread(int fd, void *buf, size_t n, int canbepipe) ++file_sread(int fd, void *buf, size_t n, int canbepipe) + { + int rv, cnt; + #ifdef FIONREAD +@@ -252,7 +252,7 @@ + if (swrite(tfd, startbuf, nbytes) != (ssize_t)nbytes) + r = 1; + else { +- while ((r = sread(fd, buf, sizeof(buf), 1)) > 0) ++ while ((r = file_sread(fd, buf, sizeof(buf), 1)) > 0) + if (swrite(tfd, buf, (size_t)r) != r) + break; + } +@@ -453,7 +453,7 @@ + n = 0; + goto err; + } +- if ((r = sread(fdout[0], *newch, HOWMANY, 0)) <= 0) { ++ if ((r = file_sread(fdout[0], *newch, HOWMANY, 0)) <= 0) { + #ifdef DEBUG + (void)fprintf(stderr, "Read failed (%s)\n", + strerror(errno)); +Index: src/file.h +--- src/file.h.orig 2007-03-25 05:13:47 +0200 ++++ src/file.h 2007-06-19 16:00:57 +0200 +@@ -323,7 +323,7 @@ + protected void file_showstr(FILE *, const char *, size_t); + protected size_t file_mbswidth(const char *); + protected const char *file_getbuffer(struct magic_set *); +-protected ssize_t sread(int, void *, size_t, int); ++protected ssize_t file_sread(int, void *, size_t, int); + protected int file_check_mem(struct magic_set *, unsigned int); + + #ifndef COMPILE_ONLY +Index: src/magic.c +--- src/magic.c.orig 2007-03-26 19:59:50 +0200 ++++ src/magic.c 2007-06-19 16:00:43 +0200 +@@ -305,7 +305,7 @@ + if (ispipe) { + ssize_t r = 0; + +- while ((r = sread(fd, (void *)&buf[nbytes], ++ while ((r = file_sread(fd, (void *)&buf[nbytes], + (size_t)(HOWMANY - nbytes), 1)) > 0) { + nbytes += r; + if (r < PIPE_BUF) break; +Index: src/softmagic.c +--- src/softmagic.c.orig 2007-05-08 16:44:18 +0200 ++++ src/softmagic.c 2007-06-19 16:00:43 +0200 +@@ -287,10 +287,9 @@ + } + + #ifndef HAVE_STRNDUP +-char * strndup(const char *, size_t); +- +-char * +-strndup(const char *str, size_t n) ++#define strndup(str,n) magic_strndup(str,n) ++static char * ++magic_strndup(const char *str, size_t n) + { + size_t len; + char *copy; @@ . patch -p0 <<'@@ .' Index: openpkg-src/file/file.spec ============================================================================ $ cvs diff -u -r1.68 -r1.69 file.spec --- openpkg-src/file/file.spec 25 May 2007 15:09:27 -0000 1.68 +++ openpkg-src/file/file.spec 19 Jun 2007 14:24:55 -0000 1.69 @@ -37,7 +37,7 @@ Group: Filesystem License: BSD Version: %{V_api_c} -Release: 20070525 +Release: 20070619 # package options %option with_perl no @@ . ______________________________________________________________________ OpenPKG http://openpkg.org CVS Repository Commit List openpkg-cvs@openpkg.org