tests: add test for bogus NULL definition
authorEric Blake <ebb9@byu.net>
Fri, 26 Jun 2009 14:00:28 +0000 (08:00 -0600)
committerEric Blake <ebb9@byu.net>
Sat, 27 Jun 2009 21:17:06 +0000 (15:17 -0600)
* tests/test-stdio.c: Ensure POSIX 2008 requirement on NULL.
* tests/test-stdlib.c: Likewise.
* tests/test-string.c: Likewise.
* tests/test-locale.c: Likewise.
* tests/test-unistd.c: Likewise.
* modules/stdio-tests (Depends-on): Add verify.
* modules/stdlib-tests (Depends-on): Likewise.
* modules/string-tests (Depends-on): Likewise.
* modules/locale-tests (Depends-on): Likewise.
* modules/unistd-tests (Depends-on): Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
modules/locale-tests
modules/stdio-tests
modules/stdlib-tests
modules/string-tests
modules/unistd-tests
tests/test-locale.c
tests/test-stdio.c
tests/test-stdlib.c
tests/test-string.c
tests/test-unistd.c

index 76029c773c7adb5b5cd78e099038872745750058..c146e8cfdd5e9386524d6c81439fb9e64bcd2f58 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2009-06-27  Eric Blake  <ebb9@byu.net>
+
+       tests: add test for bogus NULL definition
+       * tests/test-stdio.c: Ensure POSIX 2008 requirement on NULL.
+       * tests/test-stdlib.c: Likewise.
+       * tests/test-string.c: Likewise.
+       * tests/test-locale.c: Likewise.
+       * tests/test-unistd.c: Likewise.
+       * modules/stdio-tests (Depends-on): Add verify.
+       * modules/stdlib-tests (Depends-on): Likewise.
+       * modules/string-tests (Depends-on): Likewise.
+       * modules/locale-tests (Depends-on): Likewise.
+       * modules/unistd-tests (Depends-on): Likewise.
+
 2009-06-27  Paolo Bonzini  <bonzini@gnu.org>
 
        * m4/selinux-context-h (gl_HEADERS_SELINUX_CONTEXT_H): Remove
index 3a5fa87059d19d33b330225519f3f29a512027bd..19bc373cb9c62b29558895b904ba0bb51c9cde0b 100644 (file)
@@ -2,6 +2,7 @@ Files:
 tests/test-locale.c
 
 Depends-on:
+verify
 
 configure.ac:
 
index cc0f14ec249c904f468f07b9238b893927cd4240..c572bfb4cd811cccb0eb7c6b80e3613bf0f5593c 100644 (file)
@@ -2,6 +2,7 @@ Files:
 tests/test-stdio.c
 
 Depends-on:
+verify
 
 configure.ac:
 
index 8a5a78fa5fcc9d7424cde984b876680911f5ef5b..3503511efe9a92c69aae221a8bdd0edf7802f233 100644 (file)
@@ -2,6 +2,7 @@ Files:
 tests/test-stdlib.c
 
 Depends-on:
+verify
 
 configure.ac:
 
index 67d08bb5e2ce41d02e1d73f5c9003c37f0a6b834..ab8699a71b2b2447fbe03ef0dd94ccefa1257595 100644 (file)
@@ -2,6 +2,7 @@ Files:
 tests/test-string.c
 
 Depends-on:
+verify
 
 configure.ac:
 
index 703d5572cd500a955f9fe4671541d69a24703532..7f9d44da86bd19e41088b7d5b5fcbe4c1401fa18 100644 (file)
@@ -2,6 +2,7 @@ Files:
 tests/test-unistd.c
 
 Depends-on:
+verify
 
 configure.ac:
 
index 39e7de9d71cacb378b5041093b5c655ddbfd91c8..625cc43d8446c3c6c1bd4bf0e4c57a4371417446 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <locale.h> substitute.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -20,6 +20,8 @@
 
 #include <locale.h>
 
+#include "verify.h"
+
 int a[] =
   {
     LC_ALL,
@@ -31,6 +33,10 @@ int a[] =
     LC_TIME
   };
 
+/* Check that NULL can be passed through varargs as a pointer type,
+   per POSIX 2008.  */
+verify (sizeof NULL == sizeof (void *));
+
 int
 main ()
 {
index a5efa320ba2d3391cc00e84d45597522e5449437..dcfe38dd515cf365fc8c55fbf19ed17177fa23d5 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <stdio.h> substitute.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include <stdio.h>
 
+#include "verify.h"
+
 /* Check that the various SEEK_* macros are defined.  */
 int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET };
 
+/* Check that NULL can be passed through varargs as a pointer type,
+   per POSIX 2008.  */
+verify (sizeof NULL == sizeof (void *));
+
 int
 main ()
 {
index e103d46b2036b753de4cb03a4af6075137721238..ae46ba16625479aeb9022489162bee441a57433b 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <stdlib.h> substitute.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include <stdlib.h>
 
+#include "verify.h"
+
 int exitcode;
 
+/* Check that NULL can be passed through varargs as a pointer type,
+   per POSIX 2008.  */
+verify (sizeof NULL == sizeof (void *));
+
 int
 main ()
 {
index 68014f54c8e431a7b99e8973df182121e026849a..fe53cd9b152a584e9559ff43b55a38106416dcad 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of <string.h> substitute.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
 #include <string.h>
 
+#include "verify.h"
+
+/* Check that NULL can be passed through varargs as a pointer type,
+   per POSIX 2008.  */
+verify (sizeof NULL == sizeof (void *));
+
 int
 main ()
 {
index 5fed15cf9fd8fdcc50b4ad7bb63ceef4d9b94cac..129367b4d7df989e1f31d1035e9ddc444d8a3169 100644 (file)
 
 #include <unistd.h>
 
+#include "verify.h"
+
+/* Check that NULL can be passed through varargs as a pointer type,
+   per POSIX 2008.  */
+verify (sizeof NULL == sizeof (void *));
+
 /* Check that the various SEEK_* macros are defined.  */
 int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET };