use restrict everywhere it's required by c99 and/or posix 2008
[musl] / include / wordexp.h
index 0691c8e..e7eb325 100644 (file)
@@ -5,6 +5,12 @@
 extern "C" {
 #endif
 
+#if __STDC_VERSION__ >= 199901L
+#define __restrict restrict
+#elif !defined(__GNUC__)
+#define __restrict
+#endif
+
 #define __NEED_size_t
 
 #include <bits/alltypes.h>
@@ -30,7 +36,7 @@ typedef struct
 #define WRDE_CMDSUB  4
 #define WRDE_SYNTAX  5
 
-int wordexp (const char *, wordexp_t *, int);
+int wordexp (const char *__restrict, wordexp_t *__restrict, int);
 void wordfree (wordexp_t *);
 
 #ifdef __cplusplus