Commit 450f0fa6 authored by Alexandre Julliard's avatar Alexandre Julliard

winebuild: Don't import standard C functions in Unix mode.

parent 5061261c
......@@ -38,6 +38,8 @@
#define min(a,b) (((a) < (b)) ? (a) : (b))
#endif
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
typedef enum
{
TYPE_VARIABLE, /* variable */
......
......@@ -38,6 +38,93 @@
#include "wine/list.h"
#include "build.h"
/* standard C functions that are also exported from ntdll */
static const char *stdc_names[] =
{
"abs",
"atan",
"atoi",
"atol",
"bsearch",
"ceil",
"cos",
"fabs",
"floor",
"isalnum",
"isalpha",
"iscntrl",
"isdigit",
"isgraph",
"islower",
"isprint",
"ispunct",
"isspace",
"isupper",
"iswalpha",
"iswctype",
"iswdigit",
"iswlower",
"iswspace",
"iswxdigit",
"isxdigit",
"labs",
"log",
"mbstowcs",
"memchr",
"memcmp",
"memcpy",
"memmove",
"memset",
"pow",
"qsort",
"sin",
"sprintf",
"sqrt",
"sscanf",
"strcat",
"strchr",
"strcmp",
"strcpy",
"strcspn",
"strlen",
"strncat",
"strncmp",
"strncpy",
"strnlen",
"strpbrk",
"strrchr",
"strspn",
"strstr",
"strtol",
"strtoul",
"swprintf",
"tan",
"tolower",
"toupper",
"towlower",
"towupper",
"vsprintf",
"wcscat",
"wcschr",
"wcscmp",
"wcscpy",
"wcscspn",
"wcslen",
"wcsncat",
"wcsncmp",
"wcsncpy",
"wcspbrk",
"wcsrchr",
"wcsspn",
"wcsstr",
"wcstok",
"wcstol",
"wcstombs",
"wcstoul"
};
static struct strarray stdc_functions = { stdc_names, ARRAY_SIZE(stdc_names), ARRAY_SIZE(stdc_names) };
struct import_func
{
const char *name;
......@@ -566,7 +653,8 @@ void read_undef_symbols( DLLSPEC *spec, char **argv )
add_undef_import( p + strlen( import_func_prefix ), 0 );
else if (!strncmp( p, import_ord_prefix, strlen(import_ord_prefix) ))
add_undef_import( p + strlen( import_ord_prefix ), 1 );
else strarray_add( &undef_symbols, xstrdup( p ), NULL );
else if (!unix_lib || !find_name( p, &stdc_functions ))
strarray_add( &undef_symbols, xstrdup( p ), NULL );
}
if ((err = pclose( f ))) warning( "%s failed with status %d\n", cmd, err );
free( cmd );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment