summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorChristopher R. Hertel <crh@samba.org>1998-08-03 03:22:42 +0000
committerChristopher R. Hertel <crh@samba.org>1998-08-03 03:22:42 +0000
commitfeb16291aa1877818cc00a8ac54d9d68f5ab4559 (patch)
treeface78511b203b078a777c0b8a03efe1333b2464 /source3/lib
parent28900ea26ff1c8d41328bba30206db7fe91e2184 (diff)
downloadsamba-feb16291aa1877818cc00a8ac54d9d68f5ab4559.tar.gz
samba-feb16291aa1877818cc00a8ac54d9d68f5ab4559.tar.bz2
samba-feb16291aa1877818cc00a8ac54d9d68f5ab4559.zip
I have fixed some of the autoconfigure problems. I'm studying the diffs
for the rest. I've found that only debug.h seems to be out of sync (i.e., util.c itself appears to be okay). Chris -)----- (This used to be commit b41cdbffb7233f73ac15526f7b5499658256cd82)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/debug.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/source3/lib/debug.c b/source3/lib/debug.c
index 527ba05cd4..e85643f259 100644
--- a/source3/lib/debug.c
+++ b/source3/lib/debug.c
@@ -167,7 +167,7 @@ void setup_logging( char *pname, BOOL interactive )
stdout_logging = True;
dbf = stdout;
}
-#ifdef SYSLOG
+#ifdef WITH_SYSLOG
else
{
char *p = strrchr( pname,'/' );
@@ -278,7 +278,7 @@ static void check_log_size( void )
* This is called by dbghdr() and format_debug_text().
* ************************************************************************** **
*/
-#ifdef __STDC__
+#ifdef HAVE_STDARG_H
int Debug1( char *format_str, ... )
{
#else
@@ -292,7 +292,7 @@ va_dcl
if( stdout_logging )
{
-#ifdef __STDC__
+#ifdef HAVE_STDARG_H
va_start( ap, format_str );
#else
va_start( ap );
@@ -304,7 +304,7 @@ va_dcl
return( 0 );
}
-#ifdef SYSLOG
+#ifdef WITH_SYSLOG
if( !lp_syslog_only() )
#endif
{
@@ -329,7 +329,7 @@ va_dcl
}
}
-#ifdef SYSLOG
+#ifdef WITH_SYSLOG
if( syslog_level < lp_syslog() )
{
/* map debug levels to syslog() priorities
@@ -351,7 +351,7 @@ va_dcl
else
priority = priority_map[syslog_level];
-#ifdef __STDC__
+#ifdef HAVE_STDARG_H
va_start( ap, format_str );
#else
va_start( ap );
@@ -365,11 +365,11 @@ va_dcl
}
#endif
-#ifdef SYSLOG
+#ifdef WITH_SYSLOG
if( !lp_syslog_only() )
#endif
{
-#ifdef __STDC__
+#ifdef HAVE_STDARG_H
va_start( ap, format_str );
#else
va_start( ap );
@@ -476,6 +476,10 @@ BOOL dbghdr( int level, char *file, char *func, int line )
/* Set syslog_level. */
syslog_level = level;
+ /* Don't print a header if we're logging to stdout. */
+ if( stdout_logging )
+ return( True );
+
/* Print it all out at once. */
Debug1( "[%s, %d] %s%s%s(%d)\n",
timestring(), level, file, (*file)?":":"", func, line );
@@ -495,7 +499,7 @@ BOOL dbghdr( int level, char *file, char *func, int line )
*
* ************************************************************************** **
*/
-#ifdef __STDC__
+#ifdef HAVE_STDARG_H
BOOL dbgtext( char *format_str, ... )
{
va_list ap;