From 89ebc290810d59423341c30c096a36ef5b69ff83 Mon Sep 17 00:00:00 2001 From: stansmith Date: Mon, 26 Jan 2009 20:55:43 +0000 Subject: [PATCH] [ETC] make ibdiags src happy by adding const attribute to getopt defines. git-svn-id: svn://openib.tc.cornell.edu/gen1@1887 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- trunk/etc/user/getopt.c | 6 +++--- trunk/inc/user/getopt.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/trunk/etc/user/getopt.c b/trunk/etc/user/getopt.c index 39c30cb0..c8afc56d 100644 --- a/trunk/etc/user/getopt.c +++ b/trunk/etc/user/getopt.c @@ -39,7 +39,7 @@ int optind = 1; int opterr = 1; int optopt = '?'; -int getopt(int argc, char **argv, char *opts) +int getopt(int argc, char **argv, char const *opts) { char *loc; @@ -88,8 +88,8 @@ out: return optopt; } -int getopt_long(int argc, char **argv, char *opts, - struct option *longopts, int *longindex) +int getopt_long(int argc, char **argv, char const *opts, + const struct option *longopts, int *longindex) { char arg[256]; char *str; diff --git a/trunk/inc/user/getopt.h b/trunk/inc/user/getopt.h index 2255a661..b4224748 100644 --- a/trunk/inc/user/getopt.h +++ b/trunk/inc/user/getopt.h @@ -51,8 +51,8 @@ enum optional_argument }; -extern int getopt(int argc, char **argv, char *opts); -extern int getopt_long(int argc, char **argv, char *opts, - struct option *longopts, int *longindex); +extern int getopt(int argc, char **argv, char const *opts); +extern int getopt_long(int argc, char **argv, char const *opts, + const struct option *longopts, int *longindex); #endif -- 2.46.0