List:Commits« Previous MessageNext Message »
From:Magnus Svensson Date:March 11 2009 12:11pm
Subject:bzr commit into mysql-5.1-telco-6.4 branch (msvensson:2929)
View as plain text  
#At file:///home/msvensson/mysql/6.4/ based on revid:msvensson@stripped

 2929 Magnus Svensson	2009-03-11
      my_daemon
       - move the my_dlog variable into local scope of my_daemon
       - remove the now unused DAEMON_EXPORT hack
      modified:
        storage/ndb/include/portlib/my_daemon.h
        storage/ndb/src/common/portlib/my_daemon.cc

=== modified file 'storage/ndb/include/portlib/my_daemon.h'
--- a/storage/ndb/include/portlib/my_daemon.h	2009-02-24 11:28:08 +0000
+++ b/storage/ndb/include/portlib/my_daemon.h	2009-03-11 12:11:05 +0000
@@ -16,10 +16,6 @@
 #ifndef MY_DAEMON_H
 #define MY_DAEMON_H
 
-#ifndef DAEMONEXPORT
-#define DAEMONEXPORT extern
-#endif
-
 C_MODE_START
 
 /*
@@ -97,15 +93,6 @@ int maybe_install_or_remove_service(int 
 #define MY_DAEMON_LONG_OPTS(prefix)
 #define MY_DAEMON_LONG_OPTS_PASTE(prefix)
 #endif
-/*
-   my_dlog is the log file created in daemon_files()
-*/
-DAEMONEXPORT FILE *my_dlog;
-/*
-  convenience macros -- mainly for debugging a service
-*/
-#define DLOG(x)    do{fprintf(my_dlog,"%s",x);fflush(my_dlog);}while(0)
-#define DLOG1(x,y) do{fprintf(my_dlog,x,y);fflush(my_dlog);}while(0)
 
 /*
    my_daemon_prefiles() checks that pidname and logname can be created

=== modified file 'storage/ndb/src/common/portlib/my_daemon.cc'
--- a/storage/ndb/src/common/portlib/my_daemon.cc	2009-03-11 11:08:49 +0000
+++ b/storage/ndb/src/common/portlib/my_daemon.cc	2009-03-11 12:11:05 +0000
@@ -20,7 +20,6 @@
 #include <my_global.h>
 #include <my_sys.h>
 #include <m_string.h>
-#define DAEMONEXPORT
 #include <my_daemon.h>
 
 #ifdef _WIN32
@@ -29,8 +28,14 @@ NTService g_ntsvc;
 HANDLE    g_shutdown_evt;
 #endif
 
+static FILE *my_dlog;
+
 static char *daemon_name;
 static long daemonpid;
+static int pidfd, logfd;
+
+static const char *pidfile, *logfile;
+
 
 static int ERR1(const char* fmt, ...)
   ATTRIBUTE_FORMAT(printf, 1, 2);
@@ -188,7 +193,7 @@ int my_daemon_install(const char *name, 
   return 0;
 }
 #endif
-static int pidfd, logfd;
+
 int daemon_closefiles()
 {
   close(pidfd);
@@ -196,7 +201,6 @@ int daemon_closefiles()
   return 0;
 }
 
-static const char *pidfile, *logfile;
 int my_daemon_prefiles(const char *pidfil, const char *logfil)
 {
   int n;

Thread
bzr commit into mysql-5.1-telco-6.4 branch (msvensson:2929)Magnus Svensson11 Mar