aboutsummaryrefslogtreecommitdiff
path: root/archival/gzip.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-10-03 21:00:06 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-10-03 21:00:06 +0000
commit67b23e6043d8e2b30b0bf3bc105b8583c2a26db5 (patch)
treeedb58560b444979051b42ab7f0c0c718f7459754 /archival/gzip.c
parent40920825d59874cf285390434486e88c8498d2d8 (diff)
downloadbusybox-w32-67b23e6043d8e2b30b0bf3bc105b8583c2a26db5.tar.gz
busybox-w32-67b23e6043d8e2b30b0bf3bc105b8583c2a26db5.tar.bz2
busybox-w32-67b23e6043d8e2b30b0bf3bc105b8583c2a26db5.zip
getopt_ulflags -> getopt32.
It is impossible to formulate sane ABI based on size of ulong because it can be 32-bit or 64-bit. Basically it means that you cannot portably use more that 32 option chars in one call anyway... Make it explicit.
Diffstat (limited to 'archival/gzip.c')
-rw-r--r--archival/gzip.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/archival/gzip.c b/archival/gzip.c
index 2fc9f7698..ef3724c34 100644
--- a/archival/gzip.c
+++ b/archival/gzip.c
@@ -1134,14 +1134,14 @@ int gzip_main(int argc, char **argv)
1134 OPT_force = 0x2, 1134 OPT_force = 0x2,
1135 }; 1135 };
1136 1136
1137 unsigned long opt; 1137 unsigned opt;
1138 int result; 1138 int result;
1139 int inFileNum; 1139 int inFileNum;
1140 int outFileNum; 1140 int outFileNum;
1141 struct stat statBuf; 1141 struct stat statBuf;
1142 char *delFileName; 1142 char *delFileName;
1143 1143
1144 opt = bb_getopt_ulflags(argc, argv, "cf123456789qv" USE_GUNZIP("d")); 1144 opt = getopt32(argc, argv, "cf123456789qv" USE_GUNZIP("d"));
1145 //if (opt & 0x1) // -c 1145 //if (opt & 0x1) // -c
1146 //if (opt & 0x2) // -f 1146 //if (opt & 0x2) // -f
1147 /* Ignore 1-9 (compression level) options */ 1147 /* Ignore 1-9 (compression level) options */
@@ -1157,7 +1157,7 @@ int gzip_main(int argc, char **argv)
1157 //if (opt & 0x800) // -q 1157 //if (opt & 0x800) // -q
1158 //if (opt & 0x1000) // -v 1158 //if (opt & 0x1000) // -v
1159 if (ENABLE_GUNZIP && (opt & 0x2000)) { // -d 1159 if (ENABLE_GUNZIP && (opt & 0x2000)) { // -d
1160 /* FIXME: bb_getopt_ulflags should not depend on optind */ 1160 /* FIXME: getopt32 should not depend on optind */
1161 optind = 1; 1161 optind = 1;
1162 return gunzip_main(argc, argv); 1162 return gunzip_main(argc, argv);
1163 } 1163 }