~ubuntu-branches/ubuntu/intrepid/ruby1.9/intrepid-updates

« back to all changes in this revision

Viewing changes to include/ruby/missing.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-09-04 16:01:17 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20070904160117-i15zckg2nhxe9fyw
Tags: 1.9.0+20070830-2ubuntu1
* Sync from Debian; remaining changes:
  - Add -g to CFLAGS.
* Fixes build failure on ia64.
* Fixes build failure with gcc-4.2 on lpia.
* Robustify check for target_os, fixing build failure on lpia.
* Set Ubuntu maintainer address.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/************************************************
 
2
 
 
3
  missing.h - prototype for *.c in ./missing, and
 
4
              for missing timeval struct
 
5
 
 
6
  $Author: nobu $
 
7
  $Date: 2007-06-10 12:06:15 +0900 (日, 10  6月 2007) $
 
8
  created at: Sat May 11 23:46:03 JST 2002
 
9
 
 
10
************************************************/
 
11
 
 
12
#ifndef RUBY_MISSING_H
 
13
#define RUBY_MISSING_H 1
 
14
 
 
15
#if defined(__cplusplus)
 
16
extern "C" {
 
17
#if 0
 
18
} /* satisfy cc-mode */
 
19
#endif
 
20
#endif
 
21
 
 
22
#if defined(HAVE_SYS_TIME_H)
 
23
#  include <sys/time.h>
 
24
#elif !defined(_WIN32)
 
25
#  define time_t long
 
26
struct timeval {
 
27
    time_t tv_sec;      /* seconds */
 
28
    time_t tv_usec;     /* microseconds */
 
29
};
 
30
#endif
 
31
#if defined(HAVE_SYS_TYPES_H)
 
32
#  include <sys/types.h>
 
33
#endif
 
34
 
 
35
#ifndef HAVE_ACOSH
 
36
extern double acosh(double);
 
37
extern double asinh(double);
 
38
extern double atanh(double);
 
39
#endif
 
40
 
 
41
#ifndef HAVE_CRYPT
 
42
extern char *crypt(const char *, const char *);
 
43
#endif
 
44
 
 
45
#ifndef HAVE_DUP2
 
46
extern int dup2(int, int);
 
47
#endif
 
48
 
 
49
#ifndef HAVE_EACCESS
 
50
extern int eaccess(const char*, int);
 
51
#endif
 
52
 
 
53
#ifndef HAVE_FINITE
 
54
extern int finite(double);
 
55
#endif
 
56
 
 
57
#ifndef HAVE_FLOCK
 
58
extern int flock(int, int);
 
59
#endif
 
60
 
 
61
/*
 
62
#ifndef HAVE_FREXP
 
63
extern double frexp(double, int *);
 
64
#endif
 
65
*/
 
66
 
 
67
#ifndef HAVE_HYPOT
 
68
extern double hypot(double, double);
 
69
#endif
 
70
 
 
71
#ifndef HAVE_ERF
 
72
extern double erf(double);
 
73
extern double erfc(double);
 
74
#endif
 
75
 
 
76
#ifndef isinf
 
77
# ifndef HAVE_ISINF
 
78
#  if defined(HAVE_FINITE) && defined(HAVE_ISNAN)
 
79
#  define isinf(x) (!finite(x) && !isnan(x))
 
80
#  else
 
81
extern int isinf(double);
 
82
#  endif
 
83
# endif
 
84
#endif
 
85
 
 
86
#ifndef HAVE_ISNAN
 
87
extern int isnan(double);
 
88
#endif
 
89
 
 
90
/*
 
91
#ifndef HAVE_MEMCMP
 
92
extern int memcmp(const void *, const void *, size_t);
 
93
#endif
 
94
*/
 
95
 
 
96
#ifndef HAVE_MEMMOVE
 
97
extern void *memmove(void *, const void *, size_t);
 
98
#endif
 
99
 
 
100
/*
 
101
#ifndef HAVE_MODF
 
102
extern double modf(double, double *);
 
103
#endif
 
104
*/
 
105
 
 
106
#ifndef HAVE_STRCASECMP
 
107
extern int strcasecmp(const char *, const char *);
 
108
#endif
 
109
 
 
110
#ifndef HAVE_STRNCASECMP
 
111
extern int strncasecmp(const char *, const char *, size_t);
 
112
#endif
 
113
 
 
114
#ifndef HAVE_STRCHR
 
115
extern char *strchr(const char *, int);
 
116
extern char *strrchr(const char *, int);
 
117
#endif
 
118
 
 
119
#ifndef HAVE_STRERROR
 
120
extern char *strerror(int);
 
121
#endif
 
122
 
 
123
#ifndef HAVE_STRFTIME
 
124
extern size_t strftime(char *, size_t, const char *, const struct tm *);
 
125
#endif
 
126
 
 
127
#ifndef HAVE_STRSTR
 
128
extern char *strstr(const char *, const char *);
 
129
#endif
 
130
 
 
131
/*
 
132
#ifndef HAVE_STRTOL
 
133
extern long strtol(const char *, char **, int);
 
134
#endif
 
135
*/
 
136
 
 
137
#ifndef HAVE_STRTOUL
 
138
extern unsigned long strtoul(const char *, char **, int);
 
139
#endif
 
140
 
 
141
#ifndef HAVE_VSNPRINTF
 
142
# include <stdarg.h>
 
143
extern int snprintf(char *, size_t n, char const *, ...);
 
144
extern int vsnprintf(char *, size_t n, char const *, va_list);
 
145
#endif
 
146
 
 
147
#ifndef HAVE_STRLCPY
 
148
extern size_t strlcpy(char *, const char*, size_t);
 
149
#endif
 
150
 
 
151
#ifndef HAVE_STRLCAT
 
152
extern size_t strlcat(char *, const char*, size_t);
 
153
#endif
 
154
 
 
155
#if defined(__cplusplus)
 
156
#if 0
 
157
{ /* satisfy cc-mode */
 
158
#endif
 
159
}  /* extern "C" { */
 
160
#endif
 
161
 
 
162
#endif /* RUBY_MISSING_H */