// { dg-require-sharedlib "" }
-// { dg-options "-g -O2 -pthread -ldl -x c" { target *-*-linux* } }
+// { dg-skip-if "invalid options for C" { *-*-* } { "-std=c++??" "-std=gnu++??" } }
+// { dg-options "-g -O2 -pthread -ldl -x c -fvtable-verify=none -Wno-pedantic" { target *-*-linux* *-*-gnu* *-*-solaris2.1[2-9]* } }
-// Copyright (C) 2005, 2009 Free Software Foundation, Inc.
+// Copyright (C) 2005-2021 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
void (*cb)();
lib = dlopen("./testsuite_shared.so", RTLD_NOW);
- if (lib == NULL)
+ if (!lib)
{
printf("dlopen failed: %s\n", strerror(errno));
- return NULL;
+ return 0;
}
cb = (function_type) dlsym(lib, "try_throw_exception");
- if (cb == NULL)
+ if (!cb)
{
printf("dlsym failed: %s\n", strerror(errno));
- return NULL;
+ return 0;
}
cb();
dlclose(lib);
- return NULL;
+ return 0;
}
// libstdc++/23591
{
pthread_t pt;
- if (pthread_create(&pt, NULL, &run, NULL) != 0)
+ if (pthread_create(&pt, 0, &run, 0) != 0)
return 1;
- if (pthread_join(pt, NULL) != 0)
+ if (pthread_join(pt, 0) != 0)
return 1;
return 0;