mirror of
https://gitlab.freedesktop.org/pkg-config/pkg-config.git
synced 2026-05-02 16:38:14 +02:00
popt: Reset long argument handling before iterating to next argument
From the LFS mailing list looking into why check-cmd-options fails using the bundled popt: poptGetNextOption, after it invokes the callback for --define-variable=a=b (the operation of which sets the longArg local variable), does not reset longArg to NULL. So on the next time through its loop (after invoking the --define-variable callback, before invoking the --atleast-pkgconfig-version callback), on line 389 of popt.c, sets con->os->nextArg to longArg (the old "a=b" string). What it should do is set nextArg to nextCharArg (the next item on the command line). This happens if longArg is NULL. http://linuxfromscratch.org/pipermail/lfs-dev/2011-September/065065.html Freedesktop #9584
This commit is contained in:
parent
5745e1ba08
commit
e512071cae
1 changed files with 2 additions and 0 deletions
|
|
@ -297,6 +297,8 @@ int poptGetNextOpt(poptContext con) {
|
|||
int singleDash;
|
||||
|
||||
while (!done) {
|
||||
longArg = NULL;
|
||||
|
||||
while (!con->os->nextCharArg && con->os->next == con->os->argc
|
||||
&& con->os > con->optionStack)
|
||||
con->os--;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue