Mercurial > libpst
diff src/XGetopt.c @ 118:0f1492b7fe8b
patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
add processing for pst files of type 0x0f
start adding support for properly building and installing libpst.so and the header files required to use it.
remove version.h since the version number is now in config.h
more const correctness issues regarding getopt()
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Sat, 31 Jan 2009 12:12:36 -0800 |
parents | c508ee15dfca |
children | ab2a11e72250 |
line wrap: on
line diff
--- a/src/XGetopt.c Fri Jan 16 15:31:11 2009 -0800 +++ b/src/XGetopt.c Sat Jan 31 12:12:36 2009 -0800 @@ -18,6 +18,8 @@ // /////////////////////////////////////////////////////////////////////////////// +#ifndef __MINGW32__ /* mingw has getopt() */ + #include <stdio.h> #include <string.h> #include "XGetopt.h" @@ -31,7 +33,7 @@ // getopt -- parse command line options // // SYNOPSIS -// int getopt(int argc, char *argv[], char *optstring) +// int getopt(int argc, char* const* argv, const char *optstring) // // extern char *optarg; // extern int optind; @@ -135,9 +137,9 @@ char *optarg; // global argument pointer int optind = 0; // global argv index -int getopt(int argc, char *argv[], char *optstring) +int getopt(int argc, char* const* argv, char *optstring) { - static char *next = NULL; + static char *next = NULL; char c, *cp; if (optind == 0) next = NULL; @@ -197,3 +199,5 @@ return c; } + +#endif /* !__MINGW32__ */