summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2002-12-04 23:57:15 +0000
committerTim Potter <tpot@samba.org>2002-12-04 23:57:15 +0000
commit2a9d183cf6ae8333dc7d9d9445c17dce005c1d24 (patch)
treec8072c061c4b528d9feb4c49126a17b8f717effd
parent739285ff694e9ffd317ad47aec373e2007c20f45 (diff)
downloadsamba-2a9d183cf6ae8333dc7d9d9445c17dce005c1d24.tar.gz
Remove FILE_MACRO as __FILE__ is ANSI C.
-rw-r--r--source/acconfig.h1
-rw-r--r--source/configure.in7
-rw-r--r--source/include/config.h.in6
-rw-r--r--source/include/debug.h13
-rw-r--r--source/include/smb_macros.h12
-rw-r--r--source/sam/interface.c2
-rw-r--r--source/smbd/build_options.c3
-rw-r--r--source/web/cgi.c2
8 files changed, 13 insertions, 33 deletions
diff --git a/source/acconfig.h b/source/acconfig.h
index 7b055255715..97b1e85924c 100644
--- a/source/acconfig.h
+++ b/source/acconfig.h
@@ -69,7 +69,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
diff --git a/source/configure.in b/source/configure.in
index e44aa5a52f5..ee2997abe60 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -1188,13 +1188,6 @@ if test x"$samba_cv_SEEKDIR_RETURNS_VOID" = x"yes"; then
AC_DEFINE(SEEKDIR_RETURNS_VOID,1,[Whether seekdir returns void])
fi
-AC_CACHE_CHECK([for __FILE__ macro],samba_cv_HAVE_FILE_MACRO,[
-AC_TRY_COMPILE([#include <stdio.h>], [printf("%s\n", __FILE__);],
-samba_cv_HAVE_FILE_MACRO=yes,samba_cv_HAVE_FILE_MACRO=no)])
-if test x"$samba_cv_HAVE_FILE_MACRO" = x"yes"; then
- AC_DEFINE(HAVE_FILE_MACRO,1,[Whether there is a __FILE__ macro])
-fi
-
AC_CACHE_CHECK([for __FUNCTION__ macro],samba_cv_HAVE_FUNCTION_MACRO,[
AC_TRY_COMPILE([#include <stdio.h>], [printf("%s\n", __FUNCTION__);],
samba_cv_HAVE_FUNCTION_MACRO=yes,samba_cv_HAVE_FUNCTION_MACRO=no)])
diff --git a/source/include/config.h.in b/source/include/config.h.in
index 9a11ffa4f53..9441eba8e9a 100644
--- a/source/include/config.h.in
+++ b/source/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/source/include/debug.h b/source/include/debug.h
index 5f87bf06fd9..d4f45539f45 100644
--- a/source/include/debug.h
+++ b/source/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/source/include/smb_macros.h b/source/include/smb_macros.h
index 4926026061d..71d4bac7952 100644
--- a/source/include/smb_macros.h
+++ b/source/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))
diff --git a/source/sam/interface.c b/source/sam/interface.c
index 6010bc6837d..d08df42122d 100644
--- a/source/sam/interface.c
+++ b/source/sam/interface.c
@@ -170,7 +170,7 @@ static NTSTATUS make_backend_entry(SAM_BACKEND_ENTRY *backend_entry, char *sam_b
if (!secrets_fetch_domain_sid(backend_entry->domain_name, backend_entry->domain_sid)) {
DEBUG(2,("make_backend_entry: There is no SID stored for domain %s. Creating a new one.\n",
backend_entry->domain_name));
- DEBUG(0, ("FIXME in %s:%d\n", FILE_MACRO, __LINE__));
+ DEBUG(0, ("FIXME in %s:%d\n", __FILE__, __LINE__));
ZERO_STRUCTP(backend_entry->domain_sid);
}
diff --git a/source/smbd/build_options.c b/source/smbd/build_options.c
index 8129f22898d..085f2874466 100644
--- a/source/smbd/build_options.c
+++ b/source/smbd/build_options.c
@@ -294,9 +294,6 @@ void build_options(BOOL screen)
#ifdef SEEKDIR_RETURNS_VOID
output(screen," SEEKDIR_RETURNS_VOID\n");
#endif
-#ifdef HAVE_FILE_MACRO
- output(screen," HAVE_FILE_MACRO\n");
-#endif
#ifdef HAVE_FUNCTION_MACRO
output(screen," HAVE_FUNCTION_MACRO\n");
#endif
diff --git a/source/web/cgi.c b/source/web/cgi.c
index 50c0e75561a..96520c0eef9 100644
--- a/source/web/cgi.c
+++ b/source/web/cgi.c
@@ -100,7 +100,7 @@ void cgi_load_variables(void)
#ifdef DEBUG_COMMENTS
char dummy[100]="";
print_title(dummy);
- d_printf("<!== Start dump in cgi_load_variables() %s ==>\n",FILE_MACRO);
+ d_printf("<!== Start dump in cgi_load_variables() %s ==>\n",__FILE__);
#endif
if (!content_length) {