From 458e37f68e1836e456e1b6a4e383f53476a0c2f1 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 12 Mar 2007 19:22:52 +0000 Subject: make sure dlsym() properly returns NULL with undefined symbols --- test/dlopen/libundef.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/dlopen/libundef.c (limited to 'test/dlopen/libundef.c') diff --git a/test/dlopen/libundef.c b/test/dlopen/libundef.c new file mode 100644 index 000000000..bf44c3c68 --- /dev/null +++ b/test/dlopen/libundef.c @@ -0,0 +1,15 @@ +#include + +static int global_static = -1; + +int static_test(void) +{ + static int local_static = -2; + + if (global_static != -1) + printf("FAIL: global_static is not -1\n"); + if (local_static != -2) + printf("FAIL: local_static is not -2\n"); + + return (global_static == -1 && local_static == -2); +} -- cgit v1.2.3