# have_init_fini have init/fini ("yes" or "no", set to "yes" by default)
# noinclude list of include files to not install
-newlib_cflags="-D_COMPILING_NEWLIB"
+newlib_cflags="-D_LIBC"
libm_machine_dir=
machine_dir=
shared_machine_dir=
#include "_ansi.h"
#include <sys/cdefs.h>
-#if __POSIX_VISIBLE >= 200809 || __MISC_VISIBLE || defined (_COMPILING_NEWLIB)
+#if __POSIX_VISIBLE >= 200809 || __MISC_VISIBLE || defined (_LIBC)
#include <sys/_locale.h>
#endif
int (*)(const struct dirent *), int (*)(const struct dirent **,
const struct dirent **));
#endif
-#ifdef _COMPILING_NEWLIB
+#ifdef _LIBC
void _seekdir(DIR *, long);
#endif
#if __MISC_VISIBLE || __XSI_VISIBLE
#define LC_TIME 5
#define LC_MESSAGES 6
-#if __POSIX_VISIBLE >= 200809 || defined (_COMPILING_NEWLIB)
+#if __POSIX_VISIBLE >= 200809 || defined (_LIBC)
#include <sys/_locale.h>
extern int _stat64_r (struct _reent *, const char *, struct stat64 *);
/* Don't pollute namespace if not building newlib. */
-#if defined (__CYGWIN__) && !defined (_COMPILING_NEWLIB)
+#if defined (__CYGWIN__) && !defined (_LIBC)
#undef stat64
#endif
int ungetc (int, FILE *);
size_t fread (void *__restrict, size_t _size, size_t _n, FILE *__restrict);
size_t fwrite (const void *__restrict , size_t _size, size_t _n, FILE *);
-#ifdef _COMPILING_NEWLIB
+#ifdef _LIBC
int fgetpos (FILE *, _fpos_t *);
#else
int fgetpos (FILE *__restrict, fpos_t *__restrict);
#endif
int fseek (FILE *, long, int);
-#ifdef _COMPILING_NEWLIB
+#ifdef _LIBC
int fsetpos (FILE *, const _fpos_t *);
#else
int fsetpos (FILE *, const fpos_t *);
_ATTRIBUTE ((__format__ (__printf__, 2, 3)));
int remove (const char *);
int rename (const char *, const char *);
-#ifdef _COMPILING_NEWLIB
+#ifdef _LIBC
int _rename (const char *, const char *);
#endif
#endif
#if __LARGEFILE_VISIBLE || __POSIX_VISIBLE >= 200112
-#ifdef _COMPILING_NEWLIB
+#ifdef _LIBC
int fseeko (FILE *, _off_t, int);
_off_t ftello (FILE *);
#else
int _fgetc_unlocked_r (struct _reent *, FILE *);
char * _fgets_r (struct _reent *, char *__restrict, int, FILE *__restrict);
char * _fgets_unlocked_r (struct _reent *, char *__restrict, int, FILE *__restrict);
-#ifdef _COMPILING_NEWLIB
+#ifdef _LIBC
int _fgetpos_r (struct _reent *, FILE *__restrict, _fpos_t *__restrict);
int _fsetpos_r (struct _reent *, FILE *, const _fpos_t *);
#else
#endif
#ifdef __LARGE64_FILES
-#if !defined(__CYGWIN__) || defined(_COMPILING_NEWLIB)
+#if !defined(__CYGWIN__) || defined(_LIBC)
FILE * fdopen64 (int, const char *);
FILE * fopen64 (const char *, const char *);
FILE * freopen64 (const char *, const char *, FILE *);
/* Provide _<systemcall> prototypes for functions provided by some versions
of newlib. */
-#ifdef _COMPILING_NEWLIB
+#ifdef _LIBC
extern int _open (const char *, int, ...);
extern int _fcntl (int, int, ...);
#ifdef __LARGE64_FILES
#if _FORTIFY_SOURCE > 0 && !defined(__cplusplus) && !defined(__lint__) && \
(__OPTIMIZE__ > 0 || defined(__clang__)) && __GNUC_PREREQ__(4, 1) && \
- !defined(_COMPILING_NEWLIB)
+ !defined(_LIBC)
# if _FORTIFY_SOURCE > 1
# define __SSP_FORTIFY_LEVEL 2
# else
int pthread_sigmask (int, const sigset_t *, sigset_t *);
#endif
-#ifdef _COMPILING_NEWLIB
+#ifdef _LIBC
int _kill (pid_t, int);
-#endif /* _COMPILING_NEWLIB */
+#endif /* _LIBC */
#if __POSIX_VISIBLE
int kill (pid_t, int);
#ifdef __CYGWIN__
#include <cygwin/stat.h>
-#ifdef _COMPILING_NEWLIB
+#ifdef _LIBC
#define stat64 stat
#endif
#else
/* Provide prototypes for most of the _<systemcall> names that are
provided in newlib for some compilers. */
-#ifdef _COMPILING_NEWLIB
+#ifdef _LIBC
int _fstat (int __fd, struct stat *__sbuf );
int _stat (const char *__restrict __path, struct stat *__restrict __sbuf );
int _mkdir (const char *_path, mode_t __mode );
int futimesat (int, const char *, const struct timeval [2]);
#endif
-#ifdef _COMPILING_NEWLIB
+#ifdef _LIBC
int _gettimeofday (struct timeval *__p, void *__tz);
#endif
};
clock_t times (struct tms *);
-#ifdef _COMPILING_NEWLIB
+#ifdef _LIBC
clock_t _times (struct tms *);
#endif
pid_t vfork (void);
#endif
-#ifdef _COMPILING_NEWLIB
+#ifdef _LIBC
/* Provide prototypes for most of the _<systemcall> names that are
provided in newlib for some compilers. */
int _close (int __fildes);
pid_t wait (int *);
pid_t waitpid (pid_t, int *, int);
-#ifdef _COMPILING_NEWLIB
+#ifdef _LIBC
pid_t _wait (int *);
#endif
/* Provide _<systemcall> prototypes for functions provided by some versions
of newlib. */
-#ifdef _COMPILING_NEWLIB
+#ifdef _LIBC
extern int _open (const char *, int, ...);
extern int _fcntl (int, int, ...);
#ifdef __LARGE64_FILES
# define USE_MEMMOVE_FOR_OVERLAP
# define PREFETCH_LOAD_HINT PREFETCH_HINT_LOAD_STREAMED
# define PREFETCH_STORE_HINT PREFETCH_HINT_PREPAREFORSTORE
-#elif _COMPILING_NEWLIB
+#elif _LIBC
# include "machine/asm.h"
# include "machine/regdef.h"
# define PREFETCH_LOAD_HINT PREFETCH_HINT_LOAD_STREAMED
# include "machine/asm.h"
# include "machine/regdef.h"
# define PREFETCH_STORE_HINT PREFETCH_HINT_PREPAREFORSTORE
-#elif _COMPILING_NEWLIB
+#elif _LIBC
# include "machine/asm.h"
# include "machine/regdef.h"
# define PREFETCH_STORE_HINT PREFETCH_HINT_PREPAREFORSTORE
#ifdef ANDROID_CHANGES
# include "machine/asm.h"
# include "machine/regdef.h"
-#elif _COMPILING_NEWLIB
+#elif _LIBC
# include "machine/asm.h"
# include "machine/regdef.h"
#else
#include <stdlib.h>
#include <unistd.h>
-#define _COMPILING_NEWLIB
+#define _LIBC
#include <dirent.h>
#include "cygerrno.h"
#include "cygheap.h"
#include "shared_info.h"
-#define _COMPILING_NEWLIB
+#define _LIBC
#include <dirent.h>
fhandler_cygdrive::fhandler_cygdrive () :
#include "cygheap.h"
#include "devices.h"
-#define _COMPILING_NEWLIB
+#define _LIBC
#include <dirent.h>
#define dev_prefix_len (sizeof ("/dev"))
#include <aio.h>
#include <cygwin/fs.h>
-#define _COMPILING_NEWLIB
+#define _LIBC
#include <dirent.h>
enum __DIR_mount_type {
#include "mount.h"
#include <math.h>
-#define _COMPILING_NEWLIB
+#define _LIBC
#include <dirent.h>
static off_t format_proc_loadavg (void *, char *&);
#include <sys/param.h>
#include <ctype.h>
-#define _COMPILING_NEWLIB
+#define _LIBC
#include <dirent.h>
static off_t format_process_maps (void *, char *&);
#include <sys/param.h>
#include <ctype.h>
-#define _COMPILING_NEWLIB
+#define _LIBC
#include <dirent.h>
#define _KERNEL
#include "cygheap.h"
#include "child_info.h"
-#define _COMPILING_NEWLIB
+#define _LIBC
#include <dirent.h>
/* If this bit is set in __d_position then we are enumerating values,
compute these offsets already exists for the sake of gendef so
we might as well just use it here. */
-#if defined (_COMPILING_NEWLIB) || defined (__INSIDE_CYGWIN__)
+#if defined (_LIBC) || defined (__INSIDE_CYGWIN__)
#ifdef __x86_64__
#include "../tlsoffsets64.h"
#else
#endif
return (struct _reent *) (ret + tls_local_clib);
}
-#endif /* _COMPILING_NEWLIB || __INSIDE_CYGWIN__ */
+#endif /* _LIBC || __INSIDE_CYGWIN__ */
#ifdef __x86_64__
# define __SYMBOL_PREFIX
#define __TM_ZONE tm_zone
#define _USE_LONG_TIME_T 1
-#if defined(__INSIDE_CYGWIN__) || defined(_COMPILING_NEWLIB)
+#if defined(__INSIDE_CYGWIN__) || defined(_LIBC)
#define __EXPORT __declspec(dllexport)
#define __IMPORT
#else
timestruc_t st_birthtim;
};
-#if defined (__INSIDE_CYGWIN__) || defined (_COMPILING_NEWLIB)
+#if defined (__INSIDE_CYGWIN__) || defined (_LIBC)
#ifdef __i386__
struct __stat32
{
int posix_openpt (int);
#endif
-#ifdef _COMPILING_NEWLIB
+#ifdef _LIBC
#define unsetenv UNUSED_unsetenv
#define _unsetenv_r UNUSED__unsetenv_r
#endif
* SUCH DAMAGE.
*/
-#ifdef _COMPILING_NEWLIB
+#ifdef _LIBC
#include_next "getopt.h"
#else
#ifndef __GETOPT_H__
#include <machine/_default_types.h>
-#if defined (__INSIDE_CYGWIN__) || defined (_COMPILING_NEWLIB)
+#if defined (__INSIDE_CYGWIN__) || defined (_LIBC)
typedef __int32_t __blkcnt32_t;
typedef __int16_t __dev16_t;
typedef __uint16_t __uid16_t;
#endif
typedef struct __DIR
{
- /* This is first to set alignment in non _COMPILING_NEWLIB case. */
+ /* This is first to set alignment in non _LIBC case. */
unsigned long __d_cookie;
struct dirent *__d_dirent;
char *__d_dirname; /* directory name with trailing '*' */
#ifndef _SYS_SYSLIMITS_H
#define _SYS_SYSLIMITS_H
-#ifdef _COMPILING_NEWLIB
+#ifdef _LIBC
# include <limits.h>
#else
# error "Do not include sys/syslimits.h from applications directly."
pid_t wait3 (int *__status, int __options, struct rusage *__rusage);
pid_t wait4 (pid_t __pid, int *__status, int __options, struct rusage *__rusage);
-#ifdef _COMPILING_NEWLIB
+#ifdef _LIBC
pid_t _wait (int *);
#endif
#ifdef __CYGWIN__
/* Disable __IMPORT when defining __fdlib_version. */
-#define _COMPILING_NEWLIB
+#define _LIBC
#define _GNU_SOURCE
#endif
#include <math.h>