]> andersk Git - moira.git/blobdiff - gdb/gdb.c
Since pr_ChangeEntry() already checks to see if the id's aren't changing,
[moira.git] / gdb / gdb.c
index d53e8faf05dd74d44247f3fa61ab04d55545a235..e38f7e9464bb25ea471e61e92a869da419b30205 100644 (file)
--- a/gdb/gdb.c
+++ b/gdb/gdb.c
@@ -40,6 +40,10 @@ extern char *sys_errlist[];
 
 extern int errno;
 
+/* This global is defined to make sure that Moira clients are linked
+ * against the correct library.
+ */
+int link_against_the_moira_version_of_gdb = 0;
 int g_inited = FALSE;                          /* gdb_init has not been */
                                                /* called */
 
@@ -92,11 +96,9 @@ gdb_init()
         */
        gdb_mfd = 0;
 
-       for (i=0; i<NFDBITS/sizeof(int); i++) {
-               gdb_crfds.fds_bits[i] = 0;
-               gdb_cwfds.fds_bits[i] = 0;
-               gdb_cefds.fds_bits[i] = 0;
-       }
+       FD_ZERO(&gdb_crfds);
+       FD_ZERO(&gdb_cwfds);
+       FD_ZERO(&gdb_cefds);
 
        /*
         * Initialize the server/client layer
@@ -127,7 +129,7 @@ gdb_init()
                uname = pw_struct->pw_name;
        else
                uname = "????";
-       gdb_uname = db_alloc(strlen(hostname)+1);
+       gdb_uname = db_alloc(strlen(uname)+1);
        (void) strcpy(gdb_uname, uname);        
        
        return 0;
This page took 0.035883 seconds and 4 git commands to generate.