#ifndef lint
static char *rcsid_gdb_c = "$Header$";
-#endif lint
+#endif
/************************************************************************/
/************************************************************************/
#include <stdio.h>
-#include <strings.h>
+#include <string.h>
#include <signal.h>
#include <pwd.h>
#include "gdb.h"
#include <errno.h>
#ifdef POSIX
#include <sys/utsname.h>
+#include <unistd.h>
#endif
+#ifndef __NetBSD__
extern int sys_nerr;
extern char *sys_errlist[];
+#endif
extern int errno;
{
register int i;
char hostname[255]; /* name of local host */
- extern uid_t getuid();
int uid; /* Unix user-i.d. number */
- char *uname; /* string form of i.d. */
+ char *username; /* string form of i.d. */
struct passwd *pw_struct; /* passwd entry comes back */
/* here */
if (pw_struct != NULL && pw_struct ->pw_name != NULL &&
*pw_struct->pw_name !='\0')
- uname = pw_struct->pw_name;
+ username = pw_struct->pw_name;
else
- uname = "????";
- gdb_uname = db_alloc(strlen(uname)+1);
- (void) strcpy(gdb_uname, uname);
+ username = "????";
+ gdb_uname = db_alloc(strlen(username)+1);
+ (void) strcpy(gdb_uname, username);
return 0;
}
if(errno < sys_nerr)
fprintf(gdb_log, "%s.\n", sys_errlist[errno]);
else
- fprintf(gdb_log, "errno %d is out of range of message table.\n");
+ fprintf(gdb_log, "errno %d is out of range of message table.\n", errno);
}