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
6aa1f8c1
Commit
6aa1f8c1
authored
Sep 06, 2008
by
Bruce Korb
Committed by
Bruce Korb
Sep 06, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix glibc_mutex_init fix
From-SVN: r140071
parent
1b1f56cf
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
124 additions
and
76 deletions
+124
-76
fixincludes/ChangeLog
+12
-0
fixincludes/config.h.in
+2
-0
fixincludes/configure.ac
+3
-0
fixincludes/fixincl.tpl
+5
-1
fixincludes/fixincl.x
+0
-0
fixincludes/inclhack.def
+95
-68
fixincludes/tests/base/internal/wchar_core.h
+0
-0
fixincludes/tests/base/math.h
+7
-6
fixincludes/tests/base/pthread.h
+0
-1
No files found.
fixincludes/ChangeLog
View file @
6aa1f8c1
2008-09-06 Bruce Korb <bkorb@gnu.org>
* fixincl.tpl (sed): make the program executable configurable.
Some platforms have some rather oddball defaults.
* config.h.in (SED_PROGRAM): define the default sed.
* fixincl.x: regenerated
* tests/base/internal/wchar_core.h: fix bad sample text
* tests/base/math.h: fix bad sample text
* configure.ac: search for working sed
* inclhack.def (glibc_mutex_init): fix non-portable construct
and re-order a few misordered entries.
2008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* configure: Regenerate.
...
...
fixincludes/config.h.in
View file @
6aa1f8c1
...
...
@@ -38,6 +38,8 @@
you don't. */
#undef HAVE_DECL_FFLUSH_UNLOCKED
#define SED_PROGRAM "/usr/bin/sed"
/* Define to 1 if you have the declaration of `fgetc_unlocked', and to 0 if
you don't. */
#undef HAVE_DECL_FGETC_UNLOCKED
...
...
fixincludes/configure.ac
View file @
6aa1f8c1
...
...
@@ -5,6 +5,7 @@ AC_CONFIG_SRCDIR(inclhack.def)
AC_CONFIG_AUX_DIR(..)
AC_CANONICAL_SYSTEM
AC_PROG_CC
AC_PROG_SED
# Figure out what compiler warnings we can enable.
# See config/warnings.m4 for details.
...
...
@@ -106,6 +107,8 @@ else
MAINT='#'
fi
AC_SUBST(MAINT)
AC_DEFINE_UNQUITED([SED_PROGRAM], "${SED}",
[Defined to the best working sed program on the host system])
AC_CONFIG_HEADERS(config.h, [echo timestamp > stamp-h])
AC_CONFIG_FILES(Makefile mkheaders.almost:mkheaders.in)
...
...
fixincludes/fixincl.tpl
View file @
6aa1f8c1
...
...
@@ -35,6 +35,10 @@ x=fixincl.x =]
* You should have received a copy of the GNU General Public License along
* with this program. If not, see
<http:
//
www
.
gnu
.
org
/
licenses
/>
.
*/
#ifndef SED_PROGRAM
#define SED_PROGRAM "/usr/bin/sed"
#endif
static char const sed_cmd_z[] = SED_PROGRAM;
[=
FOR fix =]
...
...
@@ -165,7 +169,7 @@ static tTestDesc a[=(. Hack)=]Tests[] = {[=
* Fix Command Arguments for [=(. Hack)=]
*/
static const char* apz[=(. Hack)=]Patch[] = {[=
IF (exist? "sed")=]
"sed"
[=
IF (exist? "sed")=]
sed_cmd_z
[=
FOR sed=],
"-e", [=(kr-string (get "sed"))=][=
ENDFOR sed=],[=
...
...
fixincludes/fixincl.x
View file @
6aa1f8c1
This diff is collapsed.
Click to expand it.
fixincludes/inclhack.def
View file @
6aa1f8c1
...
...
@@ -620,6 +620,7 @@ fix = {
"#endif";
};
/*
* Compaq Tru64 v5.1 defines all of its PTHREAD_*_INITIALIZER macros
* incorrectly, specifying less fields in the initializers than are
...
...
@@ -639,32 +640,34 @@ fix = {
"s@CVALID\\(.*\\)_}@CVALID\\1_, 0, 0 }@\n"
"s@WVALID\\(.*\\)A}@WVALID\\1A, 0, 0, 0, 0, 0, 0, 0, 0, 0 }@\n"
"s@WVALID\\(.*\\)_}@WVALID\\1_, 0, 0, 0, 0, 0, 0, 0 }@\n";
test_text = "/*\n"
" * @(#)_RCSfile: pthread.h,v \\$ "
"_Revision: 1.1.33.21 \\$ (DEC) "
"_Date: 2000/08/15 15:30:13 \\$\n"
" */\n"
"#ifndef _PTHREAD_NOMETER_STATIC\n"
"# define PTHREAD_MUTEX_INITIALIZER \\\n"
" {_PTHREAD_MSTATE_CONFIG, _PTHREAD_MVALID | _PTHREAD_MVF_STA}\n"
"# define PTHREAD_COND_INITIALIZER \\\n"
" {_PTHREAD_CSTATE_SLOW, _PTHREAD_CVALID | _PTHREAD_CVF_STA}\n"
"# define PTHREAD_MUTEX_INITWITHNAME_NP(_n_,_a_) \\\n"
" {_PTHREAD_MSTATE_CONFIG, _PTHREAD_MVALID | _PTHREAD_MVF_STA, _n_, _a_}\n"
"# define PTHREAD_COND_INITWITHNAME_NP(_n_,_a_) \\\n"
" {_PTHREAD_CSTATE_SLOW, _PTHREAD_CVALID | _PTHREAD_CVF_STA, _n_, _a_}\n"
"#else\n"
"# define PTHREAD_MUTEX_INITIALIZER {0, _PTHREAD_MVALID | _PTHREAD_MVF_STA}\n"
"# define PTHREAD_MUTEX_INITWITHNAME_NP(_n_,_a_) \\\n"
" {0, _PTHREAD_MVALID | _PTHREAD_MVF_STA, _n_, _a_}\n"
"# define PTHREAD_COND_INITWITHNAME_NP(_n_,_a_) \\\n"
" {0, _PTHREAD_CVALID | _PTHREAD_CVF_STA, _n_, _a_}\n"
"#endif\n\n"
"#define PTHREAD_RWLOCK_INITIALIZER {_PTHREAD_RWVALID | _PTHREAD_RWVF_STA}\n"
"#define PTHREAD_RWLOCK_INITWITHNAME_NP(_n_,_a_) \\\n"
" {_PTHREAD_RWVALID | _PTHREAD_RWVF_STA, _n_, _a_}\n";
test_text = <<- _EOText_
/*
* @(#)_RCSfile: pthread.h,v $ _Revision: 1.1.33.21 $ (DEC) _Date: 2000/08/15 15:30:13 $
*/
#ifndef _PTHREAD_NOMETER_STATIC
# define PTHREAD_MUTEX_INITIALIZER \
{_PTHREAD_MSTATE_CONFIG, _PTHREAD_MVALID | _PTHREAD_MVF_STA}
# define PTHREAD_COND_INITIALIZER \
{_PTHREAD_CSTATE_SLOW, _PTHREAD_CVALID | _PTHREAD_CVF_STA}
# define PTHREAD_MUTEX_INITWITHNAME_NP(_n_,_a_) \
{_PTHREAD_MSTATE_CONFIG, _PTHREAD_MVALID | _PTHREAD_MVF_STA, _n_, _a_}
# define PTHREAD_COND_INITWITHNAME_NP(_n_,_a_) \
{_PTHREAD_CSTATE_SLOW, _PTHREAD_CVALID | _PTHREAD_CVF_STA, _n_, _a_}
#else
# define PTHREAD_MUTEX_INITIALIZER {0, _PTHREAD_MVALID | _PTHREAD_MVF_STA}
# define PTHREAD_MUTEX_INITWITHNAME_NP(_n_,_a_) \
{0, _PTHREAD_MVALID | _PTHREAD_MVF_STA, _n_, _a_}
# define PTHREAD_COND_INITWITHNAME_NP(_n_,_a_) \
{0, _PTHREAD_CVALID | _PTHREAD_CVF_STA, _n_, _a_}
#endif
#define PTHREAD_RWLOCK_INITIALIZER {_PTHREAD_RWVALID | _PTHREAD_RWVF_STA}
#define PTHREAD_RWLOCK_INITWITHNAME_NP(_n_,_a_) \
{_PTHREAD_RWVALID | _PTHREAD_RWVF_STA, _n_, _a_}
_EOText_;
};
/*
* Fix return value of sbrk in unistd.h on Alpha OSF/1 V2.0
* And OpenBSD.
...
...
@@ -852,10 +855,10 @@ fix = {
"extern long double cabsl( struct __cabsl_s );";
};
/*
* Fixup Darwin's broken check for __builtin_nanf.
*/
fix = {
hackname = broken_nan;
/*
...
...
@@ -1228,10 +1231,12 @@ fix = {
hackname = glibc_mutex_init;
files = pthread.h;
select = '\{ *\{ *0, *\} *\}';
sed = "/define[ \t]\\+PTHREAD_MUTEX_INITIALIZER[ \t]*\\\\/,+1"
"s/{ { 0, } }/{ { 0, 0, 0, 0, 0, 0 } }/";
sed = "s/{ \\(0, 0, 0, 0, PTHREAD_MUTEX_\\(RECURSIVE\\|ERRORCHECK\\|ADAPTIVE\\)_NP\\) }/{ \\1, 0 }/";
sed = "s/{ \\(0, 0, 0, PTHREAD_MUTEX_\\(RECURSIVE\\|ERRORCHECK\\|ADAPTIVE\\)_NP\\) }/{ \\1, 0, 0 }/";
sed = "/define[ \t]\\+PTHREAD_MUTEX_INITIALIZER[ \t]*\\\\/{\n"
"N\ns/{ { 0, } }/{ { 0, 0, 0, 0, 0, 0 } }/\n}";
sed = "s/{ \\(0, 0, 0, 0, PTHREAD_MUTEX_"
"\\(RECURSIVE\\|ERRORCHECK\\|ADAPTIVE\\)_NP\\) }/{ \\1, 0 }/";
sed = "s/{ \\(0, 0, 0, PTHREAD_MUTEX_"
"\\(RECURSIVE\\|ERRORCHECK\\|ADAPTIVE\\)_NP\\) }/{ \\1, 0, 0 }/";
sed = "/define[ \t]\\+PTHREAD_RWLOCK_INITIALIZER[ \t]*\\\\/"
"N;s/^[ \t]*#[ \t]*"
"\\(define[ \t]\\+PTHREAD_RWLOCK_INITIALIZER[ \t]*\\\\\\)\\n"
...
...
@@ -1242,7 +1247,8 @@ fix = {
"# \\1\\n"
" { { 0, 0, 0, 0, 0, 0, 0, 0 } }\\n"
"# endif/";
sed = "s/{ \\(0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP\\) }/{ \\1, 0 }/";
sed = "s/{ \\(0, 0, 0, 0, 0, 0, "
"PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP\\) }/{ \\1, 0 }/";
sed = "/define[ \t]\\+PTHREAD_COND_INITIALIZER/"
"s/{ { 0, } }/{ { 0, 0, 0, 0, 0, (void *) 0, 0, 0 } }/";
...
...
@@ -1349,6 +1355,40 @@ fix = {
/*
* Un-Hide a series of five FP defines from post-1999 compliance GCC:
* FP_NORMAL, FP_ZERO, FP_INFINITE, FP_SUBNORMAL and FP_NAN
*/
fix = {
hackname = hppa_hpux_fp_macros;
mach = "hppa*-hp-hpux11*";
files = math.h;
select = "#[ \t]*define[ \t]*FP_NORMAL.*\n"
"#[ \t]*define[ \t]*FP_ZERO.*\n"
"#[ \t]*define[ \t]*FP_INFINITE.*\n"
"#[ \t]*define[ \t]*FP_SUBNORMAL.*\n"
"#[ \t]*define[ \t]*FP_NAN.*\n";
c_fix = format;
c_fix_arg = <<- _EOFix_
#endif /* _INCLUDE_HPUX_SOURCE */
#if defined(_INCLUDE_HPUX_SOURCE) || \
(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
%0#endif
#ifdef _INCLUDE_HPUX_SOURCE
_EOFix_;
test_text =
"# define FP_NORMAL 0\n"
"# define FP_ZERO 1\n"
"# define FP_INFINITE 2\n"
"# define FP_SUBNORMAL 3\n"
"# define FP_NAN 4\n";
};
/*
* 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.
*/
...
...
@@ -1396,27 +1436,6 @@ fix = {
};
fix = {
hackname = hppa_hpux_fp_macros;
mach = "hppa*-hp-hpux11*";
files = math.h;
select = "#[ \t]*define[ \t]*FP_NORMAL.*\n"
"#[ \t]*define[ \t]*FP_ZERO.*\n"
"#[ \t]*define[ \t]*FP_INFINITE.*\n"
"#[ \t]*define[ \t]*FP_SUBNORMAL.*\n"
"#[ \t]*define[ \t]*FP_NAN.*\n";
c_fix = format;
c_fix_arg = "#endif /* _INCLUDE_HPUX_SOURCE */\n\n#if defined(_INCLUDE_HPUX_SOURCE) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))\n%0#endif\n\n#ifdef _INCLUDE_HPUX_SOURCE\n";
test_text =
"# define FP_NORMAL 0\n"
"# define FP_ZERO 1\n"
"# define FP_INFINITE 2\n"
"# define FP_SUBNORMAL 3\n"
"# define FP_NAN 4\n";
};
/*
* Fix hpux 10.X missing ctype declarations 1
*/
...
...
@@ -1512,7 +1531,6 @@ fix = {
select = "ifndef _MATH_INCLUDED";
c_fix = format;
c_fix_arg = "if !defined(_MATH_INCLUDED) || defined(__GNUG__)";
// sed = "s/ifndef _MATH_INCLUDED/if !defined(_MATH_INCLUDED) || defined(__GNUG__)/";
test_text = "#ifndef _MATH_INCLUDED";
};
...
...
@@ -1538,6 +1556,21 @@ fix = {
/*
* Fix C99 constant in __POINTER_SET define.
*/
fix = {
hackname = hpux11_pthread_const;
mach = "*-hp-hpux11.[0-3]*";
files = sys/pthread.h;
select = "^#define[ \t]*__POINTER_SET[ \t]*\\(\\(void \\*\\) 1LL\\)";
c_fix = format;
c_fix_arg = "#define __POINTER_SET\t\t((void *) 1L)";
test_text = "#define __POINTER_SET\t\t((void *) 1LL)";
};
/*
* Prevent HP-UX 11 from defining __size_t and preventing size_t from
* being defined by having it define _hpux_size_t instead.
*/
...
...
@@ -1763,19 +1796,6 @@ fix = {
test_text = " extern int errno;\n";
};
/*
* Fix C99 constant in __POINTER_SET define.
*/
fix = {
hackname = hpux11_pthread_const;
mach = "*-hp-hpux11.[0-3]*";
files = sys/pthread.h;
select = "^#define[ \t]*__POINTER_SET[ \t]*\\(\\(void \\*\\) 1LL\\)";
c_fix = format;
c_fix_arg = "#define __POINTER_SET\t\t((void *) 1L)";
test_text = "#define __POINTER_SET\t\t((void *) 1LL)";
};
/*
* Add missing braces to pthread initializer defines.
...
...
@@ -2112,7 +2132,9 @@ fix = {
c_fix_arg = "#if _NO_XOPEN5 && !defined(__c99)\n%1";
test_text = "#if _NO_XOPEN5\n"
"extern size_t wcsftime(wchar_t *, __SGI_LIBC_NAMESPACE_QUALIFIER size_t, const char *, const struct tm *);";
"extern size_t wcsftime(wchar_t *, "
"__SGI_LIBC_NAMESPACE_QUALIFIER size_t, const char *, "
"const struct tm *);";
};
/*
...
...
@@ -2278,7 +2300,8 @@ fix = {
* exception either. So currently we bypass only for glibc, based on a
* comment in the fixed glibc header. Ick.
*/
bypass = 'We have a problem when using C\+\+|for C\+\+, _[a-z0-9A-Z_]+_exception; for C, exception';
bypass = 'We have a problem when using C\+\+|for C\+\+, '
'_[a-z0-9A-Z_]+_exception; for C, exception';
c_fix = wrap;
c_fix_arg = "#ifdef __cplusplus\n"
...
...
@@ -2368,7 +2391,11 @@ fix = {
select = "extern __inline int";
c_fix = format;
c_fix_arg = "extern\n#ifdef __GNUC_STDC_INLINE__\n__attribute__((__gnu_inline__))\n#endif\n__inline int";
c_fix_arg = "extern\n"
"#ifdef __GNUC_STDC_INLINE__\n"
"__attribute__((__gnu_inline__))\n"
"#endif\n"
"__inline int";
test_text = "extern __inline int\nsigaddset(sigset_t *set, int signo)\n{}";
};
...
...
fixincludes/tests/base/internal/wchar_core.h
View file @
6aa1f8c1
fixincludes/tests/base/math.h
View file @
6aa1f8c1
...
...
@@ -43,15 +43,11 @@ extern int matherr();
#endif
/* EXCEPTION_STRUCTURE_CHECK */
#if defined( HPUX11_CPP_POW_INLINE_CHECK )
#endif
/* HPUX11_CPP_POW_INLINE_CHECK */
#if defined( HPPA_HPUX_FP_MACROS_CHECK )
#endif
/* _INCLUDE_HPUX_SOURCE */
#if defined(_INCLUDE_HPUX_SOURCE) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
#if defined(_INCLUDE_HPUX_SOURCE) || \
(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
# define FP_NORMAL 0
# define FP_ZERO 1
# define FP_INFINITE 2
...
...
@@ -64,6 +60,11 @@ extern int matherr();
#endif
/* HPPA_HPUX_FP_MACROS_CHECK */
#if defined( HPUX11_CPP_POW_INLINE_CHECK )
#endif
/* HPUX11_CPP_POW_INLINE_CHECK */
#if defined( HPUX11_FABSF_CHECK )
#ifdef _PA_RISC
#ifndef __cplusplus
...
...
fixincludes/tests/base/pthread.h
View file @
6aa1f8c1
...
...
@@ -52,7 +52,6 @@
#define PTHREAD_RWLOCK_INITIALIZER {_PTHREAD_RWVALID | _PTHREAD_RWVF_STA, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
#define PTHREAD_RWLOCK_INITWITHNAME_NP(_n_,_a_) {_PTHREAD_RWVALID | _PTHREAD_RWVF_STA, _n_, _a_, 0, 0, 0, 0, 0, 0, 0 }
#endif
/* ALPHA_PTHREAD_INIT_CHECK */
...
...
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