diff options
author | Tim Potter <tpot@samba.org> | 2002-12-04 23:57:15 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2002-12-04 23:57:15 +0000 |
commit | bb2aa240de7da9a3b6a6d9749eb5fccf84a891be (patch) | |
tree | 0534470be57e927f48ea92f02736eebb6dab6647 /source3/include | |
parent | 8623ca6f82df2738f043bb4f344b050cd10281ed (diff) | |
download | samba-bb2aa240de7da9a3b6a6d9749eb5fccf84a891be.tar.gz samba-bb2aa240de7da9a3b6a6d9749eb5fccf84a891be.tar.bz2 samba-bb2aa240de7da9a3b6a6d9749eb5fccf84a891be.zip |
Remove FILE_MACRO as __FILE__ is ANSI C.
(This used to be commit 2a9d183cf6ae8333dc7d9d9445c17dce005c1d24)
Diffstat (limited to 'source3/include')
-rw-r--r-- | source3/include/config.h.in | 6 | ||||
-rw-r--r-- | source3/include/debug.h | 13 | ||||
-rw-r--r-- | source3/include/smb_macros.h | 12 |
3 files changed, 11 insertions, 20 deletions
diff --git a/source3/include/config.h.in b/source3/include/config.h.in index 9a11ffa4f5..9441eba8e9 100644 --- a/source3/include/config.h.in +++ b/source3/include/config.h.in @@ -1,4 +1,4 @@ -/* include/config.h.in. Generated automatically from configure.in by autoheader. */ +/* include/config.h.in. Generated automatically from configure.in by autoheader 2.13. */ /* Define if type char is unsigned and you are not using gcc. */ #ifndef __CHAR_UNSIGNED__ @@ -125,7 +125,6 @@ #undef HAVE_BROKEN_GETGROUPS #undef REPLACE_GETPASS #undef REPLACE_INET_NTOA -#undef HAVE_FILE_MACRO #undef HAVE_FUNCTION_MACRO #undef HAVE_VA_COPY #undef HAVE_SETRESUID_DECL @@ -1431,9 +1430,6 @@ /* Whether seekdir returns void */ #undef SEEKDIR_RETURNS_VOID -/* Whether there is a __FILE__ macro */ -#undef HAVE_FILE_MACRO - /* Whether there is a __FUNCTION__ macro */ #undef HAVE_FUNCTION_MACRO diff --git a/source3/include/debug.h b/source3/include/debug.h index 5f87bf06fd..d4f45539f4 100644 --- a/source3/include/debug.h +++ b/source3/include/debug.h @@ -44,11 +44,6 @@ extern XFILE *dbf; extern pstring debugf; /* If we have these macros, we can add additional info to the header. */ -#ifdef HAVE_FILE_MACRO -#define FILE_MACRO (__FILE__) -#else -#define FILE_MACRO ("") -#endif #ifdef HAVE_FUNCTION_MACRO #define FUNCTION_MACRO (__FUNCTION__) @@ -157,7 +152,7 @@ extern BOOL *DEBUGLEVEL_CLASS_ISSET; ((DEBUGLEVEL_CLASS[ DBGC_CLASS ] >= (level))|| \ (!DEBUGLEVEL_CLASS_ISSET[ DBGC_CLASS ] && \ DEBUGLEVEL_CLASS[ DBGC_ALL ] >= (level)) ) \ - && dbghdr( level, FILE_MACRO, FUNCTION_MACRO, (__LINE__) ) ) + && dbghdr( level, __FILE__, FUNCTION_MACRO, (__LINE__) ) ) #define DEBUGLVLC( dbgc_class, level ) \ @@ -165,7 +160,7 @@ extern BOOL *DEBUGLEVEL_CLASS_ISSET; ((DEBUGLEVEL_CLASS[ dbgc_class ] >= (level))|| \ (!DEBUGLEVEL_CLASS_ISSET[ dbgc_class ] && \ DEBUGLEVEL_CLASS[ DBGC_ALL ] >= (level)) ) \ - && dbghdr( level, FILE_MACRO, FUNCTION_MACRO, (__LINE__) ) ) + && dbghdr( level, __FILE__, FUNCTION_MACRO, (__LINE__) ) ) #define DEBUG( level, body ) \ @@ -173,7 +168,7 @@ extern BOOL *DEBUGLEVEL_CLASS_ISSET; ((DEBUGLEVEL_CLASS[ DBGC_CLASS ] >= (level))|| \ (!DEBUGLEVEL_CLASS_ISSET[ DBGC_CLASS ] && \ DEBUGLEVEL_CLASS[ DBGC_ALL ] >= (level)) ) \ - && (dbghdr( level, FILE_MACRO, FUNCTION_MACRO, (__LINE__) )) \ + && (dbghdr( level, __FILE__, FUNCTION_MACRO, (__LINE__) )) \ && (dbgtext body) ) #define DEBUGC( dbgc_class, level, body ) \ @@ -181,7 +176,7 @@ extern BOOL *DEBUGLEVEL_CLASS_ISSET; ((DEBUGLEVEL_CLASS[ dbgc_class ] >= (level))|| \ (!DEBUGLEVEL_CLASS_ISSET[ dbgc_class ] && \ DEBUGLEVEL_CLASS[ DBGC_ALL ] >= (level)) ) \ - && (dbghdr( level, FILE_MACRO, FUNCTION_MACRO, (__LINE__) )) \ + && (dbghdr( level, __FILE__, FUNCTION_MACRO, (__LINE__) )) \ && (dbgtext body) ) #define DEBUGADD( level, body ) \ diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h index 4926026061..71d4bac795 100644 --- a/source3/include/smb_macros.h +++ b/source3/include/smb_macros.h @@ -69,7 +69,7 @@ /* assert macros */ #define SMB_ASSERT(b) ((b)?(void)0: \ (DEBUG(0,("PANIC: assert failed at %s(%d)\n", \ - FILE_MACRO, __LINE__)), smb_panic("assert failed"))) + __FILE__, __LINE__)), smb_panic("assert failed"))) #define SMB_ASSERT_ARRAY(a,n) SMB_ASSERT((sizeof(a)/sizeof((a)[0])) >= (n)) /* these are useful macros for checking validity of handles */ @@ -156,17 +156,17 @@ #define HAS_CACHED_ERROR(fsp) ((fsp)->wbmpx_ptr && \ (fsp)->wbmpx_ptr->wr_discard) /* Macro to turn the cached error into an error packet */ -#define CACHED_ERROR(fsp) cached_error_packet(outbuf,fsp,__LINE__,FILE_MACRO) +#define CACHED_ERROR(fsp) cached_error_packet(outbuf,fsp,__LINE__,__FILE__) /* these are the datagram types */ #define DGRAM_DIRECT_UNIQUE 0x10 -#define ERROR_DOS(class,code) error_packet(outbuf,NT_STATUS_OK,class,code,__LINE__,FILE_MACRO) -#define ERROR_NT(status) error_packet(outbuf,status,0,0,__LINE__,FILE_MACRO) -#define ERROR_BOTH(status,class,code) error_packet(outbuf,status,class,code,__LINE__,FILE_MACRO) +#define ERROR_DOS(class,code) error_packet(outbuf,NT_STATUS_OK,class,code,__LINE__,__FILE__) +#define ERROR_NT(status) error_packet(outbuf,status,0,0,__LINE__,__FILE__) +#define ERROR_BOTH(status,class,code) error_packet(outbuf,status,class,code,__LINE__,__FILE__) /* this is how errors are generated */ -#define UNIXERROR(defclass,deferror) unix_error_packet(outbuf,defclass,deferror,__LINE__,FILE_MACRO) +#define UNIXERROR(defclass,deferror) unix_error_packet(outbuf,defclass,deferror,__LINE__,__FILE__) #define SMB_ROUNDUP(x,r) ( ((x)%(r)) ? ( (((x)+(r))/(r))*(r) ) : (x)) |