summaryrefslogtreecommitdiff
path: root/libio/libioP.h
diff options
context:
space:
mode:
Diffstat (limited to 'libio/libioP.h')
-rw-r--r--libio/libioP.h44
1 files changed, 2 insertions, 42 deletions
diff --git a/libio/libioP.h b/libio/libioP.h
index 0f16e2dbd1..8706af2d90 100644
--- a/libio/libioP.h
+++ b/libio/libioP.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2015 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -39,7 +39,7 @@
# define __set_errno(Val) errno = (Val)
#endif
#if defined __GLIBC__ && __GLIBC__ >= 2
-# include <bits/libc-lock.h>
+# include <libc-lock.h>
#else
/*# include <comthread.h>*/
#endif
@@ -760,46 +760,6 @@ extern _IO_off64_t _IO_seekpos_unlocked (_IO_FILE *, _IO_off64_t, int)
# define munmap __munmap
# define ftruncate __ftruncate
# endif
-
-# define ROUND_TO_PAGE(_S) \
- (((_S) + EXEC_PAGESIZE - 1) & ~(EXEC_PAGESIZE - 1))
-
-# define FREE_BUF(_B, _S) \
- munmap ((_B), ROUND_TO_PAGE (_S))
-# define ALLOC_BUF(_B, _S, _R) \
- do { \
- (_B) = (char *) mmap (0, ROUND_TO_PAGE (_S), \
- PROT_READ | PROT_WRITE, \
- MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); \
- if ((_B) == (char *) MAP_FAILED) \
- return (_R); \
- } while (0)
-# define ALLOC_WBUF(_B, _S, _R) \
- do { \
- (_B) = (wchar_t *) mmap (0, ROUND_TO_PAGE (_S), \
- PROT_READ | PROT_WRITE, \
- MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); \
- if ((_B) == (wchar_t *) MAP_FAILED) \
- return (_R); \
- } while (0)
-
-#else /* _G_HAVE_MMAP */
-
-# define FREE_BUF(_B, _S) \
- free(_B)
-# define ALLOC_BUF(_B, _S, _R) \
- do { \
- (_B) = (char*)malloc(_S); \
- if ((_B) == NULL) \
- return (_R); \
- } while (0)
-# define ALLOC_WBUF(_B, _S, _R) \
- do { \
- (_B) = (wchar_t *)malloc(_S); \
- if ((_B) == NULL) \
- return (_R); \
- } while (0)
-
#endif /* _G_HAVE_MMAP */
#ifndef OS_FSTAT