update include hierarchy

This commit is contained in:
Lephenixnoir 2021-05-09 17:34:00 +02:00
parent 8993049f4e
commit e719af2f63
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
76 changed files with 86 additions and 58 deletions

View File

@ -122,6 +122,9 @@ endif()
add_library(fxlibc ${SOURCES})
target_include_directories(fxlibc PRIVATE include/)
foreach(FOLDER IN LISTS TARGET_FOLDERS)
target_include_directories(fxlibc PRIVATE include/target/${FOLDER}/)
endforeach()
set_target_properties(fxlibc PROPERTIES
OUTPUT_NAME "c") # libc.a
@ -132,5 +135,7 @@ install(TARGETS fxlibc DESTINATION lib/)
install(DIRECTORY include/ DESTINATION include/ PATTERN "target" EXCLUDE)
foreach(FOLDER IN LISTS TARGET_FOLDERS)
install(DIRECTORY include/target/${FOLDER}/ DESTINATION include/)
if(EXISTS include/target/${FOLDER}/)
install(DIRECTORY include/target/${FOLDER}/ DESTINATION include/)
endif()
endforeach()

View File

@ -1 +0,0 @@
#include <fxlibc/signal.h>

1
include/sys/signal.h Normal file
View File

@ -0,0 +1 @@
#include <signal.h>

View File

@ -6,13 +6,13 @@
** But instead of duplicating this we use the information available
** from the kernel sources.
*/
#include <fxlibc/asm/unistd.h>
#include <bits/unistd.h>
/*
** The Linux kernel header file defines macros __NR_*, but some
** programs expect the traditional form SYS_*. <bits/syscall.h>
** defines SYS_* macros for __NR_* macros of known names.
*/
#include <fxlibc/bits/syscall.h>
#include <bits/syscall.h>
#endif

View File

@ -9,10 +9,10 @@
** This will define the `W*' macros for the flag bits to `waitpid', `wait3',
** and `wait4'.
*/
#include <fxlibc/bits/waitflags.h>
#include <bits/waitflags.h>
/* This will define all the `__W*' macros.*/
#include <fxlibc/bits/waitstatus.h>
#include <bits/waitstatus.h>
/* Macros for the `waitpid`'s wstatus argument. */
#define WEXITSTATUS(status) __WEXITSTATUS(status)

View File

@ -0,0 +1,7 @@
#ifndef __BITS_CONFNAME_H__
# define __BITS_CONFNAME_H__
#define _SC_PAGE_SIZE 0
#define _SC_PAGESIZE _SC_PAGE_SIZE
#endif /*__BITS_CONFNAME_H__*/

View File

@ -0,0 +1,7 @@
#ifndef __BITS_CONFNAME_H__
# define __BITS_CONFNAME_H__
#define _SC_PAGE_SIZE 0
#define _SC_PAGESIZE _SC_PAGE_SIZE
#endif /*__BITS_CONFNAME_H__*/

View File

@ -0,0 +1,7 @@
#ifndef __BITS_CONFNAME_H__
# define __BITS_CONFNAME_H__
#define _SC_PAGE_SIZE 0
#define _SC_PAGESIZE _SC_PAGE_SIZE
#endif /*__BITS_CONFNAME_H__*/

View File

@ -4,7 +4,7 @@
#include <stdint.h>
#include <stddef.h>
#include <fxlibc/sys/types.h>
#include <sys/types.h>
//---
// TODO: VFS abstraction ? or ABI-spesific abstraction ?

View File

@ -1,5 +1,5 @@
#ifdef __SUPPORT_VHEX_KERNEL
#include <fxlibc/asm/unistd_32.h>
#include <bits/asm/unistd_32.h>
.text
.global _kill
.type _kill, @function

View File

@ -1,5 +1,5 @@
#ifdef __SUPPORT_VHEX_KERNEL
#include <fxlibc/asm/unistd_32.h>
#include <bits/asm/unistd_32.h>
.text
.global _signal
.type _signal, @function

View File

@ -1,4 +1,4 @@
#include <fxlibc/stdio.h>
#include <stdio.h>
/*
** The function dprintf() is the same as fprintf() except that it outputs to a

View File

@ -1,4 +1,4 @@
#include <fxlibc/stdio.h>
#include <stdio.h>
// internal depency
#include "printf.h"

View File

@ -1,4 +1,4 @@
#include <fxlibc/stdio.h>
#include <stdio.h>
// internal depency
#include "printf.h"

View File

@ -1,4 +1,4 @@
#include <fxlibc/stdio.h>
#include <stdio.h>
// internal depency
#include "printf.h"

View File

@ -1,5 +1,5 @@
#include <fxlibc/stdio.h>
#include <fxlibc/unistd.h>
#include <stdio.h>
#include <unistd.h>
/*
** printf() write the output under the control of a format string that specifies

View File

@ -1,5 +1,5 @@
#include <fxlibc/stdio.h>
#include <fxlibc/unistd.h>
#include <stdio.h>
#include <unistd.h>
int putchar(int c)
{

View File

@ -1,6 +1,6 @@
#include <fxlibc/stdio.h>
#include <fxlibc/string.h>
#include <fxlibc/unistd.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
/*
** puts() writes the string s and a trailing newline to stdout.

View File

@ -1,4 +1,4 @@
#include <fxlibc/stdio.h>
#include <stdio.h>
/*
** sprintf(), snprintf(), vsprintf() and vsnprintf() write the output under the

View File

@ -1,4 +1,4 @@
#include <fxlibc/stdio.h>
#include <stdio.h>
/*
** sprintf(), snprintf(), vsprintf() and vsnprintf() write the output under the

View File

@ -1,5 +1,5 @@
#include <fxlibc/stdio.h>
#include <fxlibc/unistd.h>
#include <stdio.h>
#include <unistd.h>
// internal depency
#include "internal/printf.h"

View File

@ -1,4 +1,4 @@
#include <fxlibc/stdio.h>
#include <stdio.h>
// internal depency
#include "internal/printf.h"

View File

@ -1,4 +1,4 @@
#include <fxlibc/stdio.h>
#include <stdio.h>
/*
** The functions vsprintf() are equivalent to the sprintf() except that they

View File

@ -1,6 +1,6 @@
#include <fxlibc/stdlib.h>
#include <fxlibc/string.h>
#include <fxlibc/unistd.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
/*
** The calloc() function allocates memory for an array of nmemb elements of size

View File

@ -1,4 +1,4 @@
#include <fxlibc/stdlib.h>
#include <stdlib.h>
/*
** The reallocarray() function changes the size of the memory block pointed to

View File

@ -1,5 +1,5 @@
#ifdef __SUPPORT_VHEX_KERNEL
#include <fxlibc/asm/unistd_32.h>
#include <bits/asm/unistd_32.h>
.text
.global _free
.type _free, @function

View File

@ -1,5 +1,5 @@
#ifdef __SUPPORT_VHEX_KERNEL
#include <fxlibc/asm/unistd_32.h>
#include <bits/asm/unistd_32.h>
.text
.global _malloc
.type _malloc, @function

View File

@ -1,5 +1,5 @@
#ifdef __SUPPORT_VHEX_KERNEL
#include <fxlibc/asm/unistd_32.h>
#include <bits/asm/unistd_32.h>
.text
.global _realloc
.type _realloc, @function

View File

@ -1,4 +1,5 @@
#include <fxlibc/string.h>
#include <string.h>
#include <stdint.h>
/*
** The memcpy() function copies n bytes from memory area src to memory area dest.

View File

@ -1,4 +1,5 @@
#include <fxlibc/string.h>
#include <string.h>
#include <stdint.h>
/*
** The memset() function fills the first n bytes of the memory area pointed to

View File

@ -1,4 +1,4 @@
#include <fxlibc/string.h>
#include <string.h>
/*
** The strcat() function appends the src string to the dest string,

View File

@ -1,4 +1,4 @@
#include <fxlibc/string.h>
#include <string.h>
/*
** The strchr() function returns a pointer to the first occurrence of the

View File

@ -1,4 +1,4 @@
#include <fxlibc/string.h>
#include <string.h>
/*
** The strcmp() function compares the two strings s1 and s2. The locale is not

View File

@ -1,4 +1,4 @@
#include <fxlibc/string.h>
#include <string.h>
/*
** The strcpy() function copies the string pointed to by src, including the

View File

@ -1,5 +1,5 @@
#include <fxlibc/string.h>
#include <fxlibc/stdlib.h>
#include <string.h>
#include <stdlib.h>
/*
** The strdup() function returns a pointer to a new string which is a

View File

@ -1,4 +1,4 @@
#include <fxlibc/string.h>
#include <string.h>
/*
** The strlen() function calculates the length of the string pointed to by s,

View File

@ -1,5 +1,5 @@
#include <fxlibc/threads.h>
#include <fxlibc/unistd.h>
#include <threads.h>
#include <unistd.h>
// Creates a new mutex object with type __TYPE.
// @note: If successful the new object is pointed by __MUTEX.

View File

@ -1,5 +1,5 @@
#ifdef __SUPPORT_VHEX_KERNEL
#include <fxlibc/asm/unistd_32.h>
#include <bits/asm/unistd_32.h>
.text
.global _open
.type _open, @function

View File

@ -1,5 +1,5 @@
#ifdef __SUPPORT_VHEX_KERNEL
#include <fxlibc/asm/unistd.h>
#include <bits/asm/unistd_32.h>
.text
.global _wait
.type _wait, @function

View File

@ -1,5 +1,5 @@
#ifdef __SUPPORT_VHEX_KERNEL
#include <fxlibc/asm/unistd.h>
#include <bits/asm/unistd_32.h>
.text
.global _waitpid
.type _waitpid, @function

View File

@ -1,6 +1,6 @@
#ifdef __SUPPORT_CASIO_ABI_FX9860G
#include <fxlibc/asm/unistd_32.h>
#include <fxlibc/asm-casio/__trapa.h>
#include <bits/unistd_32.h>
#include <bits/__trapa.h>
.text
.global _close
.type _close, @function

View File

@ -1,5 +1,5 @@
#ifdef __SUPPORT_VHEX_KERNEL
#include <fxlibc/asm/unistd.h>
#include <bits/asm/unistd_32.h>
.text
.global _close
.type _close, @function

View File

@ -1,5 +1,5 @@
#ifdef __SUPPORT_VHEX_KERNEL
#include <fxlibc/asm/unistd.h>
#include <bits/asm/unistd_32.h>
.text
.global _fork_execve
.type _fork_execve, @function

View File

@ -1,5 +1,5 @@
#ifdef __SUPPORT_VHEX_KERNEL
#include <fxlibc/asm/unistd.h>
#include <bits/asm/unistd_32.h>
.text
.global _getpgid
.type _getpgid, @function

View File

@ -1,5 +1,5 @@
#ifdef __SUPPORT_VHEX_KERNEL
#include <fxlibc/asm/unistd.h>
#include <bits/asm/unistd_32.h>
.text
.global _getpid
.type _getpid, @function

View File

@ -1,5 +1,5 @@
#ifdef __SUPPORT_VHEX_KERNEL
#include <fxlibc/asm/unistd.h>
#include <bits/asm/unistd_32.h>
.text
.global _getppid
.type _getppid, @function

View File

@ -1,5 +1,5 @@
#ifdef __SUPPORT_VHEX_KERNEL
#include <fxlibc/asm/unistd.h>
#include <bits/asm/unistd_32.h>
.text
.global _lseek
.type _lseek, @function

View File

@ -1,5 +1,5 @@
#ifdef __SUPPORT_VHEX_KERNEL
#include <fxlibc/asm/unistd.h>
#include <bits/asm/unistd_32.h>
.text
.global _read
.type _read, @function

View File

@ -1,5 +1,5 @@
#ifdef __SUPPORT_VHEX_KERNEL
#include <fxlibc/asm/unistd.h>
#include <bits/asm/unistd_32.h>
.text
.global _setpgid
.type _setpgid, @function

View File

@ -1,5 +1,5 @@
#ifdef __SUPPORT_VHEX_KERNEL
#include <fxlibc/asm/unistd.h>
#include <bits/asm/unistd_32.h>
.text
.global _write
.type _write, @function