forked from KolibriOS/kolibrios
newlib: update
git-svn-id: svn://kolibrios.org@5141 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
5d2391c32e
commit
5a61e87775
@ -130,6 +130,7 @@ CORE_SRCS:= \
|
|||||||
sys/lseek.c \
|
sys/lseek.c \
|
||||||
sys/open.c \
|
sys/open.c \
|
||||||
sys/read.c \
|
sys/read.c \
|
||||||
|
sys/stat.c \
|
||||||
sys/unlink.c \
|
sys/unlink.c \
|
||||||
sys/write.c \
|
sys/write.c \
|
||||||
sys/io_alloc.S \
|
sys/io_alloc.S \
|
||||||
@ -244,6 +245,8 @@ STDIO_SRCS= \
|
|||||||
fopen.c \
|
fopen.c \
|
||||||
fclose.c \
|
fclose.c \
|
||||||
fdopen.c \
|
fdopen.c \
|
||||||
|
feof.c \
|
||||||
|
ferror.c \
|
||||||
fflush.c \
|
fflush.c \
|
||||||
flags.c \
|
flags.c \
|
||||||
fileno.c \
|
fileno.c \
|
||||||
@ -300,10 +303,11 @@ MATH_SRCS = e_acos.c e_acosh.c e_asin.c e_atan2.c e_atanh.c e_cosh.c e_exp.c e_
|
|||||||
ef_jn.c ef_log.c ef_log10.c ef_pow.c ef_rem_pio2.c ef_remainder.c ef_scalb.c \
|
ef_jn.c ef_log.c ef_log10.c ef_pow.c ef_rem_pio2.c ef_remainder.c ef_scalb.c \
|
||||||
ef_sinh.c ef_sqrt.c er_gamma.c er_lgamma.c erf_gamma.c erf_lgamma.c f_exp.c \
|
ef_sinh.c ef_sqrt.c er_gamma.c er_lgamma.c erf_gamma.c erf_lgamma.c f_exp.c \
|
||||||
f_expf.c f_llrint.c f_llrintf.c f_llrintl.c f_lrint.c f_lrintf.c f_lrintl.c \
|
f_expf.c f_llrint.c f_llrintf.c f_llrintl.c f_lrint.c f_lrintf.c f_lrintl.c \
|
||||||
f_pow.c f_powf.c f_rint.c f_rintf.c f_rintl.c k_cos.c k_rem_pio2.c k_sin.c \
|
f_pow.c f_powf.c f_rint.c f_rintf.c f_rintl.c feclearexcept.c fetestexcept.c \
|
||||||
k_standard.c k_tan.c kf_cos.c kf_rem_pio2.c kf_sin.c kf_tan.c s_asinh.c \
|
k_cos.c k_rem_pio2.c k_sin.c k_standard.c k_tan.c kf_cos.c kf_rem_pio2.c \
|
||||||
s_atan.c s_cbrt.c s_ceil.c s_copysign.c s_cos.c s_erf.c s_exp10.c s_expm1.c \
|
kf_sin.c kf_tan.c s_asinh.c s_atan.c s_cbrt.c s_ceil.c s_copysign.c s_cos.c \
|
||||||
s_fabs.c s_fdim.c s_finite.c s_floor.c s_fma.c s_fmax.c s_fmin.c s_fpclassify.c \
|
s_erf.c s_exp10.c s_expm1.c s_fabs.c s_fdim.c s_finite.c s_floor.c s_fma.c \
|
||||||
|
s_fmax.c s_fmin.c s_fpclassify.c \
|
||||||
s_frexp.c s_ilogb.c s_infconst.c s_infinity.c s_isinf.c s_isinfd.c s_isnan.c \
|
s_frexp.c s_ilogb.c s_infconst.c s_infinity.c s_isinf.c s_isinfd.c s_isnan.c \
|
||||||
s_isnand.c s_ldexp.c s_lib_ver.c s_llrint.c s_llround.c s_log1p.c s_log2.c \
|
s_isnand.c s_ldexp.c s_lib_ver.c s_llrint.c s_llround.c s_log1p.c s_log2.c \
|
||||||
s_logb.c s_lrint.c s_lround.c s_matherr.c s_modf.c s_nan.c s_nearbyint.c \
|
s_logb.c s_lrint.c s_lround.c s_matherr.c s_modf.c s_nan.c s_nearbyint.c \
|
||||||
|
@ -48,7 +48,7 @@ CORE_SRCS = {
|
|||||||
"sys/close.c", "sys/create.c", "sys/delete.c", "sys/errno.c", "sys/finfo.c",
|
"sys/close.c", "sys/create.c", "sys/delete.c", "sys/errno.c", "sys/finfo.c",
|
||||||
"sys/fsize.c", "sys/fstat.c", "sys/gettod.c", "sys/io.c", "sys/ioread.c",
|
"sys/fsize.c", "sys/fstat.c", "sys/gettod.c", "sys/io.c", "sys/ioread.c",
|
||||||
"sys/iowrite.c", "sys/isatty.c", "sys/lseek.c", "sys/open.c", "sys/read.c",
|
"sys/iowrite.c", "sys/isatty.c", "sys/lseek.c", "sys/open.c", "sys/read.c",
|
||||||
"sys/unlink.c", "sys/write.c", "sys/io_alloc.S",
|
"sys/stat.c", "sys/unlink.c", "sys/write.c", "sys/io_alloc.S",
|
||||||
"time/asctime.c", "time/asctime_r.c", "time/clock.c", "time/ctime.c",
|
"time/asctime.c", "time/asctime_r.c", "time/clock.c", "time/ctime.c",
|
||||||
"time/ctime_r.c", "time/difftime.c", "time/gettzinfo.c", "time/gmtime.c",
|
"time/ctime_r.c", "time/difftime.c", "time/gettzinfo.c", "time/gmtime.c",
|
||||||
"time/gmtime_r.c", "time/mktime.c", "time/mktm_r.c", "time/lcltime.c",
|
"time/gmtime_r.c", "time/mktime.c", "time/mktm_r.c", "time/lcltime.c",
|
||||||
@ -95,9 +95,9 @@ MATH_SRCS = {
|
|||||||
"ef_jn.c", "ef_log.c", "ef_log10.c", "ef_pow.c", "ef_rem_pio2.c", "ef_remainder.c", "ef_scalb.c",
|
"ef_jn.c", "ef_log.c", "ef_log10.c", "ef_pow.c", "ef_rem_pio2.c", "ef_remainder.c", "ef_scalb.c",
|
||||||
"ef_sinh.c", "ef_sqrt.c", "er_gamma.c", "er_lgamma.c", "erf_gamma.c", "erf_lgamma.c", "f_exp.c",
|
"ef_sinh.c", "ef_sqrt.c", "er_gamma.c", "er_lgamma.c", "erf_gamma.c", "erf_lgamma.c", "f_exp.c",
|
||||||
"f_expf.c", "f_llrint.c", "f_llrintf.c", "f_llrintl.c", "f_lrint.c", "f_lrintf.c", "f_lrintl.c",
|
"f_expf.c", "f_llrint.c", "f_llrintf.c", "f_llrintl.c", "f_lrint.c", "f_lrintf.c", "f_lrintl.c",
|
||||||
"f_pow.c", "f_powf.c", "f_rint.c", "f_rintf.c", "f_rintl.c", "k_cos.c", "k_rem_pio2.c", "k_sin.c",
|
"f_pow.c", "f_powf.c", "f_rint.c", "f_rintf.c", "f_rintl.c", "feclearexcept.c", "fetestexcept.c",
|
||||||
"k_standard.c", "k_tan.c", "kf_cos.c", "kf_rem_pio2.c", "kf_sin.c", "kf_tan.c", "s_asinh.c",
|
"k_cos.c", "k_rem_pio2.c", "k_sin.c", "k_standard.c", "k_tan.c", "kf_cos.c", "kf_rem_pio2.c", "kf_sin.c",
|
||||||
"s_atan.c", "s_cbrt.c", "s_ceil.c", "s_copysign.c", "s_cos.c", "s_erf.c", "s_exp10.c", "s_expm1.c",
|
"kf_tan.c", "s_asinh.c", "s_atan.c", "s_cbrt.c", "s_ceil.c", "s_copysign.c", "s_cos.c", "s_erf.c", "s_exp10.c", "s_expm1.c",
|
||||||
"s_fabs.c", "s_fdim.c", "s_finite.c", "s_floor.c", "s_fma.c", "s_fmax.c", "s_fmin.c", "s_fpclassify.c",
|
"s_fabs.c", "s_fdim.c", "s_finite.c", "s_floor.c", "s_fma.c", "s_fmax.c", "s_fmin.c", "s_fpclassify.c",
|
||||||
"s_frexp.c", "s_ilogb.c", "s_infconst.c", "s_infinity.c", "s_isinf.c", "s_isinfd.c", "s_isnan.c",
|
"s_frexp.c", "s_ilogb.c", "s_infconst.c", "s_infinity.c", "s_isinf.c", "s_isinfd.c", "s_isnan.c",
|
||||||
"s_isnand.c", "s_ldexp.c", "s_lib_ver.c", "s_llrint.c", "s_llround.c", "s_log1p.c", "s_log2.c",
|
"s_isnand.c", "s_ldexp.c", "s_lib_ver.c", "s_llrint.c", "s_llround.c", "s_log1p.c", "s_log2.c",
|
||||||
|
@ -5,6 +5,10 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
//#ifdef CONFIG_DEBUF
|
//#ifdef CONFIG_DEBUF
|
||||||
// #define DBG(format,...) printf(format,##__VA_ARGS__)
|
// #define DBG(format,...) printf(format,##__VA_ARGS__)
|
||||||
//#else
|
//#else
|
||||||
@ -440,7 +444,7 @@ struct blit_call
|
|||||||
int srcw;
|
int srcw;
|
||||||
int srch;
|
int srch;
|
||||||
|
|
||||||
unsigned char *bitmap;
|
void *bitmap;
|
||||||
int stride;
|
int stride;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -466,6 +470,11 @@ static inline void Blit(void *bitmap, int dst_x, int dst_y,
|
|||||||
::"a"(73),"b"(0),"c"(&bc.dstx));
|
::"a"(73),"b"(0),"c"(&bc.dstx));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
#error "<dirent.h> not supported"
|
//#error "<dirent.h> not supported"
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
15
contrib/sdk/sources/newlib/libc/math/feclearexcept.c
Normal file
15
contrib/sdk/sources/newlib/libc/math/feclearexcept.c
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#include <fenv.h>
|
||||||
|
|
||||||
|
/* 7.6.2.1
|
||||||
|
The feclearexcept function clears the supported exceptions
|
||||||
|
represented by its argument.
|
||||||
|
*/
|
||||||
|
|
||||||
|
int feclearexcept (int excepts)
|
||||||
|
{
|
||||||
|
fenv_t _env;
|
||||||
|
__asm__ volatile ("fnstenv %0;" : "=m" (_env)); /* get the env */
|
||||||
|
_env.__status_word &= ~(excepts & FE_ALL_EXCEPT); /* clear the except */
|
||||||
|
__asm__ volatile ("fldenv %0;" :: "m" (_env)); /*set the env */
|
||||||
|
return 0;
|
||||||
|
}
|
17
contrib/sdk/sources/newlib/libc/math/fetestexcept.c
Normal file
17
contrib/sdk/sources/newlib/libc/math/fetestexcept.c
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#include <fenv.h>
|
||||||
|
|
||||||
|
/* 7.6.2.5
|
||||||
|
The fetestexcept function determines which of a specified subset of
|
||||||
|
the exception flags are currently set. The excepts argument
|
||||||
|
specifies the exception flags to be queried.
|
||||||
|
The fetestexcept function returns the value of the bitwise OR of the
|
||||||
|
exception macros corresponding to the currently set exceptions
|
||||||
|
included in excepts.
|
||||||
|
*/
|
||||||
|
|
||||||
|
int fetestexcept (int excepts)
|
||||||
|
{
|
||||||
|
unsigned short _sw;
|
||||||
|
__asm__ ("fnstsw %%ax" : "=a" (_sw));
|
||||||
|
return _sw & excepts & FE_ALL_EXCEPT;
|
||||||
|
}
|
74
contrib/sdk/sources/newlib/libc/stdio/ferror.c
Normal file
74
contrib/sdk/sources/newlib/libc/stdio/ferror.c
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 1990 The Regents of the University of California.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms are permitted
|
||||||
|
* provided that the above copyright notice and this paragraph are
|
||||||
|
* duplicated in all such forms and that any documentation,
|
||||||
|
* advertising materials, and other materials related to such
|
||||||
|
* distribution and use acknowledge that the software was developed
|
||||||
|
* by the University of California, Berkeley. The name of the
|
||||||
|
* University may not be used to endorse or promote products derived
|
||||||
|
* from this software without specific prior written permission.
|
||||||
|
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
|
||||||
|
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
FUNCTION
|
||||||
|
<<ferror>>---test whether read/write error has occurred
|
||||||
|
|
||||||
|
INDEX
|
||||||
|
ferror
|
||||||
|
|
||||||
|
ANSI_SYNOPSIS
|
||||||
|
#include <stdio.h>
|
||||||
|
int ferror(FILE *<[fp]>);
|
||||||
|
|
||||||
|
TRAD_SYNOPSIS
|
||||||
|
#include <stdio.h>
|
||||||
|
int ferror(<[fp]>)
|
||||||
|
FILE *<[fp]>;
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
The <<stdio>> functions maintain an error indicator with each file
|
||||||
|
pointer <[fp]>, to record whether any read or write errors have
|
||||||
|
occurred on the associated file or stream.
|
||||||
|
Use <<ferror>> to query this indicator.
|
||||||
|
|
||||||
|
See <<clearerr>> to reset the error indicator.
|
||||||
|
|
||||||
|
RETURNS
|
||||||
|
<<ferror>> returns <<0>> if no errors have occurred; it returns a
|
||||||
|
nonzero value otherwise.
|
||||||
|
|
||||||
|
PORTABILITY
|
||||||
|
ANSI C requires <<ferror>>.
|
||||||
|
|
||||||
|
No supporting OS subroutines are required.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(LIBC_SCCS) && !defined(lint)
|
||||||
|
static char sccsid[] = "%W% (Berkeley) %G%";
|
||||||
|
#endif /* LIBC_SCCS and not lint */
|
||||||
|
|
||||||
|
#include <_ansi.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "local.h"
|
||||||
|
|
||||||
|
/* A subroutine version of the macro ferror. */
|
||||||
|
|
||||||
|
#undef ferror
|
||||||
|
|
||||||
|
int
|
||||||
|
_DEFUN(ferror, (fp),
|
||||||
|
FILE * fp)
|
||||||
|
{
|
||||||
|
int result;
|
||||||
|
CHECK_INIT(_REENT, fp);
|
||||||
|
_newlib_flockfile_start (fp);
|
||||||
|
result = __sferror (fp);
|
||||||
|
_newlib_flockfile_end (fp);
|
||||||
|
return result;
|
||||||
|
}
|
30
contrib/sdk/sources/newlib/libc/sys/stat.c
Normal file
30
contrib/sdk/sources/newlib/libc/sys/stat.c
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
/* stat.c -- Get the status of a file.
|
||||||
|
*
|
||||||
|
* Copyright (c) 1995 Cygnus Support
|
||||||
|
*
|
||||||
|
* The authors hereby grant permission to use, copy, modify, distribute,
|
||||||
|
* and license this software and its documentation for any purpose, provided
|
||||||
|
* that existing copyright notices are retained in all copies and that this
|
||||||
|
* notice is included verbatim in any distributions. No written agreement,
|
||||||
|
* license, or royalty fee is required for any of the authorized uses.
|
||||||
|
* Modifications to this software may be copyrighted by their authors
|
||||||
|
* and need not follow the licensing terms described here, provided that
|
||||||
|
* the new terms are clearly indicated on the first page of each file where
|
||||||
|
* they apply.
|
||||||
|
*/
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include "glue.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* stat -- Since we have no file system, we just return an error.
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
_DEFUN (stat, (path, buf),
|
||||||
|
const char *path _AND
|
||||||
|
struct stat *buf)
|
||||||
|
{
|
||||||
|
errno = EIO;
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user