]> gcc.gnu.org Git - gcc.git/blob - gcc/fixinc/server.h
Merge from fixincl-branch
[gcc.git] / gcc / fixinc / server.h
1
2 /*
3 * server.c Set up and handle communications with a server process.
4 *
5 * Server Handling copyright 1992-1999 The Free Software Foundation
6 *
7 * Server Handling is free software.
8 * You may redistribute it and/or modify it under the terms of the
9 * GNU General Public License, as published by the Free Software
10 * Foundation; either version 2, or (at your option) any later version.
11 *
12 * Server Handling is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with Server Handling. See the file "COPYING". If not,
19 * write to: The Free Software Foundation, Inc.,
20 * 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
22 *
23 * As a special exception, The Free Software Foundation gives
24 * permission for additional uses of the text contained in his release
25 * of ServerHandler.
26 *
27 * The exception is that, if you link the ServerHandler library with other
28 * files to produce an executable, this does not by itself cause the
29 * resulting executable to be covered by the GNU General Public License.
30 * Your use of that executable is in no way restricted on account of
31 * linking the ServerHandler library code into it.
32 *
33 * This exception does not however invalidate any other reasons why
34 * the executable file might be covered by the GNU General Public License.
35 *
36 * This exception applies only to the code released by The Free
37 * Software Foundation under the name ServerHandler. If you copy code
38 * from other sources under the General Public License into a copy of
39 * ServerHandler, as the General Public License permits, the exception
40 * does not apply to the code that you add in this way. To avoid
41 * misleading anyone as to the status of such modified files, you must
42 * delete this exception notice from them.
43 *
44 * If you write modifications of your own for ServerHandler, it is your
45 * choice whether to permit this exception to apply to your modifications.
46 * If you do not wish that, delete this exception notice.
47 */
48
49 #ifndef FIXINC_SERVER_H
50 #define FIXINC_SERVER_H
51
52 #include <stdio.h>
53 #ifdef HAVE_UNISTD_H
54 #include <unistd.h>
55 #endif
56
57 /*
58 * Dual pipe opening of a child process
59 */
60
61 typedef struct
62 {
63 int read_fd;
64 int write_fd;
65 } t_fd_pair;
66
67 typedef struct
68 {
69 FILE *pf_read; /* parent read fp */
70 FILE *pf_write; /* parent write fp */
71 } t_pf_pair;
72
73 typedef char *t_pchar;
74
75 #define NOPROCESS ((pid_t) -1)
76 #define NULLPROCESS ((pid_t)0)
77
78 #define EXIT_PANIC 99
79
80 typedef enum
81 {
82 BOOL_FALSE, BOOL_TRUE
83 } bool;
84
85 #define _P_(p) ()
86
87 char *run_shell _P_ (( const char *pzCmd));
88 pid_t proc2_fopen _P_ (( t_pf_pair * p_pair, t_pchar * pp_args));
89 pid_t proc2_open _P_ (( t_fd_pair * p_pair, t_pchar * pp_args));
90 int chain_open _P_ (( int in_fd,
91 t_pchar * pp_args,
92 pid_t * p_child));
93
94 #endif /* FIXINC_SERVER_H */
This page took 0.040246 seconds and 5 git commands to generate.