public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Rename __in and __out in headers to avoid collision with Windows APIs
@ 2017-07-07 14:45 Corinna Vinschen
  0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2017-07-07 14:45 UTC (permalink / raw)
  To: cygwin-cvs, newlib-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=bf61b38d984539d63dce809923e4edb7865bf721

commit bf61b38d984539d63dce809923e4edb7865bf721
Author: David Macek <david.macek.0@gmail.com>
Date:   Fri Jul 7 10:47:02 2017 +0200

    Rename __in and __out in headers to avoid collision with Windows APIs
    
    * string.h: Local variables in expansion of strdupa and strndupa
    * sys/wait.h: Fields in anonymous union in expansion of __wait_status_to_int

Diff:
---
 newlib/libc/include/string.h     | 18 +++++++++---------
 winsup/cygwin/include/sys/wait.h |  2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/newlib/libc/include/string.h b/newlib/libc/include/string.h
index 29e0d44..7833aa1 100644
--- a/newlib/libc/include/string.h
+++ b/newlib/libc/include/string.h
@@ -141,16 +141,16 @@ int	 _EXFUN(strverscmp,(const char *, const char *));
 
 #if __GNU_VISIBLE && defined(__GNUC__)
 #define strdupa(__s) \
-	(__extension__ ({const char *__in = (__s); \
-			 size_t __len = strlen (__in) + 1; \
-			 char * __out = (char *) __builtin_alloca (__len); \
-			 (char *) memcpy (__out, __in, __len);}))
+	(__extension__ ({const char *__sin = (__s); \
+			 size_t __len = strlen (__sin) + 1; \
+			 char * __sout = (char *) __builtin_alloca (__len); \
+			 (char *) memcpy (__sout, __sin, __len);}))
 #define strndupa(__s, __n) \
-	(__extension__ ({const char *__in = (__s); \
-			 size_t __len = strnlen (__in, (__n)) + 1; \
-			 char *__out = (char *) __builtin_alloca (__len); \
-			 __out[__len-1] = '\0'; \
-			 (char *) memcpy (__out, __in, __len-1);}))
+	(__extension__ ({const char *__sin = (__s); \
+			 size_t __len = strnlen (__sin, (__n)) + 1; \
+			 char *__sout = (char *) __builtin_alloca (__len); \
+			 __sout[__len-1] = '\0'; \
+			 (char *) memcpy (__sout, __sin, __len-1);}))
 #endif /* __GNU_VISIBLE && __GNUC__ */
 
 /* There are two common basename variants.  If you do NOT #include <libgen.h>
diff --git a/winsup/cygwin/include/sys/wait.h b/winsup/cygwin/include/sys/wait.h
index 69e1b9d..dc89458 100644
--- a/winsup/cygwin/include/sys/wait.h
+++ b/winsup/cygwin/include/sys/wait.h
@@ -88,7 +88,7 @@ inline int __wait_status_to_int (const union wait & __status)
 #else /* !__cplusplus */
 
 #define __wait_status_to_int(__status)  (__extension__ \
-  (((union { __typeof(__status) __in; int __out; }) { .__in = (__status) }).__out))
+  (((union { __typeof(__status) __sin; int __sout; }) { .__sin = (__status) }).__sout))
 
 #endif /* __cplusplus */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-07-07 14:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-07 14:45 [newlib-cygwin] Rename __in and __out in headers to avoid collision with Windows APIs Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).