~mysql/mysql-server/mysql-6.0

« back to all changes in this revision

Viewing changes to mit-pthreads/machdep/i386-sco-3.2v5/__stdlib.h

  • Committer: bk at mysql
  • Date: 2000-07-31 19:29:14 UTC
  • Revision ID: sp1r-bk@work.mysql.com-20000731192914-08846
Import changeset

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *   Copyright (C) 1984-1995 The Santa Cruz Operation, Inc.
 
3
 *              All Rights Reserved.
 
4
 *
 
5
 *      The information in this file is provided for the exclusive use of
 
6
 *      the licensees of The Santa Cruz Operation, Inc.  Such users have the
 
7
 *      right to use, modify, and incorporate this code into other products
 
8
 *      for purposes authorized by the license agreement provided they include
 
9
 *      this notice and the associated copyright notice with any such product.
 
10
 *      The information in this file is provided "AS IS" without warranty.
 
11
 */
 
12
 
 
13
/*      Portions Copyright (c) 1990, 1991, 1992, 1993 UNIX System Laboratories, Inc. */
 
14
/*      Portions Copyright (c) 1979 - 1990 AT&T   */
 
15
/*        All Rights Reserved   */
 
16
 
 
17
/*      THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF          */
 
18
/*      UNIX System Laboratories, Inc.                          */
 
19
/*      The copyright notice above does not evidence any        */
 
20
/*      actual or intended publication of such source code.     */
 
21
 
 
22
#ifndef ___STDLIB_H
 
23
#define ___STDLIB_H
 
24
 
 
25
#pragma comment(exestr, "posix @(#) stdlib.h 20.1 94/12/04 ")
 
26
 
 
27
#ifdef __cplusplus
 
28
extern "C" {
 
29
#endif
 
30
 
 
31
#pragma pack(4)
 
32
 
 
33
#ifndef _DIV_T
 
34
#define _DIV_T
 
35
typedef struct
 
36
{
 
37
        int     quot;
 
38
        int     rem;
 
39
} div_t;
 
40
#endif
 
41
 
 
42
#ifndef _LDIV_T
 
43
#define _LDIV_T
 
44
typedef struct
 
45
{
 
46
        long    quot;
 
47
        long    rem;
 
48
} ldiv_t;
 
49
#endif
 
50
 
 
51
#ifndef _SIZE_T
 
52
#define _SIZE_T
 
53
typedef unsigned int    size_t;
 
54
#endif
 
55
 
 
56
#if !defined(_SSIZE_T)
 
57
#define _SSIZE_T
 
58
typedef int     ssize_t;
 
59
#endif
 
60
 
 
61
#ifndef _WCHAR_T
 
62
#define _WCHAR_T
 
63
typedef long    wchar_t;
 
64
#endif
 
65
 
 
66
#ifndef NULL
 
67
#define NULL    0
 
68
#endif /* NULL */
 
69
 
 
70
#define EXIT_FAILURE    1
 
71
#define EXIT_SUCCESS    0
 
72
#define RAND_MAX        077777
 
73
 
 
74
 
 
75
 
 
76
extern unsigned char    __ctype[];
 
77
 
 
78
#define MB_CUR_MAX      ((int)__ctype[520])
 
79
 
 
80
extern double   atof(const char *);
 
81
extern int      atoi(const char *);
 
82
extern long     atol(const char *);
 
83
extern double   strtod(const char *, char **);
 
84
extern float    strtof(const char *, char **);
 
85
extern long     strtol(const char *, char **, int);
 
86
extern unsigned long    strtoul(const char *, char **, int);
 
87
 
 
88
extern int      rand(void);
 
89
extern void     srand(unsigned int);
 
90
 
 
91
extern void     *calloc(size_t, size_t);
 
92
extern void     free(void *);
 
93
extern void     *malloc(size_t);
 
94
extern void     *realloc(void *, size_t);
 
95
 
 
96
extern void     abort(void);
 
97
extern void     exit(int);
 
98
extern char     *getenv(const char *);
 
99
extern int      system(const char *);
 
100
 
 
101
extern void     *bsearch(const void *, const void *, size_t, size_t,
 
102
                        int (*)(const void *, const void *));
 
103
extern void     qsort(void *, size_t, size_t,
 
104
                        int (*)(const void *, const void *));
 
105
 
 
106
#ifdef __cplusplus
 
107
#ifndef _ABS_INL
 
108
#define _ABS_INL
 
109
inline int (abs)(int i) {return (i > 0) ? i : -i;}
 
110
#endif
 
111
#else
 
112
extern int      (abs)(int);     /* Protect from macro definitions */
 
113
#endif
 
114
 
 
115
extern div_t    div(int, int);
 
116
extern long     labs(long);
 
117
extern ldiv_t   ldiv(long, long);
 
118
 
 
119
extern int      mbtowc(wchar_t *, const char *, size_t);
 
120
extern int      mblen(const char *, size_t);
 
121
extern int      wctomb(char *, wchar_t);
 
122
 
 
123
extern size_t   mbstowcs(wchar_t *, const char *, size_t);
 
124
extern size_t   wcstombs(char *, const wchar_t *, size_t);
 
125
 
 
126
 
 
127
 
 
128
 
 
129
#define mblen(s, n)     mbtowc((wchar_t *)0, s, n)
 
130
 
 
131
#ifdef __cplusplus
 
132
}
 
133
#endif
 
134
 
 
135
#pragma pack()
 
136
 
 
137
#endif /* ___STDLIB_H */