OSDN Git Service

Include, and make <sys/bsdtypes.h> test suite safe.
authorKeith Marshall <keithmarshall@users.sourceforge.net>
Wed, 25 Oct 2017 14:45:18 +0000 (15:45 +0100)
committerKeith Marshall <keithmarshall@users.sourceforge.net>
Wed, 25 Oct 2017 14:45:18 +0000 (15:45 +0100)
mingwrt/ChangeLog
mingwrt/include/sys/bsdtypes.h

index 9886e4c..1fed35f 100644 (file)
@@ -1,3 +1,13 @@
+2017-10-25  Keith Marshall  <keithmarshall@users.sourceforge.net>
+
+       Include, and make <sys/bsdtypes.h> test suite safe.
+
+       * tests/headers.at (sys/bsdtypes.h): Add reference.
+
+       * include/sys/bsdtypes.h [__IN_MINGWRT_TESTSUITE__]: Add to...
+       [_BSD_SOURCE || _WINSOCK2_H]: ...these, as conditions for supression
+       of "ill-advised usage" warning message.
+
 2017-09-15  Keith Marshall  <keithmarshall@users.sourceforge.net>
 
        Factor <sys/time.h> duplicate content out of winsock headers.
index 44d1a3a..37a94a3 100644 (file)
@@ -5,7 +5,7 @@
  * and adopted by the Windows sockets implementation; users are advised
  * to avoid using these data types, and use standard types instead.
  *
- * $Id$
+ * $Id: bsdtypes.h,v 54917a4a822e 2017/10/25 14:32:38 keithmarshall $
  *
  * Abstracted from MinGW.org's WinSock implementation
  * Copyright (C) 2017, MinGW.org Project
  */
 #include <_mingw.h>
 
-#if ! (defined _BSD_SOURCE || defined _WINSOCK_H)
-/* Users are STRONGLY recommended to avoid using the non-standard BSD
- * data types defined herein, unless compiling code which proclaims its
- * _BSD_SOURCE heritage, or which uses the Windows Sockets API, (which
- * has ill-advisedly adopted them).
- */
-#warning "Use of non-standard BSD type definitions is ill-advised."
+#if ! __IN_MINGWRT_TESTSUITE__ \
+ && ! (defined _BSD_SOURCE || defined _WINSOCK_H)
+ /* Users are STRONGLY recommended to avoid using the non-standard BSD
+  * data types defined herein, unless compiling code which proclaims its
+  * _BSD_SOURCE heritage, or which uses the Windows Sockets API, (which
+  * has ill-advisedly adopted them).
+  */
+# warning "Use of non-standard BSD type definitions is ill-advised."
 #endif
 
 /* Use "unsigned foo" instead of these "u_foo" shorthand aliases.
@@ -62,4 +63,4 @@ typedef unsigned long u_long;
 
 #define _BSDTYPES_DEFINED
 #endif /* !_BSDTYPES_DEFINED */
-#endif /* _SYS_BSDTYPES_H: $RCSfile$: end of file */
+#endif /* _SYS_BSDTYPES_H: $RCSfile: bsdtypes.h,v $: end of file */