Changeset b0b4592e in mainline for uspace/lib/posix
- Timestamp:
- 2014-03-15T19:21:53Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c773adc
- Parents:
- 2034f98 (diff), 8cffdf5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- uspace/lib/posix
- Files:
-
- 3 edited
- 1 moved
-
Makefile (modified) (4 diffs)
-
include/posix/math.h (modified) (1 diff)
-
include/posix/sys/mman.h (modified) (2 diffs)
-
source/sys/mman.c (moved) (moved from uspace/lib/c/generic/mman.c ) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/Makefile
r2034f98 rb0b4592e 36 36 37 37 INCLUDE_LIBC = ./include/libc 38 INCLUDE_LIBMATH = ./include/libmath 38 39 39 40 LIBC_FILE = $(LIBC_PREFIX)/libc.a … … 46 47 COLLISIONS_LIST = collisions.list 47 48 48 PRE_DEPEND = $(INCLUDE_LIBC) 49 PRE_DEPEND = $(INCLUDE_LIBC) $(INCLUDE_LIBMATH) 49 50 EXTRA_CLEAN = \ 50 $(INCLUDE_LIBC) \51 $(INCLUDE_LIBC) $(INCLUDE_LIBMATH) \ 51 52 $(REDEFS_HIDE_LIBC) $(REDEFS_SHOW_LIBPOSIX) \ 52 53 $(COLLISIONS_LIST) … … 73 74 source/string.c \ 74 75 source/strings.c \ 76 source/sys/mman.c \ 75 77 source/sys/stat.c \ 76 78 source/sys/wait.c \ … … 81 83 82 84 $(INCLUDE_LIBC): ../c/include 85 ln -s -f -n ../$^ $@ 86 87 $(INCLUDE_LIBMATH): ../math/include 83 88 ln -s -f -n ../$^ $@ 84 89 -
uspace/lib/posix/include/posix/math.h
r2034f98 rb0b4592e 36 36 #define POSIX_MATH_H_ 37 37 38 #include "lib c/math.h"38 #include "libmath/math.h" 39 39 40 40 #endif /* POSIX_MATH_H_ */ -
uspace/lib/posix/include/posix/sys/mman.h
r2034f98 rb0b4592e 40 40 #endif 41 41 42 #include " sys/types.h"42 #include "types.h" 43 43 #include <abi/mm/as.h> 44 44 … … 60 60 #define PROT_EXEC AS_AREA_EXEC 61 61 62 extern void *mmap(void *start, size_t length, int prot, int flags, int fd, 62 extern void * 63 __POSIX_DEF__(mmap)(void *start, size_t length, int prot, int flags, int fd, 63 64 __POSIX_DEF__(off_t) offset); 64 extern int munmap(void *start, size_t length);65 extern int __POSIX_DEF__(munmap)(void *start, size_t length); 65 66 66 67 -
uspace/lib/posix/source/sys/mman.c
r2034f98 rb0b4592e 27 27 */ 28 28 29 /** @addtogroup lib c29 /** @addtogroup libposix 30 30 * @{ 31 31 */ … … 33 33 */ 34 34 35 #include <sys/mman.h> 36 #include <sys/types.h> 37 #include <as.h> 38 #include <unistd.h> 35 #define LIBPOSIX_INTERNAL 36 #define __POSIX_DEF__(x) posix_##x 39 37 40 void *mmap(void *start, size_t length, int prot, int flags, int fd, 41 aoff64_t offset) 38 #include "../internal/common.h" 39 #include <posix/sys/mman.h> 40 #include <posix/sys/types.h> 41 #include <libc/as.h> 42 #include <posix/unistd.h> 43 44 void *posix_mmap(void *start, size_t length, int prot, int flags, int fd, 45 __POSIX_DEF__(off_t) offset) 42 46 { 43 47 if (!start) … … 53 57 } 54 58 55 int munmap(void *start, size_t length)59 int posix_munmap(void *start, size_t length) 56 60 { 57 61 return as_area_destroy(start);
Note:
See TracChangeset
for help on using the changeset viewer.
