mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +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
54 lines
1.5 KiB
C
54 lines
1.5 KiB
C
/* Copyright (C) 2002, 2010 by Red Hat, Incorporated. All rights reserved.
|
|
*
|
|
* Permission to use, copy, modify, and distribute this software
|
|
* is freely granted, provided that this notice is preserved.
|
|
*/
|
|
|
|
#ifndef _WORDEXP_H_
|
|
#define _WORDEXP_H_
|
|
|
|
#include <sys/types.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct _wordexp_t
|
|
{
|
|
size_t we_wordc; /* Count of words matched by words. */
|
|
char **we_wordv; /* Pointer to list of expanded words. */
|
|
size_t we_offs; /* Slots to reserve at the beginning of we_wordv. */
|
|
};
|
|
|
|
typedef struct _wordexp_t wordexp_t;
|
|
|
|
#define WRDE_DOOFFS 0x0001 /* Use we_offs. */
|
|
#define WRDE_APPEND 0x0002 /* Append to output from previous call. */
|
|
#define WRDE_NOCMD 0x0004 /* Don't perform command substitution. */
|
|
#define WRDE_REUSE 0x0008 /* pwordexp points to a wordexp_t struct returned from
|
|
a previous successful call to wordexp. */
|
|
#define WRDE_SHOWERR 0x0010 /* Print error messages to stderr. */
|
|
#define WRDE_UNDEF 0x0020 /* Report attempt to expand undefined shell variable. */
|
|
|
|
enum {
|
|
WRDE_SUCCESS,
|
|
WRDE_NOSPACE,
|
|
WRDE_BADCHAR,
|
|
WRDE_BADVAL,
|
|
WRDE_CMDSUB,
|
|
WRDE_SYNTAX,
|
|
WRDE_NOSYS
|
|
};
|
|
|
|
/* Note: This implementation of wordexp requires a version of bash
|
|
that supports the --wordexp and --protected arguments to be present
|
|
on the system. It does not support the WRDE_UNDEF flag. */
|
|
int wordexp(const char *__restrict, wordexp_t *__restrict, int);
|
|
void wordfree(wordexp_t *);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* _WORDEXP_H_ */
|