From 197ebc145feafd8d618348ca0913b3f9f989e88d Mon Sep 17 00:00:00 2001 From: ballen4705 <ballen4705@4ea69e1a-61f1-4043-bf83-b5c94c648137> Date: Sun, 22 Oct 2006 11:50:47 +0000 Subject: [PATCH] Linux s86_64: get rid of some compiler warnings on x86_64 Linux systems. git-svn-id: https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk@2300 4ea69e1a-61f1-4043-bf83-b5c94c648137 --- sm5/CHANGELOG | 5 ++++- sm5/configure.in | 8 ++++++-- sm5/int64.h | 12 +++++++++++- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/sm5/CHANGELOG b/sm5/CHANGELOG index 799e31e9a..12debfa32 100644 --- a/sm5/CHANGELOG +++ b/sm5/CHANGELOG @@ -1,6 +1,6 @@ CHANGELOG for smartmontools -$Id: CHANGELOG,v 1.576 2006/10/20 21:56:03 chrfranke Exp $ +$Id: CHANGELOG,v 1.577 2006/10/22 11:50:47 ballen4705 Exp $ The most recent version of this file is: http://smartmontools.cvs.sourceforge.net/smartmontools/sm5/CHANGELOG?view=markup @@ -33,6 +33,9 @@ NOTES FOR FUTURE RELEASES: see TODO file. <DEVELOPERS: ADDITIONS TO THE CHANGE LOG GO JUST BELOW HERE, PLEASE> + [BA] Linux s86_64: get rid of some compiler warnings on + x86_64 Linux systems. + [CF] Windows: Added missing support for READ_LOG, ABORT_SELFTEST and CHECK_POWER_STATE for 3ware 9000 controllers. Thanks to Greg de Valois for implementing this new ioctl in the driver. diff --git a/sm5/configure.in b/sm5/configure.in index a6c30dc19..12684de1c 100644 --- a/sm5/configure.in +++ b/sm5/configure.in @@ -1,5 +1,5 @@ # -# $Id: configure.in,v 1.118 2006/08/12 05:41:13 card_captor Exp $ +# $Id: configure.in,v 1.119 2006/10/22 11:50:47 ballen4705 Exp $ # dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.50) @@ -7,7 +7,7 @@ AC_INIT(smartmontools, 5.37, smartmontools-support@lists.sourceforge.net) AC_CONFIG_SRCDIR(smartctl.cpp) smartmontools_configure_date=`date -u +"%Y/%m/%d %T %Z"` -smartmontools_cvs_tag=`echo '$Id: configure.in,v 1.118 2006/08/12 05:41:13 card_captor Exp $'` +smartmontools_cvs_tag=`echo '$Id: configure.in,v 1.119 2006/10/22 11:50:47 ballen4705 Exp $'` smartmontools_release_date=2006/04/12 smartmontools_release_time="17:39:01 UTC" @@ -127,6 +127,10 @@ AC_SUBST(smartmontools_release_time) dnl if OS not recognized, then use the os_generic modules case "${host}" in + x86_64-*-linux-gnu*) + AC_DEFINE_UNQUOTED(LINUX_X86_64, 1, [this is an x86_64 Linux system]) + AC_SUBST([os_deps], ['os_linux.o']) + AC_SUBST([os_libs], ['']) ;; *-*-linux-gnu*) AC_SUBST([os_deps], ['os_linux.o']) AC_SUBST([os_libs], ['']) ;; diff --git a/sm5/int64.h b/sm5/int64.h index 64aa28dc8..00ca3b57e 100644 --- a/sm5/int64.h +++ b/sm5/int64.h @@ -20,7 +20,7 @@ #ifndef INT64_H_ #define INT64_H_ -#define INT64_H_CVSID "$Id: int64.h,v 1.13 2006/04/12 14:54:28 ballen4705 Exp $\n" +#define INT64_H_CVSID "$Id: int64.h,v 1.14 2006/10/22 11:50:47 ballen4705 Exp $\n" // 64 bit integer typedefs @@ -65,6 +65,16 @@ typedef unsigned long long uint64_t; #define PRIx64 "I64x" #endif // _WIN32 && _MSC_VER +#ifdef LINUX_X86_64 +// For Linux x86_64 +#undef PRId64 +#undef PRIu64 +#undef PRIx64 +#define PRId64 "ld" +#define PRIu64 "lu" +#define PRIx64 "lx" +#endif + // If macros not defined in inttypes.h, fix here. Default is GCC // style #ifndef PRId64 -- GitLab