Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Smith <dannysmith@users.sourceforge.net>2004-02-21 10:21:36 +0300
committerDanny Smith <dannysmith@users.sourceforge.net>2004-02-21 10:21:36 +0300
commit53a207edfa5b20949da5f6e89819950f54a80867 (patch)
tree54f54b6b8d39a9e52bdb690099c910688f617fdb
parent7c03f79971ed1e8ab3ad8818747444b60ed8cd38 (diff)
* include/_mingw.h (__UNUSED_PARAM): Define macro.
* include/wchar.h (fwide): Use it. (mbsinit): Ditto.
-rw-r--r--winsup/mingw/ChangeLog6
-rw-r--r--winsup/mingw/include/_mingw.h10
-rw-r--r--winsup/mingw/include/wchar.h6
3 files changed, 20 insertions, 2 deletions
diff --git a/winsup/mingw/ChangeLog b/winsup/mingw/ChangeLog
index b71b46ded..93f839880 100644
--- a/winsup/mingw/ChangeLog
+++ b/winsup/mingw/ChangeLog
@@ -1,3 +1,9 @@
+2004-02-21 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * include/_mingw.h (__UNUSED_PARAM): Define macro.
+ * include/wchar.h (fwide): Use it.
+ (mbsinit): Ditto.
+
2004-02-05 Danny Smith <dannysmith@users.sourceforge.net>
* mingwex/getopt.c: Define IS_POSIXLY_CORRECT as per
diff --git a/winsup/mingw/include/_mingw.h b/winsup/mingw/include/_mingw.h
index c5cbb4cc0..d606aa1db 100644
--- a/winsup/mingw/include/_mingw.h
+++ b/winsup/mingw/include/_mingw.h
@@ -107,6 +107,16 @@
#define __CRT_INLINE extern __inline__
#endif
+#ifdef __cplusplus
+# define __UNUSED_PARAM(x)
+#else
+# ifdef __GNUC__
+# define __UNUSED_PARAM(x) x __attribute__((unused))
+# else
+# define __UNUSED_PARAM(x) x
+# endif
+#endif
+
#define __MINGW32_VERSION 4.0
#define __MINGW32_MAJOR_VERSION 4
#define __MINGW32_MINOR_VERSION 0
diff --git a/winsup/mingw/include/wchar.h b/winsup/mingw/include/wchar.h
index 1543678c6..d4367c5de 100644
--- a/winsup/mingw/include/wchar.h
+++ b/winsup/mingw/include/wchar.h
@@ -298,8 +298,10 @@ size_t __cdecl wcsrtombs(char *, const wchar_t **, size_t, mbstate_t *);
int __cdecl wctob(wint_t);
#ifndef __NO_ISOCEXT /* these need static lib libmingwex.a */
-__CRT_INLINE int __cdecl fwide(FILE* stream, int mode) {return -1;} /* limited to byte orientation */
-__CRT_INLINE int __cdecl mbsinit(const mbstate_t* ps) {return 1;}
+__CRT_INLINE int __cdecl fwide(FILE* __UNUSED_PARAM(stream), int __UNUSED_PARAM(mode))
+ {return -1;} /* limited to byte orientation */
+__CRT_INLINE int __cdecl mbsinit(const mbstate_t* __UNUSED_PARAM(ps))
+ {return 1;}
wchar_t* __cdecl wmemset(wchar_t* s, wchar_t c, size_t n);
wchar_t* __cdecl wmemchr(const wchar_t* s, wchar_t c, size_t n);
int wmemcmp(const wchar_t* s1, const wchar_t * s2, size_t n);