35#ifndef __error_t_defined
36#define __error_t_defined 1
40#if !defined(__ARMCC_VERSION) && defined(__GNUC__)
44#if defined __has_include
45# if __has_include (<sys/stat.h>)
47# define HAVE_SYS_STAT_H
54typedef signed int ssize_t;
55typedef signed long off_t;
56typedef unsigned int nfds_t;
57typedef unsigned long long fsblkcnt_t;
58#if defined(__ARMCC_VERSION) || !defined(__GNUC__)
59typedef unsigned int mode_t;
60typedef unsigned int dev_t;
61typedef unsigned long ino_t;
62typedef unsigned int nlink_t;
63typedef unsigned int uid_t;
64typedef unsigned int gid_t;
80#define O_NONBLOCK 0x0004
83#define O_APPEND 0x0008
95#define O_BINARY 0x8000
98#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
103#define STDIN_FILENO 0
104#define STDOUT_FILENO 1
105#define STDERR_FILENO 2
112#if !MBED_CONF_PLATFORM_STDIO_MINIMAL_CONSOLE_ONLY
140FileHandle *mbed_target_override_console(
int fd);
186FileHandle *mbed_override_console(
int fd);
208FileHandle *mbed_file_handle(
int fd);
211typedef struct DIR_impl DIR;
328#define ENAMETOOLONG 36
343#define EWOULDBLOCK EAGAIN
394#define EDEADLOCK EDEADLK
472#if defined ( __ICCARM__ )
494#define EDESTADDRREQ 89
503#define ENOPROTOOPT 92
505#ifndef EPROTONOSUPPORT
506#define EPROTONOSUPPORT 93
508#ifndef ESOCKTNOSUPPORT
509#define ESOCKTNOSUPPORT 94
515#define EPFNOSUPPORT 96
518#define EAFNOSUPPORT 97
524#define EADDRNOTAVAIL 99
530#define ENETUNREACH 101
536#define ECONNABORTED 103
539#define ECONNRESET 104
554#define ETOOMANYREFS 109
560#define ECONNREFUSED 111
566#define EHOSTUNREACH 113
572#define EINPROGRESS 115
599#define EMEDIUMTYPE 224
608#define EKEYEXPIRED 227
611#define EKEYREVOKED 228
614#define EKEYREJECTED 229
617#define EOWNERDEAD 130
619#ifndef ENOTRECOVERABLE
620#define ENOTRECOVERABLE 131
630#define _IFSOCK 0140000
631#define _IFLNK 0120000
632#define _IFREG 0100000
633#define _IFBLK 0060000
634#define _IFDIR 0040000
635#define _IFCHR 0020000
636#define _IFIFO 0010000
639#define S_IFSOCK _IFSOCK
640#define S_IFLNK _IFLNK
641#define S_IFREG _IFREG
642#define S_IFBLK _IFBLK
643#define S_IFDIR _IFDIR
644#define S_IFCHR _IFCHR
645#define S_IFIFO _IFIFO
647#define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
648#define S_IRUSR 0000400
649#define S_IWUSR 0000200
650#define S_IXUSR 0000100
651#define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
652#define S_IRGRP 0000040
653#define S_IWGRP 0000020
654#define S_IXGRP 0000010
655#define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
656#define S_IROTH 0000004
657#define S_IWOTH 0000002
658#define S_IXOTH 0000001
660#ifndef HAVE_SYS_STAT_H
729#if !MBED_CONF_PLATFORM_STDIO_MINIMAL_CONSOLE_ONLY
730 int open(
const char *path,
int oflag, ...);
731#ifndef __IAR_SYSTEMS_ICC__
733 std::FILE *fdopen(
int fildes,
const char *mode);
735 FILE *fdopen(
int fildes,
const char *mode);
739 ssize_t write(
int fildes,
const void *buf,
size_t nbyte);
740 ssize_t read(
int fildes,
void *buf,
size_t nbyte);
741 int fsync(
int fildes);
742 int isatty(
int fildes);
743#if !MBED_CONF_PLATFORM_STDIO_MINIMAL_CONSOLE_ONLY
744 off_t lseek(
int fildes, off_t offset,
int whence);
745 int ftruncate(
int fildes, off_t length);
746 int fstat(
int fildes,
struct stat *st);
747 int fcntl(
int fildes,
int cmd, ...);
748 int poll(
struct pollfd fds[], nfds_t nfds,
int timeout);
749 int close(
int fildes);
750 int stat(
const char *path,
struct stat *st);
752 DIR *opendir(
const char *);
753 struct dirent *readdir(DIR *);
755 void rewinddir(DIR *);
757 void seekdir(DIR *,
long);
758 int mkdir(
const char *name, mode_t n);
764#if !MBED_CONF_PLATFORM_STDIO_MINIMAL_CONSOLE_ONLY
805int minimal_console_putc(
int c);
817int minimal_console_getc();
char d_name[255+1]
Name of file.
uint8_t d_type
Type of file.
dev_t st_dev
Device ID containing file.
off_t st_size
Size of file in bytes.
time_t st_ctime
Time of last status change.
time_t st_atime
Time of last access.
nlink_t st_nlink
Number of links to file.
ino_t st_ino
File serial number.
time_t st_mtime
Time of last data modification.
mode_t st_mode
Mode of file.
fsblkcnt_t f_bfree
Number of free blocks.
unsigned long f_bsize
Filesystem block size.
unsigned long f_fsid
Filesystem ID.
fsblkcnt_t f_blocks
Number of blocks.
unsigned long f_namemax
Maximum filename length.
unsigned long f_frsize
Fragment size (block size)
fsblkcnt_t f_bavail
Number of free blocks for unprivileged users.