* ldmisc.c (USE_STDARG): Remove.
(info_msg): Define using VPARAMS, VA_OPEN, VA_FIXEDARG, VA_CLOSE. (einfo): Likewise. (minfo): Likewise. (lfinfo): Likewise. * ldmisc.h: Remove #ifdef ANSI_PROTOTYPES and non-ansi declarations. Update copyright.
This commit is contained in:
parent
451dad9c58
commit
d5e0ebeb62
11
ld/ChangeLog
11
ld/ChangeLog
|
@ -1,3 +1,14 @@
|
||||||
|
2001-09-26 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* ldmisc.c (USE_STDARG): Remove.
|
||||||
|
(info_msg): Define using VPARAMS, VA_OPEN, VA_FIXEDARG, VA_CLOSE.
|
||||||
|
(einfo): Likewise.
|
||||||
|
(minfo): Likewise.
|
||||||
|
(lfinfo): Likewise.
|
||||||
|
|
||||||
|
* ldmisc.h: Remove #ifdef ANSI_PROTOTYPES and non-ansi
|
||||||
|
declarations. Update copyright.
|
||||||
|
|
||||||
2001-09-24 Charles Wilson <cwilson@ece.gatech.edu>
|
2001-09-24 Charles Wilson <cwilson@ece.gatech.edu>
|
||||||
|
|
||||||
* pe-dll.c: Remove obsoleted declaration of
|
* pe-dll.c: Remove obsoleted declaration of
|
||||||
|
|
88
ld/ldmisc.c
88
ld/ldmisc.c
|
@ -27,10 +27,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||||
|
|
||||||
#ifdef ANSI_PROTOTYPES
|
#ifdef ANSI_PROTOTYPES
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#define USE_STDARG 1
|
|
||||||
#else
|
#else
|
||||||
#include <varargs.h>
|
#include <varargs.h>
|
||||||
#define USE_STDARG 0
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "ld.h"
|
#include "ld.h"
|
||||||
|
@ -412,51 +410,25 @@ vfinfo (fp, fmt, arg)
|
||||||
would hosed by LynxOS, which defines that name in its libc.) */
|
would hosed by LynxOS, which defines that name in its libc.) */
|
||||||
|
|
||||||
void
|
void
|
||||||
#if USE_STDARG
|
info_msg VPARAMS ((const char *fmt, ...))
|
||||||
info_msg (const char *fmt, ...)
|
|
||||||
#else
|
|
||||||
info_msg (va_alist)
|
|
||||||
va_dcl
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
va_list arg;
|
VA_OPEN (arg, fmt);
|
||||||
|
VA_FIXEDARG (arg, const char *, fmt);
|
||||||
#if ! USE_STDARG
|
|
||||||
const char *fmt;
|
|
||||||
|
|
||||||
va_start (arg);
|
|
||||||
fmt = va_arg (arg, const char *);
|
|
||||||
#else
|
|
||||||
va_start (arg, fmt);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
vfinfo (stdout, fmt, arg);
|
vfinfo (stdout, fmt, arg);
|
||||||
va_end (arg);
|
VA_CLOSE (arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ('e' for error.) Format info message and print on stderr. */
|
/* ('e' for error.) Format info message and print on stderr. */
|
||||||
|
|
||||||
void
|
void
|
||||||
#if USE_STDARG
|
einfo VPARAMS ((const char *fmt, ...))
|
||||||
einfo (const char *fmt, ...)
|
|
||||||
#else
|
|
||||||
einfo (va_alist)
|
|
||||||
va_dcl
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
va_list arg;
|
VA_OPEN (arg, fmt);
|
||||||
|
VA_FIXEDARG (arg, const char *, fmt);
|
||||||
#if ! USE_STDARG
|
|
||||||
const char *fmt;
|
|
||||||
|
|
||||||
va_start (arg);
|
|
||||||
fmt = va_arg (arg, const char *);
|
|
||||||
#else
|
|
||||||
va_start (arg, fmt);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
vfinfo (stderr, fmt, arg);
|
vfinfo (stderr, fmt, arg);
|
||||||
va_end (arg);
|
VA_CLOSE (arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -470,50 +442,24 @@ info_assert (file, line)
|
||||||
/* ('m' for map) Format info message and print on map. */
|
/* ('m' for map) Format info message and print on map. */
|
||||||
|
|
||||||
void
|
void
|
||||||
#if USE_STDARG
|
minfo VPARAMS ((const char *fmt, ...))
|
||||||
minfo (const char *fmt, ...)
|
|
||||||
#else
|
|
||||||
minfo (va_alist)
|
|
||||||
va_dcl
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
va_list arg;
|
VA_OPEN (arg, fmt);
|
||||||
|
VA_FIXEDARG (arg, const char *, fmt);
|
||||||
#if ! USE_STDARG
|
|
||||||
const char *fmt;
|
|
||||||
va_start (arg);
|
|
||||||
fmt = va_arg (arg, const char *);
|
|
||||||
#else
|
|
||||||
va_start (arg, fmt);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
vfinfo (config.map_file, fmt, arg);
|
vfinfo (config.map_file, fmt, arg);
|
||||||
va_end (arg);
|
VA_CLOSE (arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
#if USE_STDARG
|
lfinfo VPARAMS ((FILE *file, const char *fmt, ...))
|
||||||
lfinfo (FILE *file, const char *fmt, ...)
|
|
||||||
#else
|
|
||||||
lfinfo (va_alist)
|
|
||||||
va_dcl
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
va_list arg;
|
VA_OPEN (arg, fmt);
|
||||||
|
VA_FIXEDARG (arg, FILE *, file);
|
||||||
#if ! USE_STDARG
|
VA_FIXEDARG (arg, const char *, fmt);
|
||||||
FILE *file;
|
|
||||||
const char *fmt;
|
|
||||||
|
|
||||||
va_start (arg);
|
|
||||||
file = va_arg (arg, FILE *);
|
|
||||||
fmt = va_arg (arg, const char *);
|
|
||||||
#else
|
|
||||||
va_start (arg, fmt);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
vfinfo (file, fmt, arg);
|
vfinfo (file, fmt, arg);
|
||||||
va_end (arg);
|
VA_CLOSE (arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Functions to print the link map. */
|
/* Functions to print the link map. */
|
||||||
|
|
19
ld/ldmisc.h
19
ld/ldmisc.h
|
@ -1,5 +1,5 @@
|
||||||
/* ldmisc.h -
|
/* ldmisc.h -
|
||||||
Copyright 1991, 1992, 1993, 1994, 1996, 1997
|
Copyright 1991, 1992, 1993, 1994, 1996, 1997, 2001
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GLD, the Gnu Linker.
|
This file is part of GLD, the Gnu Linker.
|
||||||
|
@ -15,28 +15,17 @@
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with GLD; see the file COPYING. If not, write to
|
along with GLD; see the file COPYING. If not, write to the Free
|
||||||
the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Software Foundation, 59 Temple Place - Suite 330, Boston,
|
||||||
|
MA 02111-1307, USA. */
|
||||||
|
|
||||||
#ifndef LDMISC_H
|
#ifndef LDMISC_H
|
||||||
#define LDMISC_H
|
#define LDMISC_H
|
||||||
|
|
||||||
#ifdef ANSI_PROTOTYPES
|
|
||||||
extern void einfo PARAMS ((const char *, ...));
|
extern void einfo PARAMS ((const char *, ...));
|
||||||
extern void minfo PARAMS ((const char *, ...));
|
extern void minfo PARAMS ((const char *, ...));
|
||||||
extern void info_msg PARAMS ((const char *, ...));
|
extern void info_msg PARAMS ((const char *, ...));
|
||||||
extern void lfinfo PARAMS ((FILE *, const char *, ...));
|
extern void lfinfo PARAMS ((FILE *, const char *, ...));
|
||||||
#else
|
|
||||||
/* VARARGS*/
|
|
||||||
extern void einfo ();
|
|
||||||
/* VARARGS*/
|
|
||||||
extern void minfo ();
|
|
||||||
/* VARARGS*/
|
|
||||||
extern void info_msg ();
|
|
||||||
/*VARARGS*/
|
|
||||||
extern void lfinfo ();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern void info_assert PARAMS ((const char *, unsigned int));
|
extern void info_assert PARAMS ((const char *, unsigned int));
|
||||||
extern void yyerror PARAMS ((const char *));
|
extern void yyerror PARAMS ((const char *));
|
||||||
extern PTR xmalloc PARAMS ((size_t));
|
extern PTR xmalloc PARAMS ((size_t));
|
||||||
|
|
Loading…
Reference in New Issue