libbsd: Branch 'master'

Guillem Jover guillem at kemper.freedesktop.org
Tue Jun 7 17:16:38 PDT 2011


 include/bsd/unistd.h |    2 +-
 src/bsd_getopt.c     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 4a6303ba3b64504ab0077b9cfebd2a4b918d531d
Author: Guillem Jover <guillem at hadrons.org>
Date:   Wed Jun 8 02:10:38 2011 +0200

    Constify bsd_getopt(3) arguments
    
    This matches the standard declaration for getopt(3).

diff --git a/include/bsd/unistd.h b/include/bsd/unistd.h
index 1c4e579..edb0ec5 100644
--- a/include/bsd/unistd.h
+++ b/include/bsd/unistd.h
@@ -49,7 +49,7 @@ extern int optreset;
 #define getopt(argc, argv, optstr) bsd_getopt(argc, argv, optstr)
 #endif
 
-int bsd_getopt(int, char **, char *);
+int bsd_getopt(int argc, char * const argv[], const char *shortopts)
 
 mode_t getmode(const void *set, mode_t mode);
 void *setmode(const char *mode_str);
diff --git a/src/bsd_getopt.c b/src/bsd_getopt.c
index 3e89817..b5bd270 100644
--- a/src/bsd_getopt.c
+++ b/src/bsd_getopt.c
@@ -29,7 +29,7 @@
 int optreset = 0;
 
 int
-bsd_getopt(int argc, char **argv, char *shortopts)
+bsd_getopt(int argc, char * const argv[], const char *shortopts)
 {
 	if (optreset == 1) {
 		optreset = 0;


More information about the libbsd mailing list