"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.
This commit is contained in:
nboullis
2004-11-15 19:41:25 +00:00
parent 7041233982
commit 74a383d80e

View File

@@ -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 <hvr@gnu.org>
Copyright (C) 2004 Rocky Bernstein <rocky@panix.com>
@@ -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
}