/* Define to 1 if you have the `tsearch' function. */
#undef HAVE_TSEARCH
+/* Defind to 1 if compiler has typeof */
+#undef HAVE_TYPEOF
+
/* Define to 1 if you don't have `tm_zone' but do have the external array
`tzname'. */
#undef HAVE_TZNAME
[ba_cv_bigendian=no])])
test $ba_cv_bigendian = yes && AC_DEFINE(HAVE_BIGENDIAN)
+dnl# --------------------------------------------------------------------------
+dnl# Check for typeof()
+dnl# --------------------------------------------------------------------------
+AC_LANG_PUSH(C++)
+AC_CACHE_CHECK(for typeof, ba_cv_have_typeof,
+ [AC_TRY_RUN(
+ [main(){char *a = 0; a = (typeof a)a;}],
+ [ba_cv_have_typeof=yes],
+ [ba_cv_have_typeof=no],
+ [ba_cv_have_typeof=no])])
+test $ba_cv_have_typeof = yes && AC_DEFINE([HAVE_TYPEOF], 1, [Defind to 1 if compiler has typeof])
+AC_LANG_POP(C++)
AC_C_CONST
_ACEOF
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+
+echo "$as_me:$LINENO: checking for typeof" >&5
+echo $ECHO_N "checking for typeof... $ECHO_C" >&6
+if test "${ba_cv_have_typeof+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test "$cross_compiling" = yes; then
+ ba_cv_have_typeof=no
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+main(){char *a = 0; a = (typeof a)a;}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ba_cv_have_typeof=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ba_cv_have_typeof=no
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+echo "$as_me:$LINENO: result: $ba_cv_have_typeof" >&5
+echo "${ECHO_T}$ba_cv_have_typeof" >&6
+test $ba_cv_have_typeof = yes &&
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TYPEOF 1
+_ACEOF
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
Kern Sibbald
General:
+01Jun06
+- Implement partial error messages for src/filed/acl.c
+- Fix return code to fail when doing update barcodes and
+ Pool resource is not found. This previously caused Volumes
+ to be labeled as cleaning tapes.
+- Small updates to projects file.
+26May06
+- Prevent DVD code from rewriting label if the device cannot be
+ opened read/write.
+- Used __GNUC__ to detect GNU g++ as suggested by John Goerzen to
+ fix Debian build bug.
+- Fix Dir/SD run race in migrate.c, verify.c, and restore.c
+- Update projects file.
+24May06
+- Applied patch posted by Jaime Ventura to bug #570 to correct failure
+ of restarted jobs to complete (due to a destroyed pthreads conditional
+ variable used by the message thread).
+- Fixed bug #619 where Bacula would not restart jobs with MaxRestartTimes
+ set to zero.
+- Apply patch from John Goerzen bug #611 to fix bad manual links in the code.
+- Apply patch from Rudolf Cejka bug #614 to removed trailing
+ colons in query.sql file.
+- Apply patch from Rudolf Cejka bug #613 to correct prunning of files
+ not to create orphans.
+- Apply patch from Rudolf Cejka bug #617 to use mtime instead of ctime
+ in restore long listing.
+- Apply patch from Rudolf Cejka bug #609 to use MarkId in verify.c instead
+ of incorrect MarkedId.
+- Apply patch from adioso bug #616 to correct text in manual (replace
+ Director with File daemon).
+21May06
+- Move DIR "run" command to SD before starting the message thread
+ as suggested by Cristopher Hull to avoid a race deadlock from
+ two threads using the bsock structure.
+- Modify LICENSE to correct some problems pointed out by Debian.
+05May06
+- Correct EOF with no \n lex.c problem.
+- Add additional INFO messages if autochanger cannot be used.
+- Add Eric Bollengier's lex error handler fix, which corrects most
+ of the reload problems.
+
+Release 1.38.9 (02May06) released 02MayO6
+02May06
+- Added code to strip backslashes from Windows filenames during
+ a restore.
+- Corrected Win32 License to use the correct LICENSE file.
+- Corrected the buffer count and bytes reported in the heap
+ statistics.
26Apr06
- Implement an NT_() macro to indicate that text should NOT
be translated.
- Fix copyright date and URL typo -- bug #468.
- Change autostart install for FreeBSD to look for rc.conf
rather than rc.local as suggested fix for bug #466.
-- Apply patch supplied by Eric Bollengier to fix PostgreSQL
+- Apply patch supplied by Eric Bollinger to fix PostgreSQL
grant on status. Bug #465
-- Apply patch supplied by Eric Bollengier to fix PostgreSQL
+- Apply patch supplied by Eric Bollinger to fix PostgreSQL
update script. Bug #464
- Fix off by one for last Slot of autochanger for label.
- Update release date.
Kern Sibbald
General:
+04Jun06
+- Modify configure.in to check for typeof().
+- In findlib/attribs.c use typeof instead of templates if possible.
01Jun06
- Implement partial error messages for src/filed/acl.c
- Fix return code to fail when doing update barcodes and
- Correct EOF with no \n lex.c problem.
- Tweak compat.h compat.cpp and merge with apcupsd
- Add additional INFO messages if autochanger cannot be used.
+
02May06
- Simplify Win32 Makefile
- Correct count of buffers/bytes used by smartall.c
/* Do casting according to unknown type to keep compiler happy */
-#if !HAVE_GCC & HAVE_SUN_OS
-#define plug(st, val) st = val /* brain damaged compiler */
+#ifdef HAVE_TYPEOF
+ #define plug(st, val) st = (typeof st)val
#else
-template <class T> void plug(T &st, uint64_t val)
- { st = static_cast<T>(val); }
+ #if !HAVE_GCC & HAVE_SUN_OS
+ /* Sun compiler does not handle templates correctly */
+ #define plug(st, val) st = val
+ #else
+ /* Use templates to do the casting */
+ template <class T> void plug(T &st, uint64_t val)
+ { st = static_cast<T>(val); }
+ #endif
#endif
-
/* Decode a stat packet from base64 characters */
int decode_stat(char *buf, struct stat *statp, int32_t *LinkFI)
{
*
* Loop var through each member of list
*/
-#if defined(__GNUC__)
+#ifdef HAVE_TYPEOF
#define foreach_alist(var, list) \
for((var)=(typeof(var))(list)->first(); (var); (var)=(typeof(var))(list)->next() )
#else
*
* Loop var through each member of list
*/
-#if defined(__GNUC__)
+#ifdef HAVE_TYPEOF
#define foreach_dlist(var, list) \
for((var)=NULL; ((var)=(typeof(var))(list)->next(var)); )
#else
const char *res_to_str(int rcode);
/* Loop through each resource of type, returning in var */
-#if defined(__GNUC__)
+#ifdef HAVE_TYPEOF
#define foreach_res(var, type) \
for((var)=NULL; ((var)=(typeof(var))GetNextRes((type), (RES *)var));)
#else