Replaced 'ignore' spec file directive by the -i option.
This commit is contained in:
parent
9b1df412f4
commit
2cd4ed2e15
|
@ -125,6 +125,7 @@ static void do_f_flags( const char *arg );
|
|||
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 @@ static const struct option_descr option_table[] =
|
|||
{ "-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 @@ static void do_k_flags( const char *arg )
|
|||
/* 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]))
|
||||
|
|
|
@ -126,24 +126,6 @@ static const char * GetToken( int allow_eof )
|
|||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* 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
|
||||
*
|
||||
|
@ -501,13 +483,7 @@ void ParseTopLevel( FILE *file )
|
|||
|
||||
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" );
|
||||
|
|
|
@ -101,6 +101,12 @@ Win16 modules); default is no local heap.
|
|||
.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 @@ option will also work for Win32 files).
|
|||
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 @@ list of ordinal declarations. The general syntax is the following:
|
|||
.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).
|
||||
|
|
Loading…
Reference in New Issue