Remove /usr/lib/elf from a default search path.
Move xprintf to malloc.c, it is only used there. Make static. Submitted by: phantom
This commit is contained in:
parent
091aeb5c3c
commit
d38a104b75
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=110801
@ -147,7 +147,7 @@ botch(s)
|
||||
#endif
|
||||
|
||||
/* Debugging stuff */
|
||||
extern void xprintf(const char *, ...);
|
||||
static void xprintf(const char *, ...);
|
||||
#define TRACE() xprintf("TRACE %s:%d\n", __FILE__, __LINE__)
|
||||
|
||||
void *
|
||||
@ -483,3 +483,18 @@ int n;
|
||||
#endif
|
||||
return n;
|
||||
}
|
||||
|
||||
/*
|
||||
* Non-mallocing printf, for use by malloc itself.
|
||||
*/
|
||||
static void
|
||||
xprintf(const char *fmt, ...)
|
||||
{
|
||||
char buf[256];
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
vsprintf(buf, fmt, ap);
|
||||
(void)write(STDOUT_FILENO, buf, strlen(buf));
|
||||
va_end(ap);
|
||||
}
|
||||
|
@ -118,7 +118,6 @@ static void unload_object(Obj_Entry *);
|
||||
static void unref_dag(Obj_Entry *);
|
||||
|
||||
void r_debug_state(struct r_debug*, struct link_map*);
|
||||
void xprintf(const char *, ...) __printflike(1, 2);
|
||||
|
||||
/*
|
||||
* Data declarations.
|
||||
@ -2172,19 +2171,3 @@ unref_dag(Obj_Entry *root)
|
||||
objlist_remove(&elm->obj->dldags, root);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Non-mallocing printf, for use by malloc itself.
|
||||
* XXX - This doesn't belong in this module.
|
||||
*/
|
||||
void
|
||||
xprintf(const char *fmt, ...)
|
||||
{
|
||||
char buf[256];
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
vsprintf(buf, fmt, ap);
|
||||
(void)write(STDOUT_FILENO, buf, strlen(buf));
|
||||
va_end(ap);
|
||||
}
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include "rtld_machdep.h"
|
||||
|
||||
#ifndef STANDARD_LIBRARY_PATH
|
||||
#define STANDARD_LIBRARY_PATH "/usr/lib/elf:/usr/lib"
|
||||
#define STANDARD_LIBRARY_PATH "/usr/lib"
|
||||
#endif
|
||||
|
||||
#define NEW(type) ((type *) xmalloc(sizeof(type)))
|
||||
|
Loading…
Reference in New Issue
Block a user