]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #1257: compile warnings due to pid_t not being an int
authorserassio <>
Sun, 13 Mar 2005 16:23:33 +0000 (16:23 +0000)
committerserassio <>
Sun, 13 Mar 2005 16:23:33 +0000 (16:23 +0000)
Forward port of 2.5 patch and added use of debugs() where applicable

helpers/ntlm_auth/SMB/ntlm.h
helpers/ntlm_auth/SMB/ntlm_auth.c
src/main.cc
src/tools.cc

index e839741d11d430c3ac01bbc2b42f918b25df44bd..e3d123f7fbfae6a8c0bbbdecf55e5f985d6faeb5 100644 (file)
@@ -53,7 +53,7 @@
 static char *__foo;
 extern char debug_enabled;
 #define debug(X...) if (debug_enabled) { \
-                    fprintf(stderr,"ntlm-auth[%d](%s:%d): ", getpid(), \
+                    fprintf(stderr,"ntlm-auth[%ld](%s:%d): ", (long)getpid(), \
                     ((__foo=strrchr(__FILE__,'/'))==NULL?__FILE__:__foo+1),\
                     __LINE__);\
                     fprintf(stderr,X); }
index a2126dd82c973837e9d481f6417e148e8752a041..8bd47060e7ef896e1339df7bf9d81bca3dd1eed7 100644 (file)
@@ -328,7 +328,7 @@ manage_request()
            alarm(0);
            signal(SIGALRM, SIG_DFL);
            if (got_timeout != 0) {
-               fprintf(stderr, "ntlm-auth[%d]: Timeout during authentication.\n", getpid());
+               fprintf(stderr, "ntlm-auth[%ld]: Timeout during authentication.\n", (long)getpid());
                SEND("BH Timeout during authentication");
                got_timeout = 0;
                return;
index c8a85159536127ef8e1e648dbee2933b08bf2f88..f230aa9e3b22a787ad7f4edd1a2dbd9f97af9542 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: main.cc,v 1.403 2005/01/08 10:09:31 serassio Exp $
+ * $Id: main.cc,v 1.404 2005/03/13 09:23:33 serassio Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -424,10 +424,10 @@ shut_down(int sig)
 #ifdef KILL_PARENT_OPT
 
     if (getppid() > 1) {
-        debug(1, 1) ("Killing RunCache, pid %d\n", getppid());
+        debugs(1, 1, "Killing RunCache, pid " << getppid());
 
         if (kill(getppid(), sig) < 0)
-            debug(1, 1) ("kill %d: %s\n", getppid(), xstrerror());
+            debugs(1, 1, "kill " << getppid() << ": " << xstrerror());
     }
 
 #endif
@@ -695,7 +695,7 @@ mainInitialize(void)
 
 #endif
 
-    debug(1, 1) ("Process ID %d\n", (int) getpid());
+    debugs(1, 1, "Process ID " << getpid());
 
     debug(1, 1) ("With %d file descriptors available\n", Squid_MaxFD);
 
index 135adbeb65ca17e1f5378256e4aaf0a38ba7a0c9..c336b74cbce580f86c56078448239ca784d84e17 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: tools.cc,v 1.251 2005/02/06 09:37:15 serassio Exp $
+ * $Id: tools.cc,v 1.252 2005/03/13 09:23:33 serassio Exp $
  *
  * DEBUG: section 21    Misc Functions
  * AUTHOR: Harvest Derived
@@ -640,7 +640,7 @@ uniqueHostname(void)
 void
 leave_suid(void)
 {
-    debug(21, 3) ("leave_suid: PID %d called\n", (int) getpid());
+    debugs(21, 3, "leave_suid: PID " << getpid() << " called");
 
     if (Config.effectiveGroup) {
 
@@ -662,8 +662,7 @@ leave_suid(void)
     if (Config.effectiveUser == NULL)
         return;
 
-    debug(21, 3) ("leave_suid: PID %d giving up root, becoming '%s'\n",
-                  (int) getpid(), Config.effectiveUser);
+    debugs(21, 3, "leave_suid: PID " << getpid() << " giving up root, becoming '" << Config.effectiveUser << "'");
 
     if (!Config.effectiveGroup) {
 
@@ -699,7 +698,7 @@ leave_suid(void)
 void
 enter_suid(void)
 {
-    debug(21, 3) ("enter_suid: PID %d taking root priveleges\n", (int) getpid());
+    debugs(21, 3, "enter_suid: PID " << getpid() << " taking root priveleges");
 #if HAVE_SETRESUID
 
     setresuid((uid_t)-1, 0, (uid_t)-1);
@@ -718,7 +717,7 @@ no_suid(void)
     uid_t uid;
     leave_suid();
     uid = geteuid();
-    debug(21, 3) ("leave_suid: PID %d giving up root priveleges forever\n", (int) getpid());
+    debugs(21, 3, "leave_suid: PID " << getpid() << " giving up root priveleges forever");
 #if HAVE_SETRESUID
 
     if (setresuid(uid, uid, uid) < 0)