summaryrefslogtreecommitdiffstats
path: root/source3
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
commitbb2aa240de7da9a3b6a6d9749eb5fccf84a891be (patch)
tree0534470be57e927f48ea92f02736eebb6dab6647 /source3
parent8623ca6f82df2738f043bb4f344b050cd10281ed (diff)
downloadsamba-bb2aa240de7da9a3b6a6d9749eb5fccf84a891be.tar.gz
samba-bb2aa240de7da9a3b6a6d9749eb5fccf84a891be.tar.xz
samba-bb2aa240de7da9a3b6a6d9749eb5fccf84a891be.zip
Remove FILE_MACRO as __FILE__ is ANSI C.
(This used to be commit 2a9d183cf6ae8333dc7d9d9445c17dce005c1d24)
Diffstat (limited to 'source3')
-rw-r--r--source3/acconfig.h1
-rw-r--r--source3/configure.in7
-rw-r--r--source3/include/config.h.in6
-rw-r--r--source3/include/debug.h13
-rw-r--r--source3/include/smb_macros.h12
-rw-r--r--source3/sam/interface.c2
-rw-r--r--source3/smbd/build_options.c3
-rw-r--r--source3/web/cgi.c2
8 files changed, 13 insertions, 33 deletions
diff --git a/source3/acconfig.h b/source3/acconfig.h
index 7b055255715..97b1e85924c 100644
--- a/source3/acconfig.h
+++ b/source3/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/source3/configure.in b/source3/configure.in
index e44aa5a52f5..ee2997abe60 100644
--- a/source3/configure.in
+++ b/source3/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/source3/include/config.h.in b/source3/include/config.h.in
index 9a11ffa4f53..9441eba8e9a 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 5f87bf06fd9..d4f45539f45 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 4926026061d..71d4bac7952 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))
diff --git a/source3/sam/interface.c b/source3/sam/interface.c
index 6010bc6837d..d08df42122d 100644
--- a/source3/sam/interface.c
+++ b/source3/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/source3/smbd/build_options.c b/source3/smbd/build_options.c
index 8129f22898d..085f2874466 100644
--- a/source3/smbd/build_options.c
+++ b/source3/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/source3/web/cgi.c b/source3/web/cgi.c
index 50c0e75561a..96520c0eef9 100644
--- a/source3/web/cgi.c
+++ b/source3/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) {