summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog14
-rw-r--r--modules/locale-tests1
-rw-r--r--modules/stdio-tests1
-rw-r--r--modules/stdlib-tests1
-rw-r--r--modules/string-tests1
-rw-r--r--modules/unistd-tests1
-rw-r--r--tests/test-locale.c8
-rw-r--r--tests/test-stdio.c8
-rw-r--r--tests/test-stdlib.c8
-rw-r--r--tests/test-string.c8
-rw-r--r--tests/test-unistd.c6
11 files changed, 53 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 76029c773c..c146e8cfdd 100644
--- 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
diff --git a/modules/locale-tests b/modules/locale-tests
index 3a5fa87059..19bc373cb9 100644
--- a/modules/locale-tests
+++ b/modules/locale-tests
@@ -2,6 +2,7 @@ Files:
tests/test-locale.c
Depends-on:
+verify
configure.ac:
diff --git a/modules/stdio-tests b/modules/stdio-tests
index cc0f14ec24..c572bfb4cd 100644
--- a/modules/stdio-tests
+++ b/modules/stdio-tests
@@ -2,6 +2,7 @@ Files:
tests/test-stdio.c
Depends-on:
+verify
configure.ac:
diff --git a/modules/stdlib-tests b/modules/stdlib-tests
index 8a5a78fa5f..3503511efe 100644
--- a/modules/stdlib-tests
+++ b/modules/stdlib-tests
@@ -2,6 +2,7 @@ Files:
tests/test-stdlib.c
Depends-on:
+verify
configure.ac:
diff --git a/modules/string-tests b/modules/string-tests
index 67d08bb5e2..ab8699a71b 100644
--- a/modules/string-tests
+++ b/modules/string-tests
@@ -2,6 +2,7 @@ Files:
tests/test-string.c
Depends-on:
+verify
configure.ac:
diff --git a/modules/unistd-tests b/modules/unistd-tests
index 703d5572cd..7f9d44da86 100644
--- a/modules/unistd-tests
+++ b/modules/unistd-tests
@@ -2,6 +2,7 @@ Files:
tests/test-unistd.c
Depends-on:
+verify
configure.ac:
diff --git a/tests/test-locale.c b/tests/test-locale.c
index 39e7de9d71..625cc43d84 100644
--- a/tests/test-locale.c
+++ b/tests/test-locale.c
@@ -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 ()
{
diff --git a/tests/test-stdio.c b/tests/test-stdio.c
index a5efa320ba..dcfe38dd51 100644
--- a/tests/test-stdio.c
+++ b/tests/test-stdio.c
@@ -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
@@ -20,9 +20,15 @@
#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 ()
{
diff --git a/tests/test-stdlib.c b/tests/test-stdlib.c
index e103d46b20..ae46ba1662 100644
--- a/tests/test-stdlib.c
+++ b/tests/test-stdlib.c
@@ -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
@@ -20,8 +20,14 @@
#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 ()
{
diff --git a/tests/test-string.c b/tests/test-string.c
index 68014f54c8..fe53cd9b15 100644
--- a/tests/test-string.c
+++ b/tests/test-string.c
@@ -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
@@ -20,6 +20,12 @@
#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 ()
{
diff --git a/tests/test-unistd.c b/tests/test-unistd.c
index 5fed15cf9f..129367b4d7 100644
--- a/tests/test-unistd.c
+++ b/tests/test-unistd.c
@@ -20,6 +20,12 @@
#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 };