gsoap/revert-z.diff

34 lines
1.1 KiB
Diff

From: Jan Engelhardt <jengelh@inai.de>
Upstream: https://sourceforge.net/p/gsoap2/bugs/1253/
Revert broken code change in 2.8.89 that ignores all -z options.
diff --git a/gsoap/src/soapcpp2.c b/gsoap/src/soapcpp2.c
index 34ca6fce..3a92e297 100644
--- a/gsoap/src/soapcpp2.c
+++ b/gsoap/src/soapcpp2.c
@@ -356,22 +356,15 @@ infile header file to parse (if none reads stdin)\n\
vflag = 1;
break;
case 'z':
- {
- int z = zflag;
a++;
- if (zflag)
- fprintf(stderr, "soapcpp2: Option -z specified twice\n");
g = 0;
if (*a)
zflag = *a - '0';
else if (i < argc && argv[++i])
zflag = *argv[i] - '0';
else
- execerror("Option -z requires an argument");
- if (zflag == 0 || z < zflag)
- zflag = z;
+ execerror("Option -z requires a digit");
break;
- }
default:
fprintf(stderr, "soapcpp2: Unknown option %s\n", a);
exit(1);