Search
lxdream.org :: lxdream/test/include/stdlib.h
lxdream 0.9.1
released Jun 29
Download Now
filename test/include/stdlib.h
changeset 185:6755a04c447f
author nkeynes
date Sat Aug 05 00:18:21 2006 +0000 (16 years ago)
permissions -rw-r--r--
last change Add error lines to tests with incomplete polys
Split clip tests to separate data file
Add tests for cmd bit 23 ("use list size field")
file annotate diff log raw
nkeynes@185
     1
/*
nkeynes@185
     2
 * stdlib.h
nkeynes@185
     3
 *
nkeynes@185
     4
 * Definitions for common types, variables, and functions.
nkeynes@185
     5
 */
nkeynes@185
     6
nkeynes@185
     7
#ifndef _STDLIB_H_
nkeynes@185
     8
#ifdef __cplusplus
nkeynes@185
     9
extern "C" {
nkeynes@185
    10
#endif
nkeynes@185
    11
#define _STDLIB_H_
nkeynes@185
    12
nkeynes@185
    13
#include "_ansi.h"
nkeynes@185
    14
nkeynes@185
    15
#define __need_size_t
nkeynes@185
    16
#define __need_wchar_t
nkeynes@185
    17
#include <stddef.h>
nkeynes@185
    18
nkeynes@185
    19
#include <sys/reent.h>
nkeynes@185
    20
nkeynes@185
    21
typedef struct 
nkeynes@185
    22
{
nkeynes@185
    23
  int quot; /* quotient */
nkeynes@185
    24
  int rem; /* remainder */
nkeynes@185
    25
} div_t;
nkeynes@185
    26
nkeynes@185
    27
typedef struct 
nkeynes@185
    28
{
nkeynes@185
    29
  long quot; /* quotient */
nkeynes@185
    30
  long rem; /* remainder */
nkeynes@185
    31
} ldiv_t;
nkeynes@185
    32
nkeynes@185
    33
#ifndef NULL
nkeynes@185
    34
#define NULL 0
nkeynes@185
    35
#endif
nkeynes@185
    36
nkeynes@185
    37
#define EXIT_FAILURE 1
nkeynes@185
    38
#define EXIT_SUCCESS 0
nkeynes@185
    39
nkeynes@185
    40
#define RAND_MAX 0x7fffffff
nkeynes@185
    41
nkeynes@185
    42
#if (defined(__CYGWIN__) || defined(__CYGWIN32__)) && ! defined(_COMPILING_NEWLIB)
nkeynes@185
    43
extern __declspec(dllimport) int __mb_cur_max;
nkeynes@185
    44
#else
nkeynes@185
    45
extern int __mb_cur_max;
nkeynes@185
    46
#endif
nkeynes@185
    47
nkeynes@185
    48
#define MB_CUR_MAX __mb_cur_max
nkeynes@185
    49
nkeynes@185
    50
_VOID	_EXFUN(abort,(_VOID) _ATTRIBUTE ((noreturn)));
nkeynes@185
    51
int	_EXFUN(abs,(int));
nkeynes@185
    52
int	_EXFUN(atexit,(_VOID (*__func)(_VOID)));
nkeynes@185
    53
double	_EXFUN(atof,(const char *__nptr));
nkeynes@185
    54
#ifndef __STRICT_ANSI__
nkeynes@185
    55
float	_EXFUN(atoff,(const char *__nptr));
nkeynes@185
    56
#endif
nkeynes@185
    57
int	_EXFUN(atoi,(const char *__nptr));
nkeynes@185
    58
long	_EXFUN(atol,(const char *__nptr));
nkeynes@185
    59
_PTR	_EXFUN(bsearch,(const _PTR __key,
nkeynes@185
    60
		       const _PTR __base,
nkeynes@185
    61
		       size_t __nmemb,
nkeynes@185
    62
		       size_t __size,
nkeynes@185
    63
		       int _EXFUN((*_compar),(const _PTR, const _PTR))));
nkeynes@185
    64
_PTR	_EXFUN(calloc,(size_t __nmemb, size_t __size));
nkeynes@185
    65
div_t	_EXFUN(div,(int __numer, int __denom));
nkeynes@185
    66
_VOID	_EXFUN(exit,(int __status) _ATTRIBUTE ((noreturn)));
nkeynes@185
    67
_VOID	_EXFUN(free,(_PTR));
nkeynes@185
    68
char *  _EXFUN(getenv,(const char *__string));
nkeynes@185
    69
char *	_EXFUN(_getenv_r,(struct _reent *, const char *__string));
nkeynes@185
    70
char *	_EXFUN(_findenv,(_CONST char *, int *));
nkeynes@185
    71
char *	_EXFUN(_findenv_r,(struct _reent *, _CONST char *, int *));
nkeynes@185
    72
long	_EXFUN(labs,(long));
nkeynes@185
    73
ldiv_t	_EXFUN(ldiv,(long __numer, long __denom));
nkeynes@185
    74
_PTR	_EXFUN(malloc,(size_t __size));
nkeynes@185
    75
int	_EXFUN(mblen,(const char *, size_t));
nkeynes@185
    76
int	_EXFUN(_mblen_r,(struct _reent *, const char *, size_t, int *));
nkeynes@185
    77
int	_EXFUN(mbtowc,(wchar_t *, const char *, size_t));
nkeynes@185
    78
int	_EXFUN(_mbtowc_r,(struct _reent *, wchar_t *, const char *, size_t, int *));
nkeynes@185
    79
int	_EXFUN(wctomb,(char *, wchar_t));
nkeynes@185
    80
int	_EXFUN(_wctomb_r,(struct _reent *, char *, wchar_t, int *));
nkeynes@185
    81
size_t	_EXFUN(mbstowcs,(wchar_t *, const char *, size_t));
nkeynes@185
    82
size_t	_EXFUN(_mbstowcs_r,(struct _reent *, wchar_t *, const char *, size_t, int *));
nkeynes@185
    83
size_t	_EXFUN(wcstombs,(char *, const wchar_t *, size_t));
nkeynes@185
    84
size_t	_EXFUN(_wcstombs_r,(struct _reent *, char *, const wchar_t *, size_t, int *));
nkeynes@185
    85
_VOID	_EXFUN(qsort,(_PTR __base, size_t __nmemb, size_t __size, int(*_compar)(const _PTR, const _PTR)));
nkeynes@185
    86
int	_EXFUN(rand,(_VOID));
nkeynes@185
    87
_PTR	_EXFUN(realloc,(_PTR __r, size_t __size));
nkeynes@185
    88
_VOID	_EXFUN(srand,(unsigned __seed));
nkeynes@185
    89
double	_EXFUN(strtod,(const char *__n, char **_end_PTR));
nkeynes@185
    90
#ifndef __STRICT_ANSI__
nkeynes@185
    91
float	_EXFUN(strtodf,(const char *__n, char **_end_PTR));
nkeynes@185
    92
#endif
nkeynes@185
    93
long	_EXFUN(strtol,(const char *__n, char **_end_PTR, int __base));
nkeynes@185
    94
unsigned long _EXFUN(strtoul,(const char *_n_PTR, char **_end_PTR, int __base));
nkeynes@185
    95
unsigned long _EXFUN(_strtoul_r,(struct _reent *,const char *_n_PTR, char **_end_PTR, int __base));
nkeynes@185
    96
int	_EXFUN(system,(const char *__string));
nkeynes@185
    97
nkeynes@185
    98
#ifndef __STRICT_ANSI__
nkeynes@185
    99
_VOID	_EXFUN(cfree,(_PTR));
nkeynes@185
   100
int	_EXFUN(putenv,(const char *__string));
nkeynes@185
   101
int	_EXFUN(setenv,(const char *__string, const char *__value, int __overwrite));
nkeynes@185
   102
int	_EXFUN(_setenv_r,(struct _reent *, const char *__string, const char *__value, int __overwrite));
nkeynes@185
   103
nkeynes@185
   104
char *	_EXFUN(gcvt,(double,int,char *));
nkeynes@185
   105
char *	_EXFUN(gcvtf,(float,int,char *));
nkeynes@185
   106
char *	_EXFUN(fcvt,(double,int,int *,int *));
nkeynes@185
   107
char *	_EXFUN(fcvtf,(float,int,int *,int *));
nkeynes@185
   108
char *	_EXFUN(ecvt,(double,int,int *,int *));
nkeynes@185
   109
char *	_EXFUN(ecvtbuf,(double, int, int*, int*, char *));
nkeynes@185
   110
char *	_EXFUN(fcvtbuf,(double, int, int*, int*, char *));
nkeynes@185
   111
char *	_EXFUN(ecvtf,(float,int,int *,int *));
nkeynes@185
   112
char *	_EXFUN(dtoa,(double, int, int, int *, int*, char**));
nkeynes@185
   113
int	_EXFUN(rand_r,(unsigned *__seed));
nkeynes@185
   114
nkeynes@185
   115
#ifdef __CYGWIN32__
nkeynes@185
   116
char *	_EXFUN(realpath,(const char *, char *));
nkeynes@185
   117
void	_EXFUN(unsetenv,(const char *__string));
nkeynes@185
   118
int	_EXFUN(random,(_VOID));
nkeynes@185
   119
long	_EXFUN(srandom,(unsigned __seed));
nkeynes@185
   120
char *  _EXFUN(ptsname, (int));
nkeynes@185
   121
int     _EXFUN(grantpt, (int));
nkeynes@185
   122
int     _EXFUN(unlockpt,(int));
nkeynes@185
   123
#endif
nkeynes@185
   124
nkeynes@185
   125
#endif /* ! __STRICT_ANSI__ */
nkeynes@185
   126
nkeynes@185
   127
char *	_EXFUN(_dtoa_r,(struct _reent *, double, int, int, int *, int*, char**));
nkeynes@185
   128
_PTR	_EXFUN(_malloc_r,(struct _reent *, size_t));
nkeynes@185
   129
_PTR	_EXFUN(_calloc_r,(struct _reent *, size_t, size_t));
nkeynes@185
   130
_VOID	_EXFUN(_free_r,(struct _reent *, _PTR));
nkeynes@185
   131
_PTR	_EXFUN(_realloc_r,(struct _reent *, _PTR, size_t));
nkeynes@185
   132
_VOID	_EXFUN(_mstats_r,(struct _reent *, char *));
nkeynes@185
   133
int	_EXFUN(_system_r,(struct _reent *, const char *));
nkeynes@185
   134
nkeynes@185
   135
_VOID	_EXFUN(__eprintf,(const char *, const char *, unsigned int, const char *));
nkeynes@185
   136
nkeynes@185
   137
#ifdef __cplusplus
nkeynes@185
   138
}
nkeynes@185
   139
#endif
nkeynes@185
   140
#endif /* _STDLIB_H_ */
.