* 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 $
*/
/**
#include <yaz/ylog.h>
#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
*/
* 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
#include <yaz/yconfig.h>
#include <yaz/yaz-version.h>
#include <yaz/xmalloc.h>
+
+/* [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 <yaz/log.h>
+#endif
+
#include <yaz/tpath.h>
#include <yaz/options.h>
#include <yaz/wrbuf.h>