From d5ee9b2f480ddbda0b8f69409698d27c99384f9c Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 18 Mar 2003 11:22:52 +0000 Subject: Jeremy merged across my string parinoia fixes, but forgot to enable them! :-) This patch catches up on the rest of the work - as much string checking as is possible is done at compile time, and the rest at runtime. Lots of code converted to pstrcpy() etc, and other code reworked to correctly call sizeof(). Andrew Bartlett (This used to be commit c5b604e2ee67d74241ae2fa07ae904647d35a2be) --- source3/configure.in | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'source3/configure.in') diff --git a/source3/configure.in b/source3/configure.in index 69c001f59b..bc86473428 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -656,6 +656,24 @@ if test x"$samba_cv_immediate_structures" = x"yes"; then AC_DEFINE(HAVE_IMMEDIATE_STRUCTURES,1,[Whether the compiler supports immediate structures]) fi +############################################ +# check if the compiler can do immediate structures +AC_CACHE_CHECK([if the compiler will optimize out function calls],samba_cv_optimize_out_funcation_calls, [ + AC_TRY_LINK([ +#include ], +[ + if (0) { + this_function_does_not_exist(); + } else { + return 1; + } + +], + samba_cv_optimize_out_funcation_calls=yes,samba_cv_optimize_out_funcation_calls=no)]) +if test x"$samba_cv_optimize_out_funcation_calls" = x"yes"; then + AC_DEFINE(HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS,1,[Whether the compiler will optimize out function calls]) +fi + ############################################ # check for unix domain sockets AC_CACHE_CHECK([for unix domain sockets],samba_cv_unixsocket, [ -- cgit