X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fbinary-io.h;h=0f376e3893fdfd54bf642495bf7cfb3a5ab34fc4;hb=25b6b5120113989e0b91de9d0b75d3d625bbc753;hp=a33e32aee2c5b74047793fd7441c373d460f7efd;hpb=290f951644e3c7ae4a9bc14ae89ed071b33b9a18;p=gnulib.git diff --git a/lib/binary-io.h b/lib/binary-io.h index a33e32aee..0f376e389 100644 --- a/lib/binary-io.h +++ b/lib/binary-io.h @@ -25,6 +25,11 @@ so we include it here first. */ #include +_GL_INLINE_HEADER_BEGIN +#ifndef BINARY_IO_INLINE +# define BINARY_IO_INLINE _GL_INLINE +#endif + /* set_binary_mode (fd, mode) sets the binary/text I/O mode of file descriptor fd to the given mode (must be O_BINARY or O_TEXT) and returns the previous mode. */ @@ -39,9 +44,9 @@ # endif #else /* On reasonable systems, binary I/O is the only choice. */ - /* Use an inline function rather than a macro, to avoid gcc warnings + /* Use a function rather than a macro, to avoid gcc warnings "warning: statement with no effect". */ -static inline int +BINARY_IO_INLINE int set_binary_mode (int fd, int mode) { (void) fd; @@ -62,4 +67,6 @@ set_binary_mode (int fd, int mode) # define SET_BINARY(fd) ((void) set_binary_mode (fd, O_BINARY)) #endif +_GL_INLINE_HEADER_END + #endif /* _BINARY_H */