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: 03-Mar-2007 18:18:02
Branch: HEAD Handle: 2007030317180200
Modified files:
openpkg-src/file file.patch file.spec
Log:
workaround for older platforms like Solaris < 10 where REG_STARTEND is
not existing
Summary:
Revision Changes Path
1.5 +30 -4 openpkg-src/file/file.patch
1.67 +1 -1 openpkg-src/file/file.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/file/file.patch
============================================================================
$ cvs diff -u -r1.4 -r1.5 file.patch
--- openpkg-src/file/file.patch 19 Sep 2006 11:23:02 -0000 1.4
+++ openpkg-src/file/file.patch 3 Mar 2007 17:18:02 -0000 1.5
@@ -1,11 +1,37 @@
Index: src/apprentice.c
---- src/apprentice.c.orig 2006-03-02 23:08:57.000000000 +0100
-+++ src/apprentice.c 2006-09-19 13:19:42.234166634 +0200
-@@ -386,6 +386,7 @@
- file_oomem(ms);
+--- 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 @@
+ file_oomem(ms, maxmagic * sizeof(*marray));
return -1;
}
+ memset(marray, 0, maxmagic * sizeof(*marray));
marraycount = 0;
/* print silly verbose header for USG compat. */
+Index: src/softmagic.c
+--- src/softmagic.c.orig 2007-01-18 06:45:35 +0100
++++ src/softmagic.c 2007-03-03 18:16:35 +0100
+@@ -1523,10 +1523,22 @@
+ }
+ else {
+ regmatch_t pmatch[1];
++#ifdef REG_STARTEND
+ pmatch[0].rm_so = 0;
+ pmatch[0].rm_eo = ms->search.s_len;
+ rc = regexec(&rx, (const char *)ms->search.s,
+ 1, pmatch, REG_STARTEND);
++#else
++ char *search;
++ if (ms->search.s[ms->search.s_len] == '\0')
++ rc = regexec(&rx, (const char *)ms->search.s,
1, pmatch, 0);
++ else {
++ search = strdup(ms->search.s);
++ search[ms->search.s_len] = '\0';
++ rc = regexec(&rx, (const char *)search, 1,
pmatch, 0);
++ free(search);
++ }
++#endif
+ switch (rc) {
+ case 0:
+ ms->search.s += (int)pmatch[0].rm_so;
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/file/file.spec
============================================================================
$ cvs diff -u -r1.66 -r1.67 file.spec
--- openpkg-src/file/file.spec 2 Mar 2007 05:15:24 -0000 1.66
+++ openpkg-src/file/file.spec 3 Mar 2007 17:18:02 -0000 1.67
@@ -37,7 +37,7 @@
Group: Filesystem
License: BSD
Version: %{V_api_c}
-Release: 20070302
+Release: 20070303
# package options
%option with_perl no
@@ .
______________________________________________________________________
OpenPKG http://openpkg.org
CVS Repository Commit List [email protected]