mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-02 04:27:46 +08:00
Remove local BSD/USG hacks that are now in libiberty.
This commit is contained in:
@ -1,5 +1,7 @@
|
|||||||
Thu Oct 24 23:06:40 1991 Fred Fish (fnf at cygnus.com)
|
Thu Oct 24 23:06:40 1991 Fred Fish (fnf at cygnus.com)
|
||||||
|
|
||||||
|
* utils.c: Remove local BSD/USG hacks that are now in libiberty.
|
||||||
|
|
||||||
* dwarfread.c: Remove prototype for dwarfwarn. Does not work
|
* dwarfread.c: Remove prototype for dwarfwarn. Does not work
|
||||||
with <varargs.h>.
|
with <varargs.h>.
|
||||||
|
|
||||||
|
93
gdb/utils.c
93
gdb/utils.c
@ -1183,99 +1183,6 @@ fprint_symbol (stream, name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined (USG_UTILS)
|
|
||||||
#define USG_UTILS defined (USG)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if USG_UTILS
|
|
||||||
bcopy (from, to, count)
|
|
||||||
char *from, *to;
|
|
||||||
{
|
|
||||||
memcpy (to, from, count);
|
|
||||||
}
|
|
||||||
|
|
||||||
bcmp (from, to, count)
|
|
||||||
{
|
|
||||||
return (memcmp (to, from, count));
|
|
||||||
}
|
|
||||||
|
|
||||||
bzero (to, count)
|
|
||||||
char *to;
|
|
||||||
{
|
|
||||||
while (count--)
|
|
||||||
*to++ = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
getwd (buf)
|
|
||||||
char *buf;
|
|
||||||
{
|
|
||||||
getcwd (buf, MAXPATHLEN);
|
|
||||||
}
|
|
||||||
|
|
||||||
char *
|
|
||||||
index (s, c)
|
|
||||||
char *s;
|
|
||||||
{
|
|
||||||
char *strchr ();
|
|
||||||
return strchr (s, c);
|
|
||||||
}
|
|
||||||
|
|
||||||
char *
|
|
||||||
rindex (s, c)
|
|
||||||
char *s;
|
|
||||||
{
|
|
||||||
char *strrchr ();
|
|
||||||
return strrchr (s, c);
|
|
||||||
}
|
|
||||||
#endif /* USG_UTILS. */
|
|
||||||
|
|
||||||
#if !defined (QUEUE_MISSING)
|
|
||||||
#define QUEUE_MISSING defined (USG)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if QUEUE_MISSING
|
|
||||||
/* Queue routines */
|
|
||||||
|
|
||||||
struct queue {
|
|
||||||
struct queue *forw;
|
|
||||||
struct queue *back;
|
|
||||||
};
|
|
||||||
|
|
||||||
insque (item, after)
|
|
||||||
struct queue *item;
|
|
||||||
struct queue *after;
|
|
||||||
{
|
|
||||||
item->forw = after->forw;
|
|
||||||
after->forw->back = item;
|
|
||||||
|
|
||||||
item->back = after;
|
|
||||||
after->forw = item;
|
|
||||||
}
|
|
||||||
|
|
||||||
remque (item)
|
|
||||||
struct queue *item;
|
|
||||||
{
|
|
||||||
item->forw->back = item->back;
|
|
||||||
item->back->forw = item->forw;
|
|
||||||
}
|
|
||||||
#endif /* QUEUE_MISSING */
|
|
||||||
|
|
||||||
#ifndef HAVE_STRSTR
|
|
||||||
/* Simple implementation of strstr, since some implementations lack it. */
|
|
||||||
const char *
|
|
||||||
strstr (in, find)
|
|
||||||
const char *in, *find;
|
|
||||||
{
|
|
||||||
register const char *p = in - 1;
|
|
||||||
|
|
||||||
while (0 != (p = strchr (p+1, *find))) {
|
|
||||||
if (strcmp (p, find))
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif /* do not HAVE_STRSTR */
|
|
||||||
|
|
||||||
void
|
void
|
||||||
_initialize_utils ()
|
_initialize_utils ()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user