Replaced 'ignore' spec file directive by the -i option.
diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c
index 2a8f34a..dcfaadd 100644
--- a/tools/winebuild/main.c
+++ b/tools/winebuild/main.c
@@ -125,6 +125,7 @@
static void do_define( const char *arg );
static void do_include( const char *arg );
static void do_k_flags( const char *arg );
+static void do_ignore( const char *arg );
static void do_exe_mode( const char *arg );
static void do_module( const char *arg );
static void do_heap( const char *arg );
@@ -152,6 +153,7 @@
{ "-D", 1, do_define, "-D sym Ignored for C flags compatibility" },
{ "-I", 1, do_include, "-I dir Ignored for C flags compatibility" },
{ "-K", 1, do_k_flags, "-K flags Compiler flags (only -KPIC is supported)" },
+ { "-i", 1, do_ignore, "-i sym[,sym] Ignore specified symbols when resolving imports" },
{ "-m", 1, do_exe_mode,"-m mode Set the executable mode (cui|gui|cuiw|guiw)" },
{ "-M", 1, do_module, "-M module Set the name of the main (Win32) module for a Win16 dll" },
{ "-L", 1, do_lib, "-L directory Look for imports libraries in 'directory'" },
@@ -229,6 +231,18 @@
/* ignore all other flags */
}
+static void do_ignore( const char *arg )
+{
+ char *str = xstrdup( arg );
+ char *token = strtok( str, "," );
+ while (token)
+ {
+ add_ignore_symbol( token );
+ token = strtok( NULL, "," );
+ }
+ free( str );
+}
+
static void do_heap( const char *arg )
{
if (!isdigit(arg[0]))
diff --git a/tools/winebuild/parser.c b/tools/winebuild/parser.c
index 44690df..59bbaee 100644
--- a/tools/winebuild/parser.c
+++ b/tools/winebuild/parser.c
@@ -127,24 +127,6 @@
/*******************************************************************
- * ParseIgnore
- *
- * Parse an 'ignore' definition.
- */
-static void ParseIgnore(void)
-{
- const char *token = GetToken(0);
- if (*token != '(') fatal_error( "Expected '(' got '%s'\n", token );
- for (;;)
- {
- token = GetToken(0);
- if (*token == ')') break;
- add_ignore_symbol( token );
- }
-}
-
-
-/*******************************************************************
* ParseVariable
*
* Parse a variable definition.
@@ -501,13 +483,7 @@
while ((token = GetToken(1)) != NULL)
{
- if (strcmp(token, "ignore") == 0)
- {
- if (SpecType != SPEC_WIN32)
- fatal_error( "'ignore' only supported for Win32 spec files\n" );
- ParseIgnore();
- }
- else if (strcmp(token, "@") == 0)
+ if (strcmp(token, "@") == 0)
{
if (SpecType != SPEC_WIN32)
fatal_error( "'@' ordinals not supported for Win16\n" );
diff --git a/tools/winebuild/winebuild.man.in b/tools/winebuild/winebuild.man.in
index baa3112..0218fe7 100644
--- a/tools/winebuild/winebuild.man.in
+++ b/tools/winebuild/winebuild.man.in
@@ -101,6 +101,12 @@
.BI \-I\ directory
Ignored for compatibility with the C compiler.
.TP
+.BI \-i\ symbol[,symbol]
+Specify a list of symbols that should be ignored when resolving
+undefined symbols against the imported libraries. This forces these
+symbols to be resolved from the Unix C library (or from another Unix
+library linked with the application).
+.TP
.BI \-K\ flags
Ignored for compatibility with the C compiler.
.TP
@@ -171,12 +177,8 @@
Turn on warnings.
.SH "SPEC FILE SYNTAX"
.SS "General syntax"
-A spec file should contain a number of optional directives, and then a
-list of ordinal declarations. The general syntax is the following:
-.PP
-.RB [ ignore\ (\ [ \fIsymbols...\fR ]\ )\ ]
-.br
-.BI #\ comments
+A spec file should contain a list of ordinal declarations. The general
+syntax is the following:
.PP
.I ordinal functype
.RI [ flags ]\ exportname \ \fB(\fR\ [ args... ] \ \fB)\fI\ handler
@@ -195,15 +197,13 @@
.br
.IB ordinal\ forward
.RI [ flags ]\ exportname\ forwardname
-.SS "Optional directives"
-.B ignore
-specifies a list of symbols that should be ignored when
-resolving undefined symbols against the imported libraries.
+.br
+.BI #\ comments
.PP
Lines whose first character is a
.B #
will be ignored as comments.
-.SS "Ordinal specifications"
+.PP
.I ordinal
specifies the ordinal number corresponding to the entry point, or '@'
for automatic ordinal allocation (Win32 only).