cd410f2e4dc809fe6b7990594be4fd2c757f112d
[gnushogi.git] / xshogi / sysdeps.h
1 /*
2  * FILE: sysdeps.h
3  *
4  *     System dependencies for xshogi.
5  *
6  * ------------------------------------------------------------------------
7  * xshogi is based on XBoard -- an Xt/Athena user interface for GNU Chess.
8  *
9  * Original authors:                                Dan Sears, Chris Sears
10  * Enhancements (Version 2.0 and following):        Tim Mann
11  * Modifications to XShogi (Version 1.0):           Matthias Mutz
12  * Enhancements to XShogi (Version 1.1):            Matthias Mutz
13  * Modified implementation of ISS mode for XShogi:  Matthias Mutz
14  * Current maintainer:                              Michael C. Vanier
15  *
16  * XShogi borrows some of its piece bitmaps from CRANES Shogi.
17  *
18  * Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts.
19  * Enhancements Copyright 1992 Free Software Foundation, Inc.
20  * Enhancements for XShogi Copyright 1993, 1994, 1995 Matthias Mutz
21  * Copyright (c) 1999 Michael Vanier and the Free Software Foundation
22  *
23  * The following terms apply to Digital Equipment Corporation's copyright
24  * interest in XBoard:
25  * ------------------------------------------------------------------------
26  * All Rights Reserved
27  *
28  * Permission to use, copy, modify, and distribute this software and its
29  * documentation for any purpose and without fee is hereby granted,
30  * provided that the above copyright notice appear in all copies and that
31  * both that copyright notice and this permission notice appear in
32  * supporting documentation, and that the name of Digital not be
33  * used in advertising or publicity pertaining to distribution of the
34  * software without specific, written prior permission.
35  *
36  * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
37  * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
38  * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
39  * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
40  * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
41  * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
42  * SOFTWARE.
43  * ------------------------------------------------------------------------
44  *
45  * This file is part of GNU shogi.
46  *
47  * GNU shogi is free software; you can redistribute it and/or modify
48  * it under the terms of the GNU General Public License as published by
49  * the Free Software Foundation.
50  *
51  * GNU shogi is distributed in the hope that it will be useful,
52  * but WITHOUT ANY WARRANTY; without even the implied warranty of
53  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
54  * GNU General Public License for more details.
55  *
56  * You should have received a copy of the GNU General Public License
57  * along with GNU shogi; see the file COPYING.  If not, write to
58  * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
59  *
60  * ------------------------------------------------------------------------
61  *
62  */
63
64 #ifndef _SYSDEPS_H_
65 #define _SYSDEPS_H_
66
67 #include <stdio.h>
68 #include <stdlib.h>
69 #include <string.h>
70 #include <unistd.h>
71 #include <sys/types.h>
72 #include <sys/wait.h>
73 #include <sys/stat.h>
74 #include <sys/time.h>
75 #include <fcntl.h>
76
77 /*
78  * Stuff that isn't reliably included (on Linux, anyway).
79  */
80
81 extern FILE *fdopen(int fd, const char *modes);
82 extern int   fileno(FILE *stream);
83 extern int   kill(pid_t pid, int sig);
84 extern int   strcasecmp(const char *s1, const char *s2);
85 extern int   gethostname(char *name, size_t len);
86
87
88 /*
89  * Check for POSIX-compatible wait().
90  */
91
92 #ifdef HAVE_SYS_WAIT_H
93 #define WAIT0 wait((int *) 0)
94 #else
95 #define WAIT0 wait((union wait *) 0)
96 #endif
97
98 #endif /* _SYSDEPS_H_ */
99