From: Robert Spalek Date: Mon, 3 Jun 2002 14:49:53 +0000 (+0000) Subject: __attribute__((const)) replaced by CONST X-Git-Tag: holmes-import~1408 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=603b9b2bce1af062e13b85c0d072f7f9894642c7;p=libucw.git __attribute__((const)) replaced by CONST --- diff --git a/lib/str-test.c b/lib/str-test.c index a8bd45e2..16cd9291 100644 --- a/lib/str-test.c +++ b/lib/str-test.c @@ -94,7 +94,7 @@ main(int argc, char **argv) random_string(str + alignment, lengths[i]); elapsed_time(); /* Avoid "optimizing" by gcc, since the functions are - * attributed as ((const)). */ + * attributed CONST. */ tot1 += strlen(str + alignment); el1 += elapsed_time(); tot2 += str_len(str + alignment); diff --git a/lib/str_hash.c b/lib/str_hash.c index 5b05db66..72dbb695 100644 --- a/lib/str_hash.c +++ b/lib/str_hash.c @@ -33,7 +33,7 @@ str_hash_init(void) } } -static inline uns str_len_uns(uns x) __attribute__((const)); +static inline uns str_len_uns(uns x) CONST; static inline uns str_len_uns(uns x) diff --git a/lib/str_hash.h b/lib/str_hash.h index 4020117a..fab340d2 100644 --- a/lib/str_hash.h +++ b/lib/str_hash.h @@ -11,13 +11,13 @@ #define ROL(x, bits) (((x) << (bits)) | ((x) >> (sizeof(uns)*8 - (bits)))) /* The following functions need str to be aligned to uns. */ -uns str_len_aligned(const char *str) __attribute__((const)); -uns str_hash_aligned(const char *str) __attribute__((const)); +uns str_len_aligned(const char *str) CONST; +uns str_hash_aligned(const char *str) CONST; #ifdef CPU_ALLOW_UNALIGNED #define str_len(str) str_len_aligned(str) #define str_hash(str) str_hash_aligned(str) #else -uns str_len(const char *str) __attribute__((const)); -uns str_hash(const char *str) __attribute__((const)); +uns str_len(const char *str) CONST; +uns str_hash(const char *str) CONST; #endif