diff -r 71503088f51b -r f880f219c566 openpkg/popt.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openpkg/popt.patch Tue Jul 31 12:23:42 2012 +0200 @@ -0,0 +1,64 @@ +Index: popt.c +--- popt.c.orig 2009-04-12 20:14:38.000000000 +0200 ++++ popt.c 2010-04-30 21:31:41.000000000 +0200 +@@ -520,6 +520,11 @@ + } + + if (con->leftovers != NULL && con->numLeftovers > 0) { ++#if defined(OPENPKG) ++ /* Revert back to the old behaviour of passing to "exec" programs an ++ extra "--" argument to clearly separate options and arguments. */ ++ argv[argc++] = "--"; ++#endif + memcpy(argv + argc, con->leftovers, sizeof(*argv) * con->numLeftovers); + argc += con->numLeftovers; + } +@@ -697,10 +702,19 @@ + /*@switchbreak@*/ break; + #endif + case '!': ++#if defined(OPENPKG) ++ /* allow standard "!#:+" (first argument is expanded multiple times) ++ and non-standard "!#:*" (all arguments are expanded in sequence) */ ++ if (!(s[0] == '#' && s[1] == ':' && (s[2] == '+' || s[2] == '*'))) ++#else + if (!(s[0] == '#' && s[1] == ':' && s[2] == '+')) ++#endif + /*@switchbreak@*/ break; +- /* XXX Make sure that findNextArg deletes only next arg. */ ++#if defined(OPENPKG) ++ if (a == NULL || s[2] == '*') { ++#else + if (a == NULL) { ++#endif + if ((a = findNextArg(con, 1U, 1)) == NULL) + /*@switchbreak@*/ break; + } +Index: poptconfig.c +--- poptconfig.c.orig 2009-04-12 20:14:38.000000000 +0200 ++++ poptconfig.c 2010-04-30 21:32:23.000000000 +0200 +@@ -42,7 +42,10 @@ + /*@=declundef =exportheader =incondefs =protoparammatch =redecl =type @*/ + #endif /* __LCLINT__ */ + +-#if !defined(__GLIBC__) ++#if defined(__NetBSD__) ++#include ++#endif ++#if !defined(__GLIBC__) && (!defined(__NetBSD__) || __NetBSD_Version__ < 599001100) + /* Return nonzero if PATTERN contains any metacharacters. + Metacharacters can be quoted with backslashes if QUOTE is nonzero. */ + static int +Index: popthelp.c +--- popthelp.c.orig 2009-04-12 20:14:38.000000000 +0200 ++++ popthelp.c 2010-04-30 21:31:41.000000000 +0200 +@@ -15,7 +15,9 @@ + #include + #endif + ++#if !defined(OPENPKG) + #define POPT_WCHAR_HACK ++#endif + #ifdef POPT_WCHAR_HACK + #include /* for mbsrtowcs */ + /*@access mbstate_t @*/