Skip to content

Commit

Permalink
more portability attempts
Browse files Browse the repository at this point in the history
Change-Id: I2f02e1a750328d37bca777522a0c2a2e7a8228f1
  • Loading branch information
cooljeanius committed Oct 16, 2024
1 parent f548e43 commit 5b0f607
Show file tree
Hide file tree
Showing 35 changed files with 126 additions and 42 deletions.
6 changes: 6 additions & 0 deletions src/bfd/config.h.in

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion src/bfd/configure
Original file line number Diff line number Diff line change
Expand Up @@ -21972,7 +21972,6 @@ fi
printf "%s\n" "$ac_cv_path_CLANG_ANALYZER" >&6; } ## (need this extra line here)
CLANG_ANALYZER=${ac_cv_path_CLANG_ANALYZER}

## FIXME: recheck documentation on this one; I might be using the wrong value...

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fstrict-flex-arrays=1" >&5
printf %s "checking whether C compiler handles -fstrict-flex-arrays=1... " >&6; }
Expand Down Expand Up @@ -25010,6 +25009,12 @@ if test "x$ac_cv_header_sys_file_h" = xyes
then :
printf "%s\n" "#define HAVE_SYS_FILE_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/malloc.h" "ac_cv_header_sys_malloc_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_malloc_h" = xyes
then :
printf "%s\n" "#define HAVE_SYS_MALLOC_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "sys/paccess.h" "ac_cv_header_sys_paccess_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_paccess_h" = xyes
Expand Down Expand Up @@ -25070,6 +25075,12 @@ if test "x$ac_cv_header_time_h" = xyes
then :
printf "%s\n" "#define HAVE_TIME_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "uniconv.h" "ac_cv_header_uniconv_h" "$ac_includes_default"
if test "x$ac_cv_header_uniconv_h" = xyes
then :
printf "%s\n" "#define HAVE_UNICONV_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
if test "x$ac_cv_header_wchar_h" = xyes
Expand Down
10 changes: 5 additions & 5 deletions src/bfd/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,6 @@ if test "x${WANT_CONVERSION_WARNS}" = "x" && test "x${enable_build_warnings}" =
fi
AM_BINUTILS_WARNINGS
AM_BINUTILS_CLANG_STATIC_ANALYSIS
## FIXME: recheck documentation on this one; I might be using the wrong value...
gl_WARN_ADD([-fstrict-flex-arrays=1],[FLEXMEMBER_STRICTNESS_FLAG])dnl

dnl# add some insurance to our "config.h" header:
Expand Down Expand Up @@ -650,10 +649,11 @@ AC_CHECK_HEADERS([ctype.h errno.h fcntl.h gettext.h iconv.h libgen.h \
mach-o/loader.h malloca.h malloc/malloc.h math.h \
mingw/fcntl.h mingw/malloc.h mingw/sys/types.h \
realloc.h signal.h stdarg.h stddef.h stdio.h sys/acl.h \
sys/core.h sys/errno.h sys/file.h sys/paccess.h \
sys/param.h sys/region.h sys/resource.h sys/signal.h \
sys/socket.h sys/time.h sys/user.h sys/utsname.h time.h \
wchar.h wctype.h windef.h windows.h])dnl
sys/core.h sys/errno.h sys/file.h sys/malloc.h \
sys/paccess.h sys/param.h sys/region.h sys/resource.h \
sys/signal.h sys/socket.h sys/time.h sys/user.h \
sys/utsname.h time.h uniconv.h wchar.h wctype.h \
windef.h windows.h])dnl
GCC_HEADER_STDINT([bfd_stdint.h],[stdint.h])dnl
AC_HEADER_TIME
AC_HEADER_DIRENT
Expand Down
1 change: 1 addition & 0 deletions src/bfd/mach-o.c
Original file line number Diff line number Diff line change
Expand Up @@ -1352,6 +1352,7 @@ bfd_mach_o_make_bfd_section(bfd *abfd, bfd_mach_o_section *section)
bfdsec->alignment_power = (unsigned int)section->align;
bfdsec->segment_mark = 0U;

/* FIXME: -Wtautological-compare in here: */
if (((section->flags & BFD_MACH_O_SECTION_TYPE_MASK) == BFD_MACH_O_S_ZEROFILL)
|| ((section->flags & BFD_MACH_O_SECTION_TYPE_MASK) == BFD_MACH_O_S_GB_ZEROFILL))
{
Expand Down
2 changes: 1 addition & 1 deletion src/bfd/po/bfd.pot

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/binutils/arlex.l
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ extern int yyinunput(void);
# if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2))
# pragma GCC diagnostic ignored "-Wswitch-default"
# pragma GCC diagnostic ignored "-Wold-style-definition"
# pragma GCC diagnostic ignored "-Wsign-compare"
# endif /* gcc 4.2+ */
#endif /* any gcc */

Expand Down
2 changes: 1 addition & 1 deletion src/binutils/doc/addr2line.1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/binutils/doc/ar.1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/binutils/doc/cxxfilt.man

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/binutils/doc/dlltool.1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/binutils/doc/elfedit.1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/binutils/doc/nlmconv.1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/binutils/doc/nm.1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/binutils/doc/objcopy.1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/binutils/doc/objdump.1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/binutils/doc/ranlib.1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/binutils/doc/readelf.1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/binutils/doc/size.1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/binutils/doc/strings.1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/binutils/doc/strip.1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/binutils/doc/windmc.1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/binutils/doc/windres.1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/binutils/po/binutils.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-08-25 04:40-0400\n"
"POT-Creation-Date: 2024-10-15 22:02-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
9 changes: 9 additions & 0 deletions src/binutils/syslex_wrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@
# undef realloc
#endif /* realloc */

#if defined(__GNUC__) && (__GNUC__ >= 5)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-function"
#endif /* GCC 5+ */

#include "syslex.c"

#if defined(__GNUC__) && (__GNUC__ >= 5)
# pragma GCC diagnostic pop
#endif /* GCC 5+ */

/* End of syslex_wrap.c */
3 changes: 0 additions & 3 deletions src/expect/configure
Original file line number Diff line number Diff line change
Expand Up @@ -4587,7 +4587,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu


ac_config_headers="$ac_config_headers expect_cf.h"

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
Expand Down Expand Up @@ -7444,7 +7443,6 @@ fi

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if stty reads stdout" >&5
printf %s "checking if stty reads stdout... " >&6; }

# On some systems stty cannot be run in the background (svr4) or get it
# wrong because they fail to complain (NeXT, mach), so do NOT attempt
# the test on some systems.
Expand Down Expand Up @@ -7655,7 +7653,6 @@ then :

fi


# On a few systems, libm.a is the same as libc.a
# Do NOT bother to test against Tcl and Tk libs, they always include -lm
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
Expand Down
6 changes: 3 additions & 3 deletions src/expect/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ if test -n "${HOST_ARCHITECTURE}"; then
AC_SUBST([C_ARCHFLAGS])
fi

ACX_PROG_CC_WARNING_OPTS([-Wreturn-type -Wfatal-errors])
ACX_PROG_CC_WARNING_OPTS([-Wreturn-type -Wfatal-errors])dnl

AC_CONFIG_HEADERS([expect_cf.h])dnl

Expand Down Expand Up @@ -270,7 +270,7 @@ else
iunix=0
fi

AC_MSG_CHECKING([if stty reads stdout])
AC_MSG_CHECKING([if stty reads stdout])dnl

# On some systems stty cannot be run in the background (svr4) or get it
# wrong because they fail to complain (NeXT, mach), so do NOT attempt
Expand Down Expand Up @@ -340,7 +340,7 @@ fi

# Check for a regex library:
AC_SEARCH_LIBS([regcomp],[iberty regex gregex gnuregex rx grx gnurx gnu c])
AC_SEARCH_LIBS([regexec],[iberty regex gregex gnuregex rx grx gnurx gnu c])
AC_SEARCH_LIBS([regexec],[iberty regex gregex gnuregex rx grx gnurx gnu c])dnl

# On a few systems, libm.a is the same as libc.a
# Do NOT bother to test against Tcl and Tk libs, they always include -lm
Expand Down
3 changes: 3 additions & 0 deletions src/gdb/defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1937,6 +1937,9 @@ extern struct cleanup *start_timer(int *timer_var, const char *timer_name,
/* for similar reasons, such as libiberty also providing replacements: */
# pragma GCC poison strndup memdup vsprintf vasprintf
# ifndef strerror
# ifndef DEFS_H_POISONING_STRERROR_TOO
# define DEFS_H_POISONING_STRERROR_TOO 1
# endif /* !DEFS_H_POISONING_STRERROR_TOO */
# pragma GCC poison strerror
# endif /* !strerror */
/* also consider poisoining for similar reasons: asprintf atexit exit */
Expand Down
5 changes: 3 additions & 2 deletions src/gdb/gdb_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ extern int memcmp();
#endif /* STDC_HEADERS */

#if !HAVE_DECL_STRERROR
# if !defined(DEFS_H_DOING_POISONING) && !defined(strerror)
# if !defined(DEFS_H_DOING_POISONING) && \
!defined(DEFS_H_POISONING_STRERROR_TOO) && !defined(strerror)
extern char *strerror(int); /* X3.159-1989 4.11.6.2 */
# endif /* !DEFS_H_DOING_POISONING && !strerror */
# endif /* !DEFS_H_DOING_POISONING && !DEFS_H_POISONING_STRERROR_TOO && !strerror */
#endif /* !HAVE_DECL_STRERROR */

#if !HAVE_DECL_STRSTR
Expand Down
6 changes: 6 additions & 0 deletions src/intl/config.h.in

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5b0f607

Please sign in to comment.