forked from pool/libzio
56 lines
1.8 KiB
Diff
56 lines
1.8 KiB
Diff
--- zio.c
|
|
+++ zio.c
|
|
@@ -62,7 +62,7 @@ static ssize_t bzwrite(void *cookie, c
|
|
return (ssize_t)BZ2_bzwrite((BZFILE*)cookie, (void*)buf, count);
|
|
}
|
|
|
|
-static zio_int_t bzseek(void *cookie __unused, zio_off_t *poffset __unused, int whence __unused)
|
|
+static zio_int_t bzseek(void *cookie unused, zio_off_t *poffset unused, int whence unused)
|
|
{
|
|
errno = ESPIPE;
|
|
return -1;
|
|
@@ -327,7 +327,7 @@ static ssize_t lzwwrite(void *cookie,
|
|
return -1;
|
|
}
|
|
|
|
-static zio_int_t lzwseek(void *cookie __unused, zio_off_t *poffset __unused, int whence __unused)
|
|
+static zio_int_t lzwseek(void *cookie unused, zio_off_t *poffset unused, int whence unused)
|
|
{
|
|
errno = ESPIPE;
|
|
return -1;
|
|
--- zioP.h
|
|
+++ zioP.h
|
|
@@ -33,14 +33,14 @@
|
|
#include <stdlib.h>
|
|
#include <errno.h>
|
|
|
|
-#ifndef __unused
|
|
-# define __unused __attribute__((__unused__))
|
|
+#ifndef unused
|
|
+# define unused __attribute__((__unused__))
|
|
#endif
|
|
-#ifndef __nonnull
|
|
-# define __nonnull(parm) __attribute__((__nonnull__ parm))
|
|
+#ifndef nonnull
|
|
+# define nonnull(parm) __attribute__((__nonnull__ parm))
|
|
#endif
|
|
-#ifndef __wur
|
|
-# define __wur __attribute__((__warn_unused_result__))
|
|
+#ifndef wur
|
|
+# define wur __attribute__((__warn_unused_result__))
|
|
#endif
|
|
|
|
#if !defined(HAVE_FOPENCOOKIE) && !defined(HAVE_FUNOPEN)
|
|
@@ -161,9 +161,9 @@ __extension__ typedef struct
|
|
} cookie_io_functions_t;
|
|
static __inline__ FILE *fopencookie(void *__restrict,
|
|
const char *__restrict,
|
|
- cookie_io_functions_t) __nonnull((1,2)) __wur;
|
|
+ cookie_io_functions_t) nonnull((1,2)) wur;
|
|
static __inline__ FILE *fopencookie(void *__restrict cookie,
|
|
- const char *__restrict mode __unused,
|
|
+ const char *__restrict mode unused,
|
|
cookie_io_functions_t io_funcs)
|
|
{
|
|
return funopen(cookie, io_funcs.read, io_funcs.write, io_funcs.seek, io_funcs.close);
|