libc: update kernel library references

This commit is contained in:
2026-05-28 20:39:54 +01:00
parent daca537875
commit a5d99ca248
34 changed files with 60 additions and 59 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ bsp_add_library(
LIB_DIR /usr/lib) LIB_DIR /usr/lib)
target_link_libraries(libc PRIVATE librosetta libxpc-static interface::fs) target_link_libraries(libc PRIVATE librosetta libxpc-static interface::fs)
target_link_libraries(libc PUBLIC libmango) target_link_libraries(libc PUBLIC libmagenta)
target_compile_definitions(libc PRIVATE ENABLE_GLOBAL_HEAP=1) target_compile_definitions(libc PRIVATE ENABLE_GLOBAL_HEAP=1)
add_subdirectory(pthread) add_subdirectory(pthread)
+1 -1
View File
@@ -26,4 +26,4 @@ sysroot_add_library(
HEADER_DIR /usr/include HEADER_DIR /usr/include
LIB_DIR /usr/lib) LIB_DIR /usr/lib)
target_link_libraries(libc-core PRIVATE libmango librosetta) target_link_libraries(libc-core PRIVATE libmagenta librosetta)
+1 -1
View File
@@ -1,5 +1,5 @@
#include <errno.h> #include <errno.h>
#include <mango/status.h> #include <magenta/status.h>
static int __errno = SUCCESS; static int __errno = SUCCESS;
+1 -1
View File
@@ -1,4 +1,4 @@
#include <mango/task.h> #include <magenta/task.h>
void abort(void) void abort(void)
{ {
+1 -1
View File
@@ -1,4 +1,4 @@
#include <mango/task.h> #include <magenta/task.h>
void exit(int code) void exit(int code)
{ {
+1 -1
View File
@@ -1,4 +1,4 @@
#include <mango/log.h> #include <magenta/log.h>
#include <rosetta/bootstrap.h> #include <rosetta/bootstrap.h>
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef SYS_MMAN_H_ #ifndef SYS_MMAN_H_
#define SYS_MMAN_H_ #define SYS_MMAN_H_
#include <mango/types.h> #include <magenta/types.h>
#include <stddef.h> #include <stddef.h>
#define PROT_NONE 0x00u #define PROT_NONE 0x00u
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef SYS_REMOTE_H_ #ifndef SYS_REMOTE_H_
#define SYS_REMOTE_H_ #define SYS_REMOTE_H_
#include <mango/types.h> #include <magenta/types.h>
#include <stdbool.h> #include <stdbool.h>
enum sys_remote_id { enum sys_remote_id {
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef SYS_TYPES_H_ #ifndef SYS_TYPES_H_
#define SYS_TYPES_H_ #define SYS_TYPES_H_
#include <mango/types.h> #include <magenta/types.h>
#define SEEK_SET 0 #define SEEK_SET 0
#define SEEK_CUR 1 #define SEEK_CUR 1
+1 -1
View File
@@ -30,4 +30,4 @@ sysroot_add_library(
HEADER_DIR /usr/include HEADER_DIR /usr/include
LIB_DIR /usr/lib) LIB_DIR /usr/lib)
target_link_libraries(libc-io libc-core interface::fs libxpc-static libmango) target_link_libraries(libc-io libc-core interface::fs libxpc-static libmagenta)
+1 -1
View File
@@ -2,7 +2,7 @@
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <mango/log.h> #include <magenta/log.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
+2 -2
View File
@@ -1,8 +1,8 @@
#include "file.h" #include "file.h"
#include <errno.h> #include <errno.h>
#include <mango/futex.h> #include <magenta/futex.h>
#include <mango/log.h> #include <magenta/log.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
+1 -1
View File
@@ -3,7 +3,7 @@
#include "ringbuf.h" #include "ringbuf.h"
#include <mango/types.h> #include <magenta/types.h>
#include <stddef.h> #include <stddef.h>
enum file_flags { enum file_flags {
+1 -1
View File
@@ -1,7 +1,7 @@
#include "file.h" #include "file.h"
#include <errno.h> #include <errno.h>
#include <mango/log.h> #include <magenta/log.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
+2 -2
View File
@@ -1,6 +1,6 @@
#include <errno.h> #include <errno.h>
#include <mango/handle.h> #include <magenta/handle.h>
#include <mango/msg.h> #include <magenta/msg.h>
#include <rosetta/fs.h> #include <rosetta/fs.h>
#include <sys/remote.h> #include <sys/remote.h>
+2 -2
View File
@@ -1,6 +1,6 @@
#include <errno.h> #include <errno.h>
#include <mango/handle.h> #include <magenta/handle.h>
#include <mango/msg.h> #include <magenta/msg.h>
#include <rosetta/fs.h> #include <rosetta/fs.h>
#include <sys/remote.h> #include <sys/remote.h>
#include <sys/types.h> #include <sys/types.h>
+2 -2
View File
@@ -1,6 +1,6 @@
#include <errno.h> #include <errno.h>
#include <mango/handle.h> #include <magenta/handle.h>
#include <mango/msg.h> #include <magenta/msg.h>
#include <rosetta/fs.h> #include <rosetta/fs.h>
#include <sys/remote.h> #include <sys/remote.h>
+4 -3
View File
@@ -1,7 +1,8 @@
#include <errno.h> #include <errno.h>
#include <mango/handle.h> #include <magenta/handle.h>
#include <mango/task.h> #include <magenta/log.h>
#include <mango/vm.h> #include <magenta/task.h>
#include <magenta/vm.h>
#include <rosetta/fs.h> #include <rosetta/fs.h>
#include <stdbool.h> #include <stdbool.h>
#include <sys/mman.h> #include <sys/mman.h>
+3 -3
View File
@@ -1,7 +1,7 @@
#include <errno.h> #include <errno.h>
#include <mango/handle.h> #include <magenta/handle.h>
#include <mango/task.h> #include <magenta/task.h>
#include <mango/vm.h> #include <magenta/vm.h>
#include <rosetta/fs.h> #include <rosetta/fs.h>
#include <stdbool.h> #include <stdbool.h>
#include <sys/mman.h> #include <sys/mman.h>
+2 -2
View File
@@ -1,6 +1,6 @@
#include <errno.h> #include <errno.h>
#include <mango/handle.h> #include <magenta/handle.h>
#include <mango/msg.h> #include <magenta/msg.h>
#include <rosetta/fs.h> #include <rosetta/fs.h>
#include <sys/remote.h> #include <sys/remote.h>
+2 -2
View File
@@ -1,6 +1,6 @@
#include <errno.h> #include <errno.h>
#include <mango/handle.h> #include <magenta/handle.h>
#include <mango/msg.h> #include <magenta/msg.h>
#include <rosetta/fs.h> #include <rosetta/fs.h>
#include <sys/remote.h> #include <sys/remote.h>
+2 -2
View File
@@ -1,6 +1,6 @@
#include <errno.h> #include <errno.h>
#include <mango/handle.h> #include <magenta/handle.h>
#include <mango/msg.h> #include <magenta/msg.h>
#include <rosetta/fs.h> #include <rosetta/fs.h>
#include <sys/remote.h> #include <sys/remote.h>
+1 -1
View File
@@ -31,4 +31,4 @@ sysroot_add_library(
LIB_DIR /usr/lib) LIB_DIR /usr/lib)
target_compile_definitions(libc-malloc PRIVATE ENABLE_GLOBAL_HEAP=1) target_compile_definitions(libc-malloc PRIVATE ENABLE_GLOBAL_HEAP=1)
target_link_libraries(libc-malloc libc-core libmango) target_link_libraries(libc-malloc libc-core libmagenta)
+5 -5
View File
@@ -1,11 +1,11 @@
#include "liballoc.h" #include "liballoc.h"
#include <heap/heap.h> #include <heap/heap.h>
#include <mango/handle.h> #include <magenta/handle.h>
#include <mango/log.h> #include <magenta/log.h>
#include <mango/status.h> #include <magenta/status.h>
#include <mango/task.h> #include <magenta/task.h>
#include <mango/vm.h> #include <magenta/vm.h>
#include <stdio.h> #include <stdio.h>
#define HEAP_REGION_SIZE 0x40000000 #define HEAP_REGION_SIZE 0x40000000
+1 -1
View File
@@ -2,7 +2,7 @@
#define HEAP_H_ #define HEAP_H_
#include <heap/_liballoc.h> #include <heap/_liballoc.h>
#include <mango/types.h> #include <magenta/types.h>
#include <stddef.h> #include <stddef.h>
typedef enum heap_result { typedef enum heap_result {
+2 -2
View File
@@ -41,6 +41,6 @@ bsp_add_library(
NAME libpthread NAME libpthread
LIB_DIR /usr/lib) LIB_DIR /usr/lib)
target_link_libraries(libc-pthread PRIVATE libc-io libmango) target_link_libraries(libc-pthread PRIVATE libc-io libmagenta)
target_link_libraries(libpthread PRIVATE libmango) target_link_libraries(libpthread PRIVATE libmagenta)
target_link_libraries(libpthread PUBLIC libc) target_link_libraries(libpthread PUBLIC libc)
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef PTHREAD_H_ #ifndef PTHREAD_H_
#define PTHREAD_H_ #define PTHREAD_H_
#include <mango/types.h> #include <magenta/types.h>
#define __PTHREAD_ATTR_SIZE__ 32 #define __PTHREAD_ATTR_SIZE__ 32
@@ -1,6 +1,6 @@
.code64 .code64
#include "mango/syscall.h" #include "magenta/syscall.h"
.global __pthread_unmap_exit .global __pthread_unmap_exit
.type __pthread_unmap_exit, @function .type __pthread_unmap_exit, @function
+1 -1
View File
@@ -1,7 +1,7 @@
#ifndef _THREAD_PTHREAD_H_ #ifndef _THREAD_PTHREAD_H_
#define _THREAD_PTHREAD_H_ #define _THREAD_PTHREAD_H_
#include <mango/types.h> #include <magenta/types.h>
enum pthread_flags { enum pthread_flags {
THREAD_DETACHED = 0x01u, THREAD_DETACHED = 0x01u,
+2 -2
View File
@@ -1,8 +1,8 @@
#include "pthread.h" #include "pthread.h"
#include <errno.h> #include <errno.h>
#include <mango/status.h> #include <magenta/status.h>
#include <mango/task.h> #include <magenta/task.h>
#include <pthread.h> #include <pthread.h>
#include <string.h> #include <string.h>
#include <sys/mman.h> #include <sys/mman.h>
+4 -4
View File
@@ -1,10 +1,10 @@
#include "pthread.h" #include "pthread.h"
#include <errno.h> #include <errno.h>
#include <mango/handle.h> #include <magenta/handle.h>
#include <mango/object.h> #include <magenta/object.h>
#include <mango/signal.h> #include <magenta/signal.h>
#include <mango/task.h> #include <magenta/task.h>
#include <pthread.h> #include <pthread.h>
#include <sys/mman.h> #include <sys/mman.h>
+2 -2
View File
@@ -1,7 +1,7 @@
#include "pthread.h" #include "pthread.h"
#include <mango/handle.h> #include <magenta/handle.h>
#include <mango/task.h> #include <magenta/task.h>
#include <pthread.h> #include <pthread.h>
#include <stdlib.h> #include <stdlib.h>
+4 -4
View File
@@ -1,10 +1,10 @@
#include "pthread.h" #include "pthread.h"
#include <errno.h> #include <errno.h>
#include <mango/handle.h> #include <magenta/handle.h>
#include <mango/object.h> #include <magenta/object.h>
#include <mango/signal.h> #include <magenta/signal.h>
#include <mango/task.h> #include <magenta/task.h>
#include <pthread.h> #include <pthread.h>
#include <sys/mman.h> #include <sys/mman.h>
+2 -2
View File
@@ -1,7 +1,7 @@
#include "pthread.h" #include "pthread.h"
#include <mango/task.h> #include <magenta/task.h>
#include <mango/types.h> #include <magenta/types.h>
#include <string.h> #include <string.h>
#include <sys/mman.h> #include <sys/mman.h>