From 74a383d80e00d3b4947789c94f4d663943240b03 Mon Sep 17 00:00:00 2001 From: nboullis Date: Mon, 15 Nov 2004 19:41:25 +0000 Subject: [PATCH] "static inline __attribute__((deprecated))" functions are not available in standard C; only use them with GCC 3 and above, and replace them with simple #defines for other compilers. --- include/cdio/util.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/cdio/util.h b/include/cdio/util.h index c5093b2a..a8b9edbe 100644 --- a/include/cdio/util.h +++ b/include/cdio/util.h @@ -1,5 +1,5 @@ /* - $Id: util.h,v 1.4 2004/11/15 01:34:09 rocky Exp $ + $Id: util.h,v 1.5 2004/11/15 19:41:25 nboullis Exp $ Copyright (C) 2000 Herbert Valerio Riedel Copyright (C) 2004 Rocky Bernstein @@ -105,6 +105,8 @@ _cdio_strsplit(const char str[], char delim); uint8_t cdio_to_bcd8(uint8_t n); uint8_t cdio_from_bcd8(uint8_t p); + +#if defined(__GNUC__) && __GNUC__ >= 3 static inline __attribute__((deprecated)) uint8_t to_bcd8(uint8_t n) { return cdio_to_bcd8(n); @@ -113,6 +115,10 @@ static inline __attribute__((deprecated)) uint8_t from_bcd8(uint8_t p) { return cdio_from_bcd8(p); } +#else +#define to_bcd8 cdio_to_bcd8 +#define from_bcd8 cdio_from_bcd8 +#endif #ifdef __cplusplus }