Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
eb559363
Commit
eb559363
authored
Jun 28, 2001
by
Bruce Korb
Committed by
Bruce Korb
Jun 28, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inline pow fix/PTHREAD_*_INITIALIZER for Solaris/UW7 Byteorder.h search problem
From-SVN: r43623
parent
f60b945b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
115 additions
and
36 deletions
+115
-36
gcc/ChangeLog
+10
-0
gcc/fixinc/fixincl.x
+71
-24
gcc/fixinc/inclhack.def
+34
-12
No files found.
gcc/ChangeLog
View file @
eb559363
2001
-
06
-
27
Bruce
Korb
<
bkorb
@gnu
.
org
>
*
fixinc
/
inclhack
.
def
(
hpux11_cpp_pow_inline
)
:
new
,
but
real
similar
to
hpux10_cpp_pow_inline
.
Not
similar
enough
.
(
solaris_mutex_init
)
:
renamed
.
PTHREAD_
*
_INITIALIZER
is
a
problem
for
all
Solaris
versions
.
This
fix
patches
MUTEX
and
COND
initializers
,
the
RWLOCK
one
will
wait
for
someone
to
complain
.
For
now
,
anyway
.
(
uw7_byteorder_fix
)
:
It
was
looking
for
the
byteorder
.
h
file
in
the
wrong
directory
.
2001
-
06
-
27
Stan
Shebs
<
shebs
@apple
.
com
>
*
objc
/
objc
-
act
.
c
(
handle_impent
)
:
Rewrite
to
be
more
portable
...
...
gcc/fixinc/fixincl.x
View file @
eb559363
...
...
@@ -5,7 +5,7 @@
* files which are fixed to work correctly with ANSI C and placed in a
* directory that GNU C will search.
*
* This file contains 14
0
fixup descriptions.
* This file contains 14
1
fixup descriptions.
*
* See README for more information.
*
...
...
@@ -1987,6 +1987,43 @@ static const char* apzHpux10_Cpp_Pow_InlinePatch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Hpux11_Cpp_Pow_Inline fix
*/
tSCC zHpux11_Cpp_Pow_InlineName[] =
"hpux11_cpp_pow_inline";
/*
* File name selection pattern
*/
tSCC zHpux11_Cpp_Pow_InlineList[] =
"|math.h|";
/*
* Machine/OS name selection pattern
*/
#define apzHpux11_Cpp_Pow_InlineMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zHpux11_Cpp_Pow_InlineSelect0[] =
" +inline double pow\\(double d,int expon\\) {\n\
+return pow\\(d, \\(double\\)expon\\);\n\
+}\n";
#define HPUX11_CPP_POW_INLINE_TEST_CT 1
static tTestDesc aHpux11_Cpp_Pow_InlineTests[] = {
{ TT_EGREP, zHpux11_Cpp_Pow_InlineSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Hpux11_Cpp_Pow_Inline
*/
static const char* apzHpux11_Cpp_Pow_InlinePatch[] = {
"format",
"",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Hpux11_Fabsf fix
*/
tSCC zHpux11_FabsfName[] =
...
...
@@ -3702,38 +3739,42 @@ static const char* apzSco_UtimePatch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Solaris
27
_Mutex_Init fix
* Description of Solaris_Mutex_Init fix
*/
tSCC zSolaris
27
_Mutex_InitName[] =
"solaris
27
_mutex_init";
tSCC zSolaris_Mutex_InitName[] =
"solaris_mutex_init";
/*
* File name selection pattern
*/
tSCC zSolaris
27
_Mutex_InitList[] =
tSCC zSolaris_Mutex_InitList[] =
"|pthread.h|";
/*
* Machine/OS name selection pattern
*/
#define apzSolaris
27
_Mutex_InitMachs (const char**)NULL
#define apzSolaris_Mutex_InitMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zSolaris
27
_Mutex_InitSelect0[] =
"@\\(#\\)pthread.h[ \t]+1.
26[ \t]+98/04/12
SMI";
tSCC zSolaris_Mutex_InitSelect0[] =
"@\\(#\\)pthread.h[ \t]+1.
[0-9]+[ \t]+[0-9/]+
SMI";
#define SOLARIS
27
_MUTEX_INIT_TEST_CT 1
static tTestDesc aSolaris
27
_Mutex_InitTests[] = {
{ TT_EGREP, zSolaris
27
_Mutex_InitSelect0, (regex_t*)NULL }, };
#define SOLARIS_MUTEX_INIT_TEST_CT 1
static tTestDesc aSolaris_Mutex_InitTests[] = {
{ TT_EGREP, zSolaris_Mutex_InitSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Solaris
27
_Mutex_Init
* Fix Command Arguments for Solaris_Mutex_Init
*/
static const char* apzSolaris
27
_Mutex_InitPatch[] = {
static const char* apzSolaris_Mutex_InitPatch[] = {
"format",
"%1, {0}}",
"(define[ \t]+PTHREAD_MUTEX_INITIALIZER.*),[ \t]*0}$",
"#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)\n\
%0\n\
#else\n\
%1, {0}}%3\n\
#endif",
"(^#define[ \t]+PTHREAD_(MUTEX|COND)_INITIALIZER[ \t]+{.*),[ \t]*0}(|[ \t].*)$",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
...
...
@@ -5028,7 +5069,7 @@ tSCC zUw7_Byteorder_FixSelect0[] =
* perform the 'test' shell command - do fix on success
*/
tSCC zUw7_Byteorder_FixTest0[] =
"-f
$DESTDIR/
sys/byteorder.h";
"-f sys/byteorder.h";
#define UW7_BYTEORDER_FIX_TEST_CT 2
static tTestDesc aUw7_Byteorder_FixTests[] = {
...
...
@@ -5041,7 +5082,7 @@ static tTestDesc aUw7_Byteorder_FixTests[] = {
static const char* apzUw7_Byteorder_FixPatch[] = {
"format",
"",
"^extern.*
(htons|ntohs).*\\(in_port_t\\).*\n
",
"^extern.*
[ \t](htons|ntohs).*\\(in_port_t\\).*;
",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
...
...
@@ -5466,9 +5507,9 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
#define REGEX_COUNT 14
7
#define REGEX_COUNT 14
8
#define MACH_LIST_SIZE_LIMIT 279
#define FIX_COUNT 14
0
#define FIX_COUNT 14
1
/*
* Enumerate the fixes
...
...
@@ -5523,6 +5564,7 @@ typedef enum {
HP_INLINE_FIXIDX,
HP_SYSFILE_FIXIDX,
HPUX10_CPP_POW_INLINE_FIXIDX,
HPUX11_CPP_POW_INLINE_FIXIDX,
HPUX11_FABSF_FIXIDX,
HPUX11_UINT32_C_FIXIDX,
HPUX8_BOGUS_INLINES_FIXIDX,
...
...
@@ -5568,7 +5610,7 @@ typedef enum {
RS6000_PARAM_FIXIDX,
SCO_STATIC_FUNC_FIXIDX,
SCO_UTIME_FIXIDX,
SOLARIS
27
_MUTEX_INIT_FIXIDX,
SOLARIS_MUTEX_INIT_FIXIDX,
STATSSWTCH_FIXIDX,
STDIO_STDARG_H_FIXIDX,
STDIO_VA_LIST_FIXIDX,
...
...
@@ -5862,6 +5904,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
HPUX10_CPP_POW_INLINE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aHpux10_Cpp_Pow_InlineTests, apzHpux10_Cpp_Pow_InlinePatch, 0 },
{ zHpux11_Cpp_Pow_InlineName, zHpux11_Cpp_Pow_InlineList,
apzHpux11_Cpp_Pow_InlineMachs,
HPUX11_CPP_POW_INLINE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aHpux11_Cpp_Pow_InlineTests, apzHpux11_Cpp_Pow_InlinePatch, 0 },
{ zHpux11_FabsfName, zHpux11_FabsfList,
apzHpux11_FabsfMachs,
HPUX11_FABSF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
...
...
@@ -6087,10 +6134,10 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
SCO_UTIME_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSco_UtimeTests, apzSco_UtimePatch, 0 },
{ zSolaris
27_Mutex_InitName, zSolaris27
_Mutex_InitList,
apzSolaris
27
_Mutex_InitMachs,
SOLARIS
27
_MUTEX_INIT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSolaris
27_Mutex_InitTests, apzSolaris27
_Mutex_InitPatch, 0 },
{ zSolaris
_Mutex_InitName, zSolaris
_Mutex_InitList,
apzSolaris_Mutex_InitMachs,
SOLARIS_MUTEX_INIT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSolaris
_Mutex_InitTests, apzSolaris
_Mutex_InitPatch, 0 },
{ zStatsswtchName, zStatsswtchList,
apzStatsswtchMachs,
...
...
gcc/fixinc/inclhack.def
View file @
eb559363
...
...
@@ -1149,7 +1149,7 @@ fix = {
/*
* Delete C++ double pow (double, int) inline function from HP-UX 10
* Delete C++ double pow (double, int) inline function from HP-UX 10
& 11
* math.h to prevent clash with define in c_std/bits/std_cmath.h.
*/
fix = {
...
...
@@ -1180,6 +1180,20 @@ fix = {
"# endif";
};
fix = {
hackname = hpux11_cpp_pow_inline;
files = math.h;
select = " +inline double pow\\(double d,int expon\\) {\n"
" +return pow\\(d, \\(double\\)expon\\);\n"
" +}\n";
c_fix = format;
c_fix_arg = "";
test_text =
" inline double pow(double d,int expon) {\n"
" return pow(d, (double)expon);\n"
" }\n";
};
/*
* Keep HP-UX 11 from stomping on C++ math namespace
...
...
@@ -2052,22 +2066,30 @@ fix = {
/*
* Sun Solaris
2.7
defines PTHREAD_MUTEX_INITIALIZER with a trailing
* Sun Solaris defines PTHREAD_MUTEX_INITIALIZER with a trailing
* "0" for the last field of the pthread_mutex_t structure, which is
* of type upad64_t, which itself is typedef'd to int64_t, but with
* __STDC__ defined (e.g. by -ansi) it is a union. So change the
* initializer to "{0}" instead
*/
fix = {
hackname = solaris
27
_mutex_init;
select = '@\(#\)pthread.h' "[ \t]+1.
26[ \t]+98/04/12
SMI";
hackname = solaris_mutex_init;
select = '@\(#\)pthread.h' "[ \t]+1.
[0-9]+[ \t]+[0-9/]+
SMI";
files = pthread.h;
c_fix = format;
c_fix_arg = "%1, {0}}";
c_fix_arg = "(define[ \t]+PTHREAD_MUTEX_INITIALIZER.*),[ \t]*0}$";
c_fix_arg = "#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)\n"
"%0\n"
"#else\n"
"%1, {0}}%3\n"
"#endif";
c_fix_arg = "(^#define[ \t]+PTHREAD_(MUTEX|COND)_INITIALIZER[ \t]+{.*)"
",[ \t]*0}" "(|[ \t].*)$";
test_text =
'#ident "@(#)pthread.h 1.26 98/04/12 SMI"'"\n"
"#define PTHREAD_MUTEX_INITIALIZER {{{0},0}, {{{0}}}, 0}";
"#define PTHREAD_MUTEX_INITIALIZER\t{{{0},0}, {{{0}}}, 0}\n"
"#define PTHREAD_COND_INITIALIZER\t{{{0}, 0}, 0}\t/* DEFAULTCV */\n"
"#define PTHREAD_RWLOCK_INITIALIZER\t"
"{0, 0, 0, {0, 0, 0}, {0, 0}, {0, 0}}";
};
...
...
@@ -3058,7 +3080,7 @@ fix = {
hackname = uw7_byteorder_fix;
files = arpa/inet.h;
select = "in_port_t";
test = "-f
$DESTDIR/
sys/byteorder.h";
test = "-f sys/byteorder.h";
#ifndef SVR5
mach = "*-*-sysv4*";
mach = "i?86-*-sysv5*";
...
...
@@ -3070,12 +3092,12 @@ fix = {
c_fix = format;
c_fix_arg = "";
c_fix_arg = "^extern.*
(htons|ntohs).*\\(in_port_t\\).*\n
";
c_fix_arg = "^extern.*
[ \t](htons|ntohs).*\\(in_port_t\\).*;
";
test_text = "extern htons(in_port_t);"
test_text = "extern in_port_t\thtons __P((in_port_t));\n"
"extern in_port_t\tntohs __P((in_port_t));"
"`[ ! -d $DESTDIR/sys ] && mkdir $DESTDIR/sys\n"
"echo '/* DUMMY */' >> sys/byteorder.h\n"
"touch $DESTDIR/sys/byteorder.h`";
"echo '/* DUMMY */' >> sys/byteorder.h`";
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment