Module Name:    src
Committed By:   joerg
Date:           Mon Jul 20 18:45:27 UTC 2009

Modified Files:
        src/sys/sys: bswap.h endian.h

Log Message:
Use __constfunc instead of __attribute__((__const__)).


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/sys/bswap.h
cvs rdiff -u -r1.26 -r1.27 src/sys/sys/endian.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/bswap.h
diff -u src/sys/sys/bswap.h:1.14 src/sys/sys/bswap.h:1.15
--- src/sys/sys/bswap.h:1.14	Fri Jun 19 15:24:17 2009
+++ src/sys/sys/bswap.h	Mon Jul 20 18:45:27 2009
@@ -1,4 +1,4 @@
-/*      $NetBSD: bswap.h,v 1.14 2009/06/19 15:24:17 christos Exp $      */
+/*      $NetBSD: bswap.h,v 1.15 2009/07/20 18:45:27 joerg Exp $      */
 
 /* Written by Manuel Bouyer. Public domain */
 
@@ -14,13 +14,13 @@
 __BEGIN_DECLS
 /* Always declare the functions in case their address is taken (etc) */
 #if defined(_KERNEL) || defined(_STANDALONE) || !defined(__BSWAP_RENAME)
-uint16_t bswap16(uint16_t) __attribute__((__const__));
-uint32_t bswap32(uint32_t) __attribute__((__const__));
+uint16_t bswap16(uint16_t) __constfunc;
+uint32_t bswap32(uint32_t) __constfunc;
 #else
-uint16_t bswap16(uint16_t) __RENAME(__bswap16) __attribute__((__const__));
-uint32_t bswap32(uint32_t) __RENAME(__bswap32) __attribute__((__const__));
+uint16_t bswap16(uint16_t) __RENAME(__bswap16) __constfunc;
+uint32_t bswap32(uint32_t) __RENAME(__bswap32) __constfunc;
 #endif
-uint64_t bswap64(uint64_t) __attribute__((__const__));
+uint64_t bswap64(uint64_t) __constfunc;
 __END_DECLS
 
 #if defined(__GNUC__) && defined(__OPTIMIZE__) && !defined(__lint__)

Index: src/sys/sys/endian.h
diff -u src/sys/sys/endian.h:1.26 src/sys/sys/endian.h:1.27
--- src/sys/sys/endian.h:1.26	Fri Jul 20 15:07:15 2007
+++ src/sys/sys/endian.h	Mon Jul 20 18:45:27 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: endian.h,v 1.26 2007/07/20 15:07:15 christos Exp $	*/
+/*	$NetBSD: endian.h,v 1.27 2009/07/20 18:45:27 joerg Exp $	*/
 
 /*
  * Copyright (c) 1987, 1991, 1993
@@ -65,10 +65,10 @@
 #endif
 
 __BEGIN_DECLS
-uint32_t htonl(uint32_t) __attribute__((__const__));
-uint16_t htons(uint16_t) __attribute__((__const__));
-uint32_t ntohl(uint32_t) __attribute__((__const__));
-uint16_t ntohs(uint16_t) __attribute__((__const__));
+uint32_t htonl(uint32_t) __constfunc;
+uint16_t htons(uint16_t) __constfunc;
+uint32_t ntohl(uint32_t) __constfunc;
+uint16_t ntohs(uint16_t) __constfunc;
 __END_DECLS
 
 #endif /* !_LOCORE */

Reply via email to