Remove.
[gsasl.git] / tests / threadsafety
blob23686f251191797ebd1acda645fb2affd2f0a771
1 #!/bin/sh
3 # Copyright (C) 2004, 2005 Simon Josefsson
5 # This file is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
8 # any later version.
10 # This file is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this file; if not, write to the Free Software Foundation,
17 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 FILES="$@"
20 FILES=${FILES:-$THREADSAFETY_FILES}
22 if test -z "$FILES"; then
23 echo "Usage: $0 [FILE...]"
24 exit 1
27 # http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_09.html
28 UNSAFE="asctime basename catgets crypt ctime dbm_clearerr dbm_close dbm_delete dbm_error dbm_fetch dbm_firstkey dbm_nextkey dbm_open dbm_store dirname dlerror drand48 ecvt encrypt endgrent endpwent endutxent fcvt ftw gcvt getc_unlocked getchar_unlocked getdate getenv getgrent getgrgid getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr getnetbyname getnetent getopt getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid getservbyname getservbyport getservent getutxent getutxid getutxline gmtime hcreate hdestroy hsearch inet_ntoa l64a lgamma lgammaf lgammal localeconv localtime lrand48 mrand48 nftw nl_langinfo ptsname putc_unlocked putchar_unlocked putenv pututxline rand readdir setenv setgrent setkey setpwent setutxent strerror strtok ttyname unsetenv wcstombs wctomb"
30 set -- $UNSAFE
31 cmd="-e [^_0-9a-z]($1"
32 shift
33 while test "$1"; do
34 cmd="${cmd}|$1"
35 shift
36 done
37 cmd="${cmd})[^_0-9a-z]*\("
39 if egrep $cmd $FILES; then
40 exit 1
43 exit 0