Mark ChangeLog
[official-gcc.git] / gcc / ada / adaint.h
blobcf7e4032f4ad6096c19fe55b52d4d782f18baf4f
1 /****************************************************************************
2 * *
3 * GNAT COMPILER COMPONENTS *
4 * *
5 * A D A I N T *
6 * *
7 * C Header File *
8 * *
9 * Copyright (C) 1992-2005 Free Software Foundation, Inc. *
10 * *
11 * GNAT is free software; you can redistribute it and/or modify it under *
12 * terms of the GNU General Public License as published by the Free Soft- *
13 * ware Foundation; either version 2, or (at your option) any later ver- *
14 * sion. GNAT is distributed in the hope that it will be useful, but WITH- *
15 * OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
16 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
17 * for more details. You should have received a copy of the GNU General *
18 * Public License distributed with GNAT; see file COPYING. If not, write *
19 * to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, *
20 * MA 02111-1307, USA. *
21 * *
22 * As a special exception, if you link this file with other files to *
23 * produce an executable, this file does not by itself cause the resulting *
24 * executable to be covered by the GNU General Public License. This except- *
25 * ion does not however invalidate any other reasons why the executable *
26 * file might be covered by the GNU Public License. *
27 * *
28 * GNAT was originally developed by the GNAT team at New York University. *
29 * Extensive contributions were provided by Ada Core Technologies Inc. *
30 * *
31 ****************************************************************************/
33 #include <stdio.h>
34 #include <dirent.h>
36 typedef long OS_Time; /* Type corresponding to GNAT.OS_Lib.OS_Time */
38 extern int __gnat_max_path_len;
39 extern void __gnat_to_gm_time (OS_Time *, int *,
40 int *, int *,
41 int *, int *,
42 int *);
43 extern int __gnat_get_maximum_file_name_length (void);
44 extern int __gnat_get_switches_case_sensitive (void);
45 extern int __gnat_get_file_names_case_sensitive (void);
46 extern char __gnat_get_default_identifier_character_set (void);
47 extern void __gnat_get_current_dir (char *, int *);
48 extern void __gnat_get_object_suffix_ptr (int *,
49 const char **);
50 extern void __gnat_get_executable_suffix_ptr (int *,
51 const char **);
52 extern void __gnat_get_debuggable_suffix_ptr (int *,
53 const char **);
54 extern int __gnat_readlink (char *, char *,
55 size_t);
56 extern int __gnat_symlink (char *, char *);
57 extern int __gnat_try_lock (char *, char *);
58 extern int __gnat_open_new (char *, int);
59 extern int __gnat_open_new_temp (char *, int);
60 extern int __gnat_mkdir (char *);
61 extern int __gnat_stat (char *,
62 struct stat *);
63 extern int __gnat_open_read (char *, int);
64 extern int __gnat_open_rw (char *, int);
65 extern int __gnat_open_create (char *, int);
66 extern int __gnat_create_output_file (char *);
67 extern int __gnat_open_append (char *, int);
68 extern long __gnat_file_length (int);
69 extern long __gnat_named_file_length (char *);
70 extern void __gnat_tmp_name (char *);
71 extern char *__gnat_readdir (DIR *, char *);
72 extern int __gnat_readdir_is_thread_safe (void);
74 extern OS_Time __gnat_file_time_name (char *);
75 extern OS_Time __gnat_file_time_fd (int);
76 /* return -1 in case of error */
78 extern void __gnat_set_file_time_name (char *, time_t);
79 extern void __gnat_get_env_value_ptr (char *, int *,
80 char **);
81 extern int __gnat_dup (int);
82 extern int __gnat_dup2 (int, int);
83 extern int __gnat_file_exists (char *);
84 extern int __gnat_is_regular_file (char *);
85 extern int __gnat_is_absolute_path (char *,int);
86 extern int __gnat_is_directory (char *);
87 extern int __gnat_is_writable_file (char *);
88 extern int __gnat_is_readable_file (char *name);
89 extern void __gnat_set_readonly (char *name);
90 extern void __gnat_set_writable (char *name);
91 extern void __gnat_set_executable (char *name);
92 extern int __gnat_is_symbolic_link (char *name);
93 extern int __gnat_portable_spawn (char *[]);
94 extern int __gnat_portable_no_block_spawn (char *[]);
95 extern int __gnat_portable_wait (int *);
96 extern int __gnat_waitpid (int);
97 extern char *__gnat_locate_exec (char *, char *);
98 extern char *__gnat_locate_exec_on_path (char *);
99 extern char *__gnat_locate_regular_file (char *, char *);
100 extern void __gnat_maybe_glob_args (int *, char ***);
101 extern void __gnat_os_exit (int);
102 extern void __gnat_set_env_value (char *, char *);
103 extern char *__gnat_get_libraries_from_registry (void);
104 extern int __gnat_to_canonical_file_list_init (char *, int);
105 extern char *__gnat_to_canonical_file_list_next (void);
106 extern void __gnat_to_canonical_file_list_free (void);
107 extern char *__gnat_to_canonical_dir_spec (char *, int);
108 extern char *__gnat_to_canonical_file_spec (char *);
109 extern char *__gnat_to_host_dir_spec (char *, int);
110 extern char *__gnat_to_host_file_spec (char *);
111 extern char *__gnat_to_canonical_path_spec (char *);
112 extern void __gnat_adjust_os_resource_limits (void);
113 extern void convert_addresses (void *, int,
114 void *, int *);
115 extern int __gnat_copy_attribs (char *, char *, int);
116 extern int __gnat_feof (FILE *);
117 extern int __gnat_ferror (FILE *);
118 extern int __gnat_fileno (FILE *);
119 extern int __gnat_is_regular_file_fd (int);
120 extern FILE *__gnat_constant_stderr (void);
121 extern FILE *__gnat_constant_stdin (void);
122 extern FILE *__gnat_constant_stdout (void);
123 extern char *__gnat_full_name (char *, char *);
125 extern int __gnat_arg_count (void);
126 extern int __gnat_len_arg (int);
127 extern void __gnat_fill_arg (char *, int);
128 extern int __gnat_env_count (void);
129 extern int __gnat_len_env (int);
130 extern void __gnat_fill_env (char *, int);
132 /* Routines for interface to scanf and printf functions for integer values */
134 extern int get_int (void);
135 extern void put_int (int);
136 extern void put_int_stderr (int);
137 extern int get_char (void);
138 extern void put_char (int);
139 extern void put_char_stderr (int);
140 extern char *mktemp (char *);
142 extern void __gnat_set_exit_status (int);
144 extern int __gnat_expect_fork (void);
145 extern void __gnat_expect_portable_execvp (char *, char *[]);
146 extern int __gnat_pipe (int *);
147 extern int __gnat_expect_poll (int *, int, int, int *);
148 extern void __gnat_set_binary_mode (int);
149 extern void __gnat_set_text_mode (int);
150 extern char *__gnat_ttyname (int);
151 extern int __gnat_lseek (int, long, int);
152 extern int __gnat_set_close_on_exec (int, int);
153 extern int __gnat_dup (int);
154 extern int __gnat_dup2 (int, int);
156 #ifdef __MINGW32__
157 extern void __gnat_plist_init (void);
158 #endif
160 #ifdef IN_RTS
161 /* Portable definition of strdup, which is not available on all systems. */
162 #define xstrdup(S) strcpy ((char *) malloc (strlen (S) + 1), S)
163 #endif
165 /* This function returns the version of GCC being used. Here it's GCC 3. */
166 extern int get_gcc_version (void);
168 /* This function offers a hook for libgnarl to set the
169 locking subprograms for libgcc_eh. */
170 extern void __gnatlib_install_locks (void (*) (void),
171 void (*) (void));