Browse Source

C99 gprof configury

Given C99 we don't need to check for setlocale.  The patch also
adds setitimer checks so that they can be removed from bfd where they
aren't needed.  According to the automake manual AC_ISC_POSIX is
obsolete, so that is removed.  HAVE_SETMODE isn't checked anywhere,
so it is pointless to have a configure test for setmode.

	* configure.ac: Check for sys/time.h and setitimer.  Don't invoke
	AC_ISC_POSIX.  Don't check for setmode.
	* gprof.c: Don't test HAVE_SETLOCALE.
	* gprof.h: Include sys/time.h.
	* configure: Regenerate.
	* gconfig.in: Regenerate.
binutils-2_37-branch
Alan Modra 5 years ago
parent
commit
5d4d26d14c
  1. 9
      gprof/ChangeLog
  2. 1883
      gprof/configure
  3. 5
      gprof/configure.ac
  4. 7
      gprof/gconfig.in
  5. 4
      gprof/gprof.c
  6. 8
      gprof/gprof.h

9
gprof/ChangeLog

@ -1,3 +1,12 @@
2021-04-05 Alan Modra <amodra@gmail.com>
* configure.ac: Check for sys/time.h and setitimer. Don't invoke
AC_ISC_POSIX. Don't check for setmode.
* gprof.c: Don't test HAVE_SETLOCALE.
* gprof.h: Include sys/time.h.
* configure: Regenerate.
* gconfig.in: Regenerate.
2021-03-31 Alan Modra <amodra@gmail.com>
* basic_blocks.c: Replace bfd_boolean with bool, FALSE with false,

1883
gprof/configure

File diff suppressed because it is too large

5
gprof/configure.ac

@ -21,7 +21,6 @@ AC_INIT([gprof], BFD_VERSION)
AC_CONFIG_SRCDIR([gprof.c])
AC_CANONICAL_TARGET([])
AC_ISC_POSIX
AM_INIT_AUTOMAKE
@ -39,7 +38,9 @@ AC_PROG_INSTALL
LT_INIT
ACX_LARGEFILE
AC_CHECK_FUNCS(setmode)
# These are in addition to what is made available in bfd/.
AC_CHECK_HEADERS(sys/time.h)
AC_CHECK_FUNCS(setitimer)
ALL_LINGUAS="bg da de eo es fi fr ga hu id it ja ms nl pt_BR ro ru rw sr sv tr uk vi"
ZW_GNU_GETTEXT_SISTER_DIR

7
gprof/gconfig.in

@ -16,8 +16,8 @@
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `setmode' function. */
#undef HAVE_SETMODE
/* Define to 1 if you have the `setitimer' function. */
#undef HAVE_SETITIMER
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
@ -37,6 +37,9 @@
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H

4
gprof/gprof.c

@ -187,12 +187,10 @@ main (int argc, char **argv)
Sym **cg = 0;
int ch, user_specified = 0;
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
#ifdef HAVE_LC_MESSAGES
setlocale (LC_MESSAGES, "");
#endif
#if defined (HAVE_SETLOCALE)
setlocale (LC_CTYPE, "");
#endif
#ifdef ENABLE_NLS
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);

8
gprof/gprof.h

@ -40,6 +40,10 @@
#undef PACKAGE_VERSION
#include "gconfig.h"
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifndef MIN
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif
@ -58,9 +62,7 @@
#define GMONNAME "gmon.out" /* default profile filename */
#define GMONSUM "gmon.sum" /* profile summary filename */
#ifdef HAVE_LOCALE_H
# include <locale.h>
#endif
#include <locale.h>
#ifdef ENABLE_NLS
/* Undefine BFD's `_' macro - it uses dgetext() and we want to use gettext(). */

Loading…
Cancel
Save