Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37862803
en ru br
ALT Linux repos
S:0.32-alt2

Group :: System/Libraries
RPM: libowfat

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: libowfat-0.32-alt-glibc-2.34-compat.patch
Download


diff --git a/libowfat/byte.h b/libowfat/byte.h
index 0568164..81ab345 100644
--- a/libowfat/byte.h
+++ b/libowfat/byte.h
@@ -9,17 +9,13 @@
 extern "C" {
 #endif
 
-#ifndef __pure__
-#define __pure__
-#endif
-
 /* byte_chr returns the smallest integer i between 0 and len-1
  * inclusive such that one[i] equals needle, or len if not found. */
-size_t byte_chr(const void* haystack, size_t len, char needle) __pure__;
+size_t byte_chr(const void* haystack, size_t len, char needle);
 
 /* byte_rchr returns the largest integer i between 0 and len-1 inclusive
  * such that one[i] equals needle, or len if not found. */
-size_t byte_rchr(const void* haystack,size_t len,char needle) __pure__;
+size_t byte_rchr(const void* haystack,size_t len,char needle);
 
 /* byte_copy copies in[0] to out[0], in[1] to out[1], ... and in[len-1]
  * to out[len-1]. */
@@ -34,14 +30,14 @@ void byte_copyr(void* out, size_t len, const void* in);
  * than, equal to, or greater than the string b[0], b[1], ...,
  * b[len-1]. When the strings are different, byte_diff does not read
  * bytes past the first difference. */
-int byte_diff(const void* a, size_t len, const void* b) __pure__;
+int byte_diff(const void* a, size_t len, const void* b);
 
 /* byte_zero sets the bytes out[0], out[1], ..., out[len-1] to 0 */
 void byte_zero(void* out, size_t len);
 
 #define byte_equal(s,n,t) (!byte_diff((s),(n),(t)))
 
-int byte_equal_notimingattack(const void* a, size_t len,const void* b) __pure__;
+int byte_equal_notimingattack(const void* a, size_t len,const void* b);
 
 #if defined(__i386__) || defined(__x86_64__)
 #define UNALIGNED_ACCESS_OK
diff --git a/libowfat/critbit.h b/libowfat/critbit.h
index f9ceb3c..00a1d49 100644
--- a/libowfat/critbit.h
+++ b/libowfat/critbit.h
@@ -8,15 +8,11 @@ extern "C" {
 /* for __pure__ if we are compiling under dietlibc */
 #include <stddef.h>
 
-#ifndef __pure__
-#define __pure__
-#endif
-
 typedef struct {
   void *root;
 } critbit0_tree;
 
-int critbit0_contains(critbit0_tree *t, const char *u) __pure__;
+int critbit0_contains(critbit0_tree *t, const char *u);
 int critbit0_insert(critbit0_tree *t, const char *u);
 int critbit0_delete(critbit0_tree *t, const char *u);
 void critbit0_clear(critbit0_tree *t);
diff --git a/libowfat/fmt.h b/libowfat/fmt.h
index 4ca896d..3aa6ac1 100644
--- a/libowfat/fmt.h
+++ b/libowfat/fmt.h
@@ -15,10 +15,6 @@
 extern "C" {
 #endif
 
-#ifndef __pure__
-#define __pure__
-#endif
-
 #define FMT_LONG  41 /* enough space to hold -2^127 in decimal, plus \0 */
 #define FMT_ULONG 40 /* enough space to hold 2^128 - 1 in decimal, plus \0 */
 #define FMT_8LONG 44 /* enough space to hold 2^128 - 1 in octal, plus \0 */
@@ -46,31 +42,31 @@ extern "C" {
 /* convert signed src integer -23 to ASCII '-','2','3', return number of
  * bytes of value in output format (3 in this example).
  * If dest is not NULL, write result to dest */
-size_t fmt_long(char *dest,signed long src) __pure__;
+size_t fmt_long(char *dest,signed long src);
 
 /* convert unsigned src integer 23 to ASCII '2','3', return number of
  * bytes of value in output format (2 in this example).
  * If dest is not NULL, write result to dest */
-size_t fmt_ulong(char *dest,unsigned long src) __pure__;
+size_t fmt_ulong(char *dest,unsigned long src);
 
 /* convert unsigned src integer 0x23 to ASCII '2','3', return number of
  * bytes of value in output format (2 in this example).
  * If dest is not NULL, write result to dest */
-size_t fmt_xlong(char *dest,unsigned long src) __pure__;
+size_t fmt_xlong(char *dest,unsigned long src);
 
 /* convert unsigned src integer 023 to ASCII '2','3', return number of
  * bytes of value in output format (2 in this example).
  * If dest is not NULL, write result to dest */
-size_t fmt_8long(char *dest,unsigned long src) __pure__;
+size_t fmt_8long(char *dest,unsigned long src);
 
 /* like fmt_long but for long long */
-size_t fmt_longlong(char *dest,signed long long src) __pure__;
+size_t fmt_longlong(char *dest,signed long long src);
 
 /* like fmt_ulong but for unsigned long long */
-size_t fmt_ulonglong(char *dest,unsigned long long src) __pure__;
+size_t fmt_ulonglong(char *dest,unsigned long long src);
 
 /* like fmt_xlong but for unsigned long long */
-size_t fmt_xlonglong(char *dest,unsigned long long src) __pure__;
+size_t fmt_xlonglong(char *dest,unsigned long long src);
 
 #define fmt_uint(dest,src) fmt_ulong(dest,src)
 #define fmt_int(dest,src) fmt_long(dest,src)
@@ -81,22 +77,22 @@ size_t fmt_xlonglong(char *dest,unsigned long long src) __pure__;
  * Does not truncate! */
 /* fmt_ulong0(buf,23,4) -> '0','0','2','3' return 4 */
 /* fmt_ulong0(buf,234,2) -> '2','3','4', return 3 */
-size_t fmt_ulong0(char *,unsigned long src,size_t padto) __pure__;
+size_t fmt_ulong0(char *,unsigned long src,size_t padto);
 
 #define fmt_uint0(buf,src,padto) fmt_ulong0(buf,src,padto)
 
 /* convert src double 1.7 to ASCII '1','.','7', return length.
  * If dest is not NULL, write result to dest */
-size_t fmt_double(char *dest, double d,int max,int prec) __pure__;
+size_t fmt_double(char *dest, double d,int max,int prec);
 
 /* if src is negative, write '-' and return 1.
  * if src is positive, write '+' and return 1.
  * otherwise return 0 */
-size_t fmt_plusminus(char *dest,int src) __pure__;
+size_t fmt_plusminus(char *dest,int src);
 
 /* if src is negative, write '-' and return 1.
  * otherwise return 0. */
-size_t fmt_minus(char *dest,int src) __pure__;
+size_t fmt_minus(char *dest,int src);
 
 /* copy str to dest until \0 byte, return number of copied bytes. */
 /* fmt_str(NULL,str) == strlen(str) */
@@ -108,11 +104,11 @@ size_t fmt_minus(char *dest,int src) __pure__;
  * This is more efficient because strcat needs to scan the string to
  * find the end and append.
  */
-size_t fmt_str(char *dest,const char *src) __pure__;
+size_t fmt_str(char *dest,const char *src);
 
 /* copy str to dest until \0 byte or limit bytes copied.
  * return number of copied bytes. */
-size_t fmt_strn(char *dest,const char *src,size_t limit) __pure__;
+size_t fmt_strn(char *dest,const char *src,size_t limit);
 
 /* copy n bytes from src to dest, return n */
 static inline size_t fmt_copybytes(char* dest,const char* src,size_t n) {
@@ -124,56 +120,56 @@ static inline size_t fmt_copybytes(char* dest,const char* src,size_t n) {
  * write padlen-srclen spaces, if that is >= 0.  Then copy srclen
  * characters from src.  Truncate only if total length is larger than
  * maxlen.  Return number of characters written. */
-size_t fmt_pad(char* dest,const char* src,size_t srclen,size_t padlen,size_t maxlen) __pure__;
+size_t fmt_pad(char* dest,const char* src,size_t srclen,size_t padlen,size_t maxlen);
 
 /* "foo" -> "foo  "
  * append padlen-srclen spaces after dest, if that is >= 0.  Truncate
  * only if total length is larger than maxlen.  Return number of
  * characters written. */
-size_t fmt_fill(char* dest,size_t srclen,size_t padlen,size_t maxlen) __pure__;
+size_t fmt_fill(char* dest,size_t srclen,size_t padlen,size_t maxlen);
 
 /* 1 -> "1", 4900 -> "4.9k", 2300000 -> "2.3M" */
-size_t fmt_human(char* dest,unsigned long long l) __pure__;
+size_t fmt_human(char* dest,unsigned long long l);
 
 /* 1 -> "1", 4900 -> "4.8k", 2300000 -> "2.2M" */
-size_t fmt_humank(char* dest,unsigned long long l) __pure__;
+size_t fmt_humank(char* dest,unsigned long long l);
 
 /* "Sun, 06 Nov 1994 08:49:37 GMT" */
 size_t fmt_httpdate(char* dest,time_t t);	/* not marked pure because it calls gmtime */
 
 /* "2014-05-27T19:22:16.247Z" */
-size_t fmt_iso8601(char* dest,time_t t) __pure__;
+size_t fmt_iso8601(char* dest,time_t t);
 
 #define FMT_UTF8 5
 #define FMT_ASN1LENGTH 17 /* enough space to hold 2^128-1 */
 #define FMT_ASN1TAG 19 /* enough space to hold 2^128-1 */
 
 /* some variable length encodings for integers */
-size_t fmt_utf8(char* dest,uint32_t n) __pure__;	/* can store 0-0x7fffffff */
-size_t fmt_asn1derlength(char* dest,unsigned long long l) __pure__;	/* 0-0x7f: 1 byte, above that 1+bytes_needed bytes */
-size_t fmt_asn1dertag(char* dest,unsigned long long l) __pure__;	/* 1 byte for each 7 bits; upper bit = more bytes coming */
+size_t fmt_utf8(char* dest,uint32_t n);	/* can store 0-0x7fffffff */
+size_t fmt_asn1derlength(char* dest,unsigned long long l);	/* 0-0x7f: 1 byte, above that 1+bytes_needed bytes */
+size_t fmt_asn1dertag(char* dest,unsigned long long l);	/* 1 byte for each 7 bits; upper bit = more bytes coming */
 
 /* Google Protocol Buffers, https://developers.google.com/protocol-buffers/docs/encoding */
-size_t fmt_varint(char* dest,unsigned long long l) __pure__;	/* protocol buffers encoding; like asn1dertag but little endian */
-size_t fmt_pb_tag(char* dest,size_t fieldno,unsigned char type) __pure__;	/* protocol buffer tag */
-size_t fmt_pb_type0_int(char* dest,unsigned long long l) __pure__;	/* protocol buffers encoding: type 0 bool/enum/int32/uint32/int64/uint64 */
-size_t fmt_pb_type0_sint(char* dest,signed long long l) __pure__;/* protocol buffers encoding: type 0 sint32/sint64 */
-size_t fmt_pb_type1_double(char* dest,double d) __pure__;	/* protocol buffers encoding: double (64-bit little endian blob) */
-size_t fmt_pb_type1_fixed64(char* dest,uint64_t l) __pure__;	/* protocol buffers encoding: 64-bit little endian blob */
+size_t fmt_varint(char* dest,unsigned long long l);	/* protocol buffers encoding; like asn1dertag but little endian */
+size_t fmt_pb_tag(char* dest,size_t fieldno,unsigned char type);	/* protocol buffer tag */
+size_t fmt_pb_type0_int(char* dest,unsigned long long l);	/* protocol buffers encoding: type 0 bool/enum/int32/uint32/int64/uint64 */
+size_t fmt_pb_type0_sint(char* dest,signed long long l);/* protocol buffers encoding: type 0 sint32/sint64 */
+size_t fmt_pb_type1_double(char* dest,double d);	/* protocol buffers encoding: double (64-bit little endian blob) */
+size_t fmt_pb_type1_fixed64(char* dest,uint64_t l);	/* protocol buffers encoding: 64-bit little endian blob */
 
 /* fmt_pb_type2_string can return 0 if (s,l) is clearly invalid */
-size_t fmt_pb_type2_string(char* dest,const char* s,size_t l) __pure__;	/* protocol buffers encoding: varint length + blob */
-size_t fmt_pb_type5_float(char* dest,float f) __pure__;		/* protocol buffers encoding: float (32-bit little endian blob) */
-size_t fmt_pb_type5_fixed32(char* dest,uint32_t l) __pure__;	/* protocol buffers encoding: 32-bit little endian blob */
+size_t fmt_pb_type2_string(char* dest,const char* s,size_t l);	/* protocol buffers encoding: varint length + blob */
+size_t fmt_pb_type5_float(char* dest,float f);		/* protocol buffers encoding: float (32-bit little endian blob) */
+size_t fmt_pb_type5_fixed32(char* dest,uint32_t l);	/* protocol buffers encoding: 32-bit little endian blob */
 
-size_t fmt_pb_int(char* dest,size_t fieldno,unsigned long long l) __pure__;
-size_t fmt_pb_sint(char* dest,size_t fieldno,signed long long l) __pure__;
-size_t fmt_pb_double(char* dest,size_t fieldno,double d) __pure__;
-size_t fmt_pb_float(char* dest,size_t fieldno,float f) __pure__;
-size_t fmt_pb_string(char* dest,size_t fieldno,const char* s,size_t l) __pure__;
+size_t fmt_pb_int(char* dest,size_t fieldno,unsigned long long l);
+size_t fmt_pb_sint(char* dest,size_t fieldno,signed long long l);
+size_t fmt_pb_double(char* dest,size_t fieldno,double d);
+size_t fmt_pb_float(char* dest,size_t fieldno,float f);
+size_t fmt_pb_string(char* dest,size_t fieldno,const char* s,size_t l);
 
 /* fmt_netstring can return 0 if (src,len) is clearly invalid */
-size_t fmt_netstring(char* dest,const char* src,size_t len) __pure__;
+size_t fmt_netstring(char* dest,const char* src,size_t len);
 
 /* Marshaling helper functions.
  * Escape one character, no matter if it needs escaping or not.
@@ -185,27 +181,27 @@ size_t fmt_netstring(char* dest,const char* src,size_t len) __pure__;
  * unicode codepoint) may be limited to 0x7f, 0xff or 0x10ffff. */
 
 /* XML escaping: '&' -> '&amp;', '<' -> '&lt;', 'ö' -> '&#xf6;' */
-size_t fmt_escapecharxml(char* dest,uint32_t ch) __pure__;
+size_t fmt_escapecharxml(char* dest,uint32_t ch);
 /* HTML escaping is the same as XML escaping. */
-size_t fmt_escapecharhtml(char* dest,uint32_t ch) __pure__;
+size_t fmt_escapecharhtml(char* dest,uint32_t ch);
 
 /* JSON escaping: '\' -> '\\', '"' -> '\"', 'ö' -> '\u00f6' */
-size_t fmt_escapecharjson(char* dest,uint32_t ch) __pure__;
+size_t fmt_escapecharjson(char* dest,uint32_t ch);
 
 /* MIME quoted-printable escaping: 'ö' -> '=f6', characters > 0xff not supported */
-size_t fmt_escapecharquotedprintable(char* dest,uint32_t ch) __pure__;
+size_t fmt_escapecharquotedprintable(char* dest,uint32_t ch);
 
 /* MIME quoted-printable escaping with UTF-8: 'ö' -> '=c3=b6', characters > 0x7fffffff not supported */
-size_t fmt_escapecharquotedprintableutf8(char* dest,uint32_t ch) __pure__;
+size_t fmt_escapecharquotedprintableutf8(char* dest,uint32_t ch);
 
 /* C99 style escaping: '\' -> '\\', newline -> '\n', 0xc2 -> '\302' */
-size_t fmt_escapecharc(char* dest,uint32_t ch) __pure__;
+size_t fmt_escapecharc(char* dest,uint32_t ch);
 
 /* internal functions, may be independently useful */
 char fmt_tohex(char c) __attribute__((__const__));
 
 #define fmt_strm(b,...) fmt_strm_internal(b,__VA_ARGS__,(char*)0)
-size_t fmt_strm_internal(char* dest,...) __pure__;
+size_t fmt_strm_internal(char* dest,...);
 
 #ifndef MAX_ALLOCA
 #define MAX_ALLOCA 100000
diff --git a/libowfat/scan.h b/libowfat/scan.h
index bcd4365..17f0f65 100644
--- a/libowfat/scan.h
+++ b/libowfat/scan.h
@@ -15,10 +15,6 @@
 extern "C" {
 #endif
 
-#ifndef __pure__
-#define __pure__
-#endif
-
 /* This file declared functions used to decode / scan / unmarshal
  * integer or string values from a buffer.
  * The first argument is always the source buffer, the second argument
@@ -84,18 +80,18 @@ size_t scan_double(const char *in, double *dest);
 size_t scan_plusminus(const char *src,signed int *dest);
 
 /* return the highest integer n<=limit so that isspace(in[i]) for all 0<=i<=n */
-size_t scan_whitenskip(const char *in,size_t limit) __pure__;
+size_t scan_whitenskip(const char *in,size_t limit);
 
 /* return the highest integer n<=limit so that !isspace(in[i]) for all 0<=i<=n */
-size_t scan_nonwhitenskip(const char *in,size_t limit) __pure__;
+size_t scan_nonwhitenskip(const char *in,size_t limit);
 
 /* return the highest integer n<=limit so that in[i] is element of
  * charset (ASCIIZ string) for all 0<=i<=n */
-size_t scan_charsetnskip(const char *in,const char *charset,size_t limit) __pure__;
+size_t scan_charsetnskip(const char *in,const char *charset,size_t limit);
 
 /* return the highest integer n<=limit so that in[i] is not element of
  * charset (ASCIIZ string) for all 0<=i<=n */
-size_t scan_noncharsetnskip(const char *in,const char *charset,size_t limit) __pure__;
+size_t scan_noncharsetnskip(const char *in,const char *charset,size_t limit);
 
 /* try to parse ASCII GMT date; does not understand time zones. */
 /* example dates:
@@ -103,17 +99,17 @@ size_t scan_noncharsetnskip(const char *in,const char *charset,size_t limit) __p
  *   "Sunday, 06-Nov-94 08:49:37 GMT"
  *   "Sun Nov  6 08:49:37 1994"
  */
-size_t scan_httpdate(const char *in,time_t *t) __pure__;
+size_t scan_httpdate(const char *in,time_t *t);
 
 /* try to parse ASCII ISO-8601 date; does not understand time zones. */
 /* example date: "2014-05-27T19:22:16Z" */
-size_t scan_iso8601(const char* in,struct timespec* t) __pure__;
+size_t scan_iso8601(const char* in,struct timespec* t);
 
 /* some variable length encodings for integers */
-size_t scan_utf8(const char* in,size_t len,uint32_t* n) __pure__;
-size_t scan_utf8_sem(const char* in,size_t len,uint32_t* n) __pure__;
-size_t scan_asn1derlength(const char* in,size_t len,unsigned long long* n) __pure__;
-size_t scan_asn1dertag(const char* in,size_t len,unsigned long long* n) __pure__;
+size_t scan_utf8(const char* in,size_t len,uint32_t* n);
+size_t scan_utf8_sem(const char* in,size_t len,uint32_t* n);
+size_t scan_asn1derlength(const char* in,size_t len,unsigned long long* n);
+size_t scan_asn1dertag(const char* in,size_t len,unsigned long long* n);
 
 /* Google protocol buffers */
 /* A protocol buffer is a sequence of (tag,value).
@@ -122,15 +118,15 @@ size_t scan_asn1dertag(const char* in,size_t len,unsigned long long* n) __pure__
  *   0, double type 1, strings type 2 and floats type 5. However, you
  *   have to check this yourself.
  */ 
-size_t scan_varint(const char* in,size_t len, unsigned long long* n) __pure__;	/* internal */
-size_t scan_pb_tag(const char* in,size_t len, size_t* fieldno,unsigned char* type) __pure__;
+size_t scan_varint(const char* in,size_t len, unsigned long long* n);	/* internal */
+size_t scan_pb_tag(const char* in,size_t len, size_t* fieldno,unsigned char* type);
 
 /* Then, depending on the field number, validate the type and call the
  * corresponding of these functions to parse the value */
-size_t scan_pb_type0_int(const char* in,size_t len,unsigned long long* l) __pure__;
-size_t scan_pb_type0_sint(const char* in,size_t len,signed long long* l) __pure__;
-size_t scan_pb_type1_double(const char* in,size_t len,double* d) __pure__;
-size_t scan_pb_type1_fixed64(const char* in,size_t len,uint64_t* b) __pure__;
+size_t scan_pb_type0_int(const char* in,size_t len,unsigned long long* l);
+size_t scan_pb_type0_sint(const char* in,size_t len,signed long long* l);
+size_t scan_pb_type1_double(const char* in,size_t len,double* d);
+size_t scan_pb_type1_fixed64(const char* in,size_t len,uint64_t* b);
 /* NOTE: scan_pb_type2_stringlen only parses the length of the string,
  * not the string itself. It will return the number of bytes parsed in
  * the length, then set slen to the value of the length integer it just
@@ -141,9 +137,9 @@ size_t scan_pb_type1_fixed64(const char* in,size_t len,uint64_t* b) __pure__;
  * parsing early without having to read and allocate memory for the rest
  * (potentially gigabytes) of the data announced by one unreasonable
  * string length value. */
-size_t scan_pb_type2_stringlen(const char* in,size_t len,const char** string, size_t* slen) __pure__;
-size_t scan_pb_type5_float(const char* in,size_t len,float* f) __pure__;
-size_t scan_pb_type5_fixed32(const char* in,size_t len,uint32_t* b) __pure__;
+size_t scan_pb_type2_stringlen(const char* in,size_t len,const char** string, size_t* slen);
+size_t scan_pb_type5_float(const char* in,size_t len,float* f);
+size_t scan_pb_type5_fixed32(const char* in,size_t len,uint32_t* b);
 
 /* parse a netstring, input buffer is in (len bytes).
  * if parsing is successful:
@@ -153,7 +149,7 @@ size_t scan_pb_type5_fixed32(const char* in,size_t len,uint32_t* b) __pure__;
  *   return 0
  * Note: *dest will point inside the input buffer!
  */
-size_t scan_netstring(const char* in,size_t len,char** dest,size_t* slen) __pure__;
+size_t scan_netstring(const char* in,size_t len,char** dest,size_t* slen);
 
 /* internal function that might be useful independently */
 /* convert from hex ASCII, return 0 to 15 for success or -1 for failure */
diff --git a/libowfat/scan/scan_httpdate.c b/libowfat/scan/scan_httpdate.c
index ec8773f..c672874 100644
--- a/libowfat/scan/scan_httpdate.c
+++ b/libowfat/scan/scan_httpdate.c
@@ -1,5 +1,4 @@
 #define _GNU_SOURCE
-#define __deprecated__
 #include "scan.h"
 #include "byte.h"
 #include "case.h"
diff --git a/libowfat/scan/scan_iso8601.c b/libowfat/scan/scan_iso8601.c
index 1033f7d..0899316 100644
--- a/libowfat/scan/scan_iso8601.c
+++ b/libowfat/scan/scan_iso8601.c
@@ -1,5 +1,4 @@
 #define _GNU_SOURCE
-#define __deprecated__
 #include "scan.h"
 #include "byte.h"
 #include "case.h"
diff --git a/libowfat/str.h b/libowfat/str.h
index 100a37b..787c842 100644
--- a/libowfat/str.h
+++ b/libowfat/str.h
@@ -8,10 +8,6 @@
 extern "C" {
 #endif
 
-#ifndef __pure__
-#define __pure__
-#endif
-
 /* str_copy copies leading bytes from in to out until \0.
  * return number of copied bytes. */
 size_t str_copy(char *out,const char *in);
@@ -21,7 +17,7 @@ size_t str_copy(char *out,const char *in);
  * equal to, or greater than the string b[0], b[1], ..., b[m-1]=='\0'.
  * If the strings are different, str_diff does not read bytes past the
  * first difference. */
-int str_diff(const char *a,const char *b) __pure__;
+int str_diff(const char *a,const char *b);
 
 /* str_diffn returns negative, 0, or positive, depending on whether the
  * string a[0], a[1], ..., a[n]=='\0' is lexicographically smaller than,
@@ -29,24 +25,24 @@ int str_diff(const char *a,const char *b) __pure__;
  * If the strings are different, str_diffn does not read bytes past the
  * first difference. The strings will be considered equal if the first
  * limit characters match. */
-int str_diffn(const char *a,const char *b,size_t limit) __pure__;
+int str_diffn(const char *a,const char *b,size_t limit);
 
 #ifdef __dietlibc__
 #include <string.h>
 #define str_len(foo) strlen(foo)
 #else
 /* str_len returns the index of \0 in s */
-size_t str_len(const char *s) __pure__;
+size_t str_len(const char *s);
 #endif
 
 /* str_chr returns the index of the first occurance of needle or \0 in haystack */
-size_t str_chr(const char *haystack,char needle) __pure__;
+size_t str_chr(const char *haystack,char needle);
 
 /* str_rchr returns the index of the last occurance of needle or \0 in haystack */
-size_t str_rchr(const char *haystack,char needle) __pure__;
+size_t str_rchr(const char *haystack,char needle);
 
 /* str_start returns 1 if the b is a prefix of a, 0 otherwise */
-int str_start(const char *a,const char *b) __pure__;
+int str_start(const char *a,const char *b);
 
 /* convenience shortcut to test for string equality */
 #define str_equal(s,t) (!str_diff((s),(t)))
diff --git a/libowfat/stralloc.h b/libowfat/stralloc.h
index b328667..e810627 100644
--- a/libowfat/stralloc.h
+++ b/libowfat/stralloc.h
@@ -8,10 +8,6 @@
 extern "C" {
 #endif
 
-#ifndef __pure__
-#define __pure__
-#endif
-
 /* stralloc is the internal data structure all functions are working on.
  * s is the string.
  * len is the used length of the string.
@@ -101,17 +97,17 @@ static inline int stralloc_APPEND(stralloc* sa,const char* in) {
 /* stralloc_starts returns 1 if the \0-terminated string in "in", without
  * the terminating \0, is a prefix of the string stored in sa. Otherwise
  * it returns 0. sa must already be allocated. */
-int stralloc_starts(stralloc* sa,const char* in) __pure__;
+int stralloc_starts(stralloc* sa,const char* in);
 
 /* stralloc_diff returns negative, 0, or positive, depending on whether
  * a is lexicographically smaller than, equal to, or greater than the
  * string b. */
-int stralloc_diff(const stralloc* a,const stralloc* b) __pure__;
+int stralloc_diff(const stralloc* a,const stralloc* b);
 
 /* stralloc_diffs returns negative, 0, or positive, depending on whether
  * a is lexicographically smaller than, equal to, or greater than the
  * string b[0], b[1], ..., b[n]=='\0'. */
-int stralloc_diffs(const stralloc* a,const char* b) __pure__;
+int stralloc_diffs(const stralloc* a,const char* b);
 
 #define stralloc_equal(a,b) (!stralloc_diff((a),(b)))
 #define stralloc_equals(a,b) (!stralloc_diffs((a),(b)))
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin