FYI,
>From d51bfc0bf33680e55cd528eac427573dad4e54e9 Mon Sep 17 00:00:00 2001
From: Jim Meyering <[email protected]>
Date: Sun, 8 Jan 2012 20:43:26 +0100
Subject: [PATCH] libparted: don't use _GL_ATTRIBUTE_CONST in public parted.h,
...
Instead, use the bare __attribute__((__const__)).
* include/parted/parted.h (__attribute): Define.
(ped_get_version): Use open-coded __attribute.
Prompted by a report from Keshav P R.
---
include/parted/parted.h | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/include/parted/parted.h b/include/parted/parted.h
index 6c0d2e1..dff6dca 100644
--- a/include/parted/parted.h
+++ b/include/parted/parted.h
@@ -25,6 +25,12 @@
extern "C" {
#endif
+#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
+# define __attribute(arg) __attribute__ (arg)
+#else
+# define __attribute(arg)
+#endif
+
#include <parted/constraint.h>
#include <parted/device.h>
#include <parted/disk.h>
@@ -37,7 +43,10 @@ extern "C" {
#include <stdlib.h>
#include <string.h>
-extern const char* ped_get_version () _GL_ATTRIBUTE_CONST;
+extern const char *ped_get_version ()
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
+ __attribute ((__const__));
+#endif
extern void* ped_malloc (size_t size);
extern void* ped_calloc (size_t size);
--
1.7.9.rc0.2.g4b783