mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-22 21:23:07 +03:00
* Use newlib libc library This change adds libcmin.a, which is created from newlib libc by selectively removing some of the object files (mostly related to heap management). The list of files is available in tools/sdk/lib/make_libcmin.sh. Files which are not needed are commented out. This change adds support for various functions which were missing, like sscanf, strftime, etc. * Fix some of the time functions * Redirect stdout to serial * Implement __putc_r * Switch to custom newlib build Built from https://github.com/igrr/newlib-xtensa using: ./configure --with-newlib --enable-multilib --disable-newlib-io-c99-formats --enable-newlib-supplied-syscalls --enable-target-optspace --program-transform-name="s&^&xtensa-lx106-elf-&" --disable-option-checking --with-target-subdir=xtensa-lx106-elf --target=xtensa-lx106-elf --enable-newlib-nano-formatted-io --enable-newlib-reent-small --prefix=path-to-arduino-core/tools/sdk/libc CROSS_CFLAGS="-DMALLOC_PROVIDED -DSIGNAL_PROVIDED -DABORT_PROVIDED" make make install * Update tests
41 lines
1.1 KiB
C
41 lines
1.1 KiB
C
/* internal use only -- mapping of "system calls" for libraries that lose
|
|
and only provide C names, so that we end up in violation of ANSI */
|
|
#ifndef __SYSLIST_H
|
|
#define __SYSLIST_H
|
|
|
|
#ifdef MISSING_SYSCALL_NAMES
|
|
#define _close close
|
|
#define _execve execve
|
|
#define _fcntl fcntl
|
|
#define _fork fork
|
|
#define _fstat fstat
|
|
#define _getpid getpid
|
|
#define _gettimeofday gettimeofday
|
|
#define _isatty isatty
|
|
#define _kill kill
|
|
#define _link link
|
|
#define _lseek lseek
|
|
#define _mkdir mkdir
|
|
#define _open open
|
|
#define _read read
|
|
#define _sbrk sbrk
|
|
#define _stat stat
|
|
#define _times times
|
|
#define _unlink unlink
|
|
#define _wait wait
|
|
#define _write write
|
|
#endif /* MISSING_SYSCALL_NAMES */
|
|
|
|
#if defined MISSING_SYSCALL_NAMES || !defined HAVE_OPENDIR
|
|
/* If the system call interface is missing opendir, readdir, and
|
|
closedir, there is an implementation of these functions in
|
|
libc/posix that is implemented using open, getdents, and close.
|
|
Note, these functions are currently not in the libc/syscalls
|
|
directory. */
|
|
#define _opendir opendir
|
|
#define _readdir readdir
|
|
#define _closedir closedir
|
|
#endif /* MISSING_SYSCALL_NAMES || !HAVE_OPENDIR */
|
|
|
|
#endif /* !__SYSLIST_H_ */
|