[PATCH 2/4] blkid, uuidd, uuidgen: assume getopt.h and getopt.h are available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



These headers are in use allover this project without issues.

Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 misc-utils/blkid.c   | 6 ------
 misc-utils/uuidd.c   | 8 --------
 misc-utils/uuidgen.c | 8 --------
 3 files changed, 22 deletions(-)

diff --git a/misc-utils/blkid.c b/misc-utils/blkid.c
index bbe7b62..c0be457 100644
--- a/misc-utils/blkid.c
+++ b/misc-utils/blkid.c
@@ -17,13 +17,7 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <errno.h>
-#ifdef HAVE_GETOPT_H
 #include <getopt.h>
-#else
-extern int getopt(int argc, char * const argv[], const char *optstring);
-extern char *optarg;
-extern int optind;
-#endif
 
 #define OUTPUT_VALUE_ONLY	(1 << 1)
 #define OUTPUT_DEVICE_ONLY	(1 << 2)
diff --git a/misc-utils/uuidd.c b/misc-utils/uuidd.c
index 76f5e41..e19be52 100644
--- a/misc-utils/uuidd.c
+++ b/misc-utils/uuidd.c
@@ -9,9 +9,7 @@
  * %End-Header%
  */
 #include <stdio.h>
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 #include <unistd.h>
 #include <inttypes.h>
 #include <errno.h>
@@ -23,13 +21,7 @@
 #include <fcntl.h>
 #include <signal.h>
 #include <string.h>
-#ifdef HAVE_GETOPT_H
 #include <getopt.h>
-#else
-extern int getopt(int argc, char * const argv[], const char *optstring);
-extern char *optarg;
-extern int optind;
-#endif
 
 #include "uuid.h"
 #include "uuidd.h"
diff --git a/misc-utils/uuidgen.c b/misc-utils/uuidgen.c
index 54c5773..40b00ff 100644
--- a/misc-utils/uuidgen.c
+++ b/misc-utils/uuidgen.c
@@ -10,16 +10,8 @@
  */
 
 #include <stdio.h>
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-#ifdef HAVE_GETOPT_H
 #include <getopt.h>
-#else
-extern int getopt(int argc, char * const argv[], const char *optstring);
-extern char *optarg;
-extern int optind;
-#endif
 
 #include "uuid.h"
 #include "nls.h"
-- 
2.6.0

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux