]> andersk Git - moira.git/blobdiff - gdb/gdb.c
don't flame about being unable to delete filesystem if the `propagate
[moira.git] / gdb / gdb.c
index b1bebbbf1cf61a32b441545d965a199b1e46205b..27c62b202f83d6874e28227ab650b659bd489754 100644 (file)
--- a/gdb/gdb.c
+++ b/gdb/gdb.c
@@ -5,7 +5,7 @@
 
 #ifndef lint
 static char *rcsid_gdb_c = "$Header$";
-#endif lint
+#endif
 
 
 /************************************************************************/
@@ -28,7 +28,7 @@ static char *rcsid_gdb_c = "$Header$";
 /************************************************************************/
 
 #include <stdio.h>
-#include <strings.h>
+#include <string.h>
 #include <signal.h> 
 #include <pwd.h>
 #include "gdb.h"
@@ -36,10 +36,13 @@ static char *rcsid_gdb_c = "$Header$";
 #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;
 
@@ -66,9 +69,8 @@ gdb_init()
 {
        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 */
@@ -147,11 +149,11 @@ gdb_init()
 
        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;
 }
@@ -267,6 +269,6 @@ char *msg;
        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);
 }
 
This page took 0.039571 seconds and 4 git commands to generate.