Commit 0db44a1f 0db44a1f8c8dee91d34fd3a16d82ba05446cefc3 by Alain Magloire

mapfile_stream.c

noop everything whith #ifdef _POSIX_MAPPED_FILE
1 parent 61e324d1
...@@ -25,10 +25,13 @@ ...@@ -25,10 +25,13 @@
25 #include <sys/stat.h> 25 #include <sys/stat.h>
26 #include <fcntl.h> 26 #include <fcntl.h>
27 #include <unistd.h> 27 #include <unistd.h>
28 #include <sys/mman.h>
29 28
30 #include <io0.h> 29 #include <io0.h>
31 30
31 #ifdef _POSIX_MAPPED_FILES
32
33 #include <sys/mman.h>
34
32 struct _mapfile_stream 35 struct _mapfile_stream
33 { 36 {
34 int fd; 37 int fd;
...@@ -257,9 +260,14 @@ _mapfile_open (stream_t stream, const char *filename, int port, int flags) ...@@ -257,9 +260,14 @@ _mapfile_open (stream_t stream, const char *filename, int port, int flags)
257 return 0; 260 return 0;
258 } 261 }
259 262
263 #endif /* _POSIX_MAPPED_FILES */
264
260 int 265 int
261 mapfile_stream_create (stream_t *stream) 266 mapfile_stream_create (stream_t *stream)
262 { 267 {
268 #ifndef _POSIX_MAPPED_FILES
269 return ENOTSUP;
270 #else
263 struct _mapfile_stream *fs; 271 struct _mapfile_stream *fs;
264 int ret; 272 int ret;
265 273
...@@ -288,4 +296,5 @@ mapfile_stream_create (stream_t *stream) ...@@ -288,4 +296,5 @@ mapfile_stream_create (stream_t *stream)
288 stream_set_flush (*stream, _mapfile_flush, fs); 296 stream_set_flush (*stream, _mapfile_flush, fs);
289 stream_set_destroy (*stream, _mapfile_destroy, fs); 297 stream_set_destroy (*stream, _mapfile_destroy, fs);
290 return 0; 298 return 0;
299 #endif /* _POSIX_MAPPED_FILES */
291 } 300 }
......