From 769837bc0ae28324b0a793549e1a20036e42e2e5 Mon Sep 17 00:00:00 2001 From: Heikki Levanto Date: Fri, 10 Dec 2004 10:42:33 +0000 Subject: [PATCH 1/1] Deprecated yaz-util.h with a warinng in place. Re-enabled the warning in log.h Note: All these warings can be avoided with CFLAGS="-Wall -g -D YAZ_USE_OLD_LOG" ./configure --- include/yaz/log.h | 4 ++-- include/yaz/yaz-util.h | 19 ++++++++++++++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/include/yaz/log.h b/include/yaz/log.h index 916ce42..fb4561f 100644 --- a/include/yaz/log.h +++ b/include/yaz/log.h @@ -23,7 +23,7 @@ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. * - * $Id: log.h,v 1.26 2004-12-09 09:37:00 adam Exp $ + * $Id: log.h,v 1.27 2004-12-10 10:42:33 heikki Exp $ */ /** @@ -37,7 +37,7 @@ #include #ifndef YAZ_USE_OLD_LOG -/* #warning "use of log.h is deprecated, use ylog.h instead" */ +#warning "use of log.h is deprecated, use ylog.h instead" /* if this warning gets on your nerves, run configure like this: * CFLAGS="-Wall -g -D YAZ_USE_OLD_LOG" ./configure */ diff --git a/include/yaz/yaz-util.h b/include/yaz/yaz-util.h index b4b3207..aba53c0 100644 --- a/include/yaz/yaz-util.h +++ b/include/yaz/yaz-util.h @@ -23,7 +23,7 @@ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. * - * $Id: yaz-util.h,v 1.12 2004-12-08 09:06:06 adam Exp $ + * $Id: yaz-util.h,v 1.13 2004-12-10 10:42:33 heikki Exp $ */ /** * \file yaz-util.h @@ -36,7 +36,24 @@ #include #include #include + +/* [y]log.h trickery */ +/* if [y]log.h has been included, do not worry about it */ +/* else warn here, and make sure log.h does not warn */ + +#ifndef YLOG_H + +#ifndef YAZ_USE_OLD_LOG +#warning "yaz-util.h is deprecated - include the files directly, and use ylog.h" +/* If you get tired of this message, configure your program like this */ +/* CFLAGS="-Wall -g -D YAZ_USE_OLD_LOG" ./configure */ +#define YAZ_USE_OLD_LOG +/* do not complain of the old log.h */ +#endif + #include +#endif + #include #include #include -- 1.7.10.4