Author: matt
Date: 2012-07-27 05:22:58 -0700 (Fri, 27 Jul 2012)
New Revision: 9646
Log:
Fixed VisualC build issue which I recently introduced
Modified:
branches/branch-3.0/include/fltk/flstring.h
branches/branch-3.0/src/fltk3/flstring.c
branches/branch-3.0/src/fltk3/flstring.h
Modified: branches/branch-3.0/include/fltk/flstring.h
===================================================================
--- branches/branch-3.0/include/fltk/flstring.h 2012-07-26 00:40:37 UTC (rev
9645)
+++ branches/branch-3.0/include/fltk/flstring.h 2012-07-27 12:22:58 UTC (rev
9646)
@@ -50,8 +50,8 @@
/* Windows has equivalent functions, but being Microsoft they added
gratuitoius changes to the names to stop code from being portable: */
#if (defined(_WIN32) && !defined(__CYGWIN__)) || defined(__EMX__)
-inline int strcasecmp(const char *s, const char *t) { return _stricmp(s, t); }
-inline int strncasecmp(const char *s, const char *t, int n) { return
_strnicmp(s, t, n); }
+extern int strcasecmp(const char *s, const char *t);
+extern int strncasecmp(const char *s, const char *t, int n);
# define vsnprintf _vsnprintf
# define snprintf _snprintf
#endif
Modified: branches/branch-3.0/src/fltk3/flstring.c
===================================================================
--- branches/branch-3.0/src/fltk3/flstring.c 2012-07-26 00:40:37 UTC (rev
9645)
+++ branches/branch-3.0/src/fltk3/flstring.c 2012-07-27 12:22:58 UTC (rev
9646)
@@ -27,6 +27,16 @@
#include "flstring.h"
+#if defined(WIN32) && !defined(__CYGWIN__)
+#ifdef __cplusplus
+extern "C" {
+#endif
+int strcasecmp(const char *s, const char *t) { return _stricmp(s, t); }
+int strncasecmp(const char *s, const char *t, int n) { return _strnicmp(s, t,
n); }
+#ifdef __cplusplus
+}
+#endif
+#endif
/*
* 'fl_strlcat()' - Safely concatenate two strings.
Modified: branches/branch-3.0/src/fltk3/flstring.h
===================================================================
--- branches/branch-3.0/src/fltk3/flstring.h 2012-07-26 00:40:37 UTC (rev
9645)
+++ branches/branch-3.0/src/fltk3/flstring.h 2012-07-27 12:22:58 UTC (rev
9646)
@@ -49,8 +49,14 @@
# endif /* index */
# if defined(WIN32) && !defined(__CYGWIN__)
-# define strcasecmp(s,t) _stricmp((s), (t))
-# define strncasecmp(s,t,n) _strnicmp((s), (t), (n))
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern int strcasecmp(const char *s, const char *t);
+extern int strncasecmp(const char *s, const char *t, int n);
+#ifdef __cplusplus
+}
+#endif
/* Visual C++ 2005 incorrectly displays a warning about the use of POSIX APIs
* on Windows, which is supposed to be POSIX compliant... Some of these
* functions are also defined in ISO C99...
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit