[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/win
From: Christian Ehrlicher <Ch.Ehrlicher () gmx ! de>
Date: 2006-03-19 17:11:25
Message-ID: 1142788285.562718.30876.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 520351 by chehrlic:
fix export of optarg / optind
CCMAIL: Ralf.Habacker@freenet.de
M +2 -0 include/mingw/unistd.h
M +2 -0 include/msvc/unistd.h
M +4 -4 src/unistd.c
--- trunk/KDE/kdelibs/win/include/mingw/unistd.h #520350:520351
@@ -135,6 +135,8 @@
KDEWIN32_EXPORT long getpagesize (void);
KDEWIN32_EXPORT int getopt(int argc, char **argv, const char *optstring);
+extern KDEWIN32_EXPORT char *optarg;
+extern KDEWIN32_EXPORT int optind; /*, opterr, optopt */
#ifdef __cplusplus
}
--- trunk/KDE/kdelibs/win/include/msvc/unistd.h #520350:520351
@@ -143,6 +143,8 @@
KDEWIN32_EXPORT long getpagesize(void);
KDEWIN32_EXPORT int getopt(int argc, char **argv, const char *optstring);
+extern KDEWIN32_EXPORT char *optarg;
+extern KDEWIN32_EXPORT int optind; /*, opterr, optopt */
#ifdef __cplusplus
}
--- trunk/KDE/kdelibs/win/src/unistd.c #520350:520351
@@ -329,7 +329,7 @@
/* getpagesize for windows */
//static
-long getpagesize (void)
+KDEWIN32_EXPORT long getpagesize (void)
{
static long g_pagesize = 0;
if (! g_pagesize) {
@@ -364,10 +364,10 @@
//
// CE: from http://www.codeproject.com/cpp/xgetopt.asp
// removed unicode support to compile with mingw
-char *optarg; // global argument pointer
-int optind = 0; // global argv index
+char *optarg = NULL; // global argument pointer
+int optind = 0; // global argv index
-int getopt(int argc, char **argv, const char *optstring)
+KDEWIN32_EXPORT int getopt(int argc, char **argv, const char *optstring)
{
static char *next = NULL;
char c = '?';
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic