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

« back to all changes in this revision

Viewing changes to include/ruby/util.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
  util.h -
 
4
 
 
5
  $Author: matz $
 
6
  $Date: 2007-08-25 12:29:39 +0900 (土, 25  8月 2007) $
 
7
  created at: Thu Mar  9 11:55:53 JST 1995
 
8
 
 
9
  Copyright (C) 1993-2007 Yukihiro Matsumoto
 
10
 
 
11
**********************************************************************/
 
12
 
 
13
#ifndef RUBY_UTIL_H
 
14
#define RUBY_UTIL_H 1
 
15
 
 
16
#if defined(__cplusplus)
 
17
extern "C" {
 
18
#if 0
 
19
} /* satisfy cc-mode */
 
20
#endif
 
21
#endif
 
22
 
 
23
#ifndef _
 
24
#ifdef __cplusplus
 
25
# ifndef  HAVE_PROTOTYPES
 
26
#  define HAVE_PROTOTYPES 1
 
27
# endif
 
28
# ifndef  HAVE_STDARG_PROTOTYPES
 
29
#  define HAVE_STDARG_PROTOTYPES 1
 
30
# endif
 
31
#endif
 
32
#ifdef HAVE_PROTOTYPES
 
33
# define _(args) args
 
34
#else
 
35
# define _(args) ()
 
36
#endif
 
37
#ifdef HAVE_STDARG_PROTOTYPES
 
38
# define __(args) args
 
39
#else
 
40
# define __(args) ()
 
41
#endif
 
42
#endif
 
43
 
 
44
#define scan_oct ruby_scan_oct
 
45
unsigned long ruby_scan_oct(const char *, int, int *);
 
46
#define scan_hex ruby_scan_hex
 
47
unsigned long ruby_scan_hex(const char *, int, int *);
 
48
 
 
49
#if defined(MSDOS) || defined(__CYGWIN32__) || defined(_WIN32)
 
50
void ruby_add_suffix(VALUE str, const char *suffix);
 
51
#endif
 
52
 
 
53
void ruby_qsort(void *, const int, const int,
 
54
                int (*)(const void *, const void *, void *), void *);
 
55
 
 
56
void ruby_setenv(const char *, const char *);
 
57
void ruby_unsetenv(const char *);
 
58
#undef setenv
 
59
#undef unsetenv
 
60
#define setenv(name,val) ruby_setenv(name,val)
 
61
#define unsetenv(name,val) ruby_unsetenv(name);
 
62
 
 
63
char *ruby_strdup(const char *);
 
64
#undef strdup
 
65
#define strdup(s) ruby_strdup(s)
 
66
 
 
67
char *ruby_getcwd(void);
 
68
#define my_getcwd() ruby_getcwd()
 
69
 
 
70
double ruby_strtod(const char *, char **);
 
71
#undef strtod
 
72
#define strtod(s,e) ruby_strtod(s,e)
 
73
 
 
74
#if defined(__cplusplus)
 
75
#if 0
 
76
{ /* satisfy cc-mode */
 
77
#endif
 
78
}  /* extern "C" { */
 
79
#endif
 
80
 
 
81
#endif /* RUBY_UTIL_H */