/*
 * static char *rcsid_sunos_h =
 *   "$Id: sunos.h,v 1.22 1997/04/24 09:14:55 master Exp $";
 */

/*
    CrossFire, A Multiplayer game for X-windows

    Copyright (C) 1992 Frank Tore Johansen

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

    The author can be reached via e-mail to mark@pyramid.com.
*/

/* This file is really a waste, but sunos lacks prototypes... */


#ifndef SVR4
/* The gcc header file unistd.h now defines some of these.  So comment them
 * out and include the proper header file.
 */

#include <sys/types.h>
#include <unistd.h>
#include <strings.h>
#ifdef SERVER
#include <sys/socket.h>               /* struct sockaddr */
#endif
#include <sys/timeb.h>                /* struct timeb */
#include <stdarg.h>           /* va_list */
#include <memory.h>

#ifdef SERVER
int accept(int, struct sockaddr *, int *);
int bind(int, struct sockaddr *, int);
int connect(int, struct sockaddr *, int);
int listen(int, int);
int setsockopt(int, int, int, char *, int);
int socket(int, int, int);
#endif

extern int malloc_debug(int);
int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
char _filbuf();
char *crypt(char *, char *);
char *strdup_local(char *);
int _flsbuf(char *, int);
int cfree(char *);
int fclose(FILE *);
int fgetc(FILE *);
int printf(char *, ...);
int fprintf(FILE *, char *, ...);
int vprintf(char *, va_list);
int vsprintf(char *, char *, va_list);
int vfprintf(FILE *, char *, va_list);
int fputs(char *, FILE *);
int fread(char *, int, int, FILE *);
int fwrite(char *, int, int, FILE *);
int scanf(char *, ...);
int fscanf(FILE *, char *, ...);
int sscanf(char *, char *, ...);
int ftime(struct timeb *);
int getdtablesize(void);
int gettimeofday(struct timeval *, struct timezone *);
int ioctl(int, int, ...);
int puts(char *);
int rename(char *, char *);
int setpgrp(int, int);
int srandom(int);
int strftime(char *, int, char *, struct tm *);
int system(char *);
int ungetc(int, FILE *);
long random(void);
long strtol(char *, char **, int);
time_t time(time_t *);
void bcopy(char *, char *, int);
void bzero(char *, int);
void fflush(FILE *);
void fseek (FILE *, long, int);
void perror(char *);
void rewind(FILE *);
#else /* Following are for solaris 2.x machines (tested on 2.5 at least) */
/* lrand48/srand48 may be defined depending on what compiler and options
 * you use.  Comment out if not needed.
 */
long lrand48(void);
void srand48(long seedval);
extern FILE     *popen(const char *, const char *);
extern char     *tempnam(const char *, const char *);
FILE *fdopen(int, const char *);
#endif
/* Declare these on both solaris and sunos */
int gethostname(char *, int);
int pclose(FILE *);
int strncasecmp(char *, char *, int);
int strcasecmp(char *, char *);
