diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-10-03 21:00:06 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-10-03 21:00:06 +0000 |
commit | 63adc7384791548741e3a2afbee1be40d99fe9d2 (patch) | |
tree | edb58560b444979051b42ab7f0c0c718f7459754 /archival/gzip.c | |
parent | 1fa12c6ebcb25e2924778bcbaae4bea1af7b7e6a (diff) | |
download | busybox-w32-63adc7384791548741e3a2afbee1be40d99fe9d2.tar.gz busybox-w32-63adc7384791548741e3a2afbee1be40d99fe9d2.tar.bz2 busybox-w32-63adc7384791548741e3a2afbee1be40d99fe9d2.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.
git-svn-id: svn://busybox.net/trunk/busybox@16305 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'archival/gzip.c')
-rw-r--r-- | archival/gzip.c | 6 |
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 | } |