73 lines
1.6 KiB
C
73 lines
1.6 KiB
C
/*
|
|
* Written by Carsten Larsen.
|
|
* Public domain.
|
|
*/
|
|
|
|
#ifndef WHOIS_CONFIG_H
|
|
#define WHOIS_CONFIG_H
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <sys/types.h>
|
|
#include <sys/socket.h>
|
|
#include <netinet/in.h>
|
|
#include <arpa/inet.h>
|
|
#include <netinet/in.h>
|
|
#include <netdb.h>
|
|
|
|
#if defined(__AMIGA__)
|
|
#include <clib/amitcp_protos.h>
|
|
#include <amitcp/socketbasetags.h>
|
|
#define IPTR ULONG
|
|
#endif
|
|
|
|
#if defined(__AROS__)
|
|
#include <errno.h>
|
|
#define HAVE_ADDRINFO
|
|
#define INTELCPU
|
|
#define Socket socket
|
|
#define Connect connect
|
|
#define Send send
|
|
#endif
|
|
|
|
#include "getaddrinfo.h"
|
|
|
|
#define OPEN_VER_ERROR "Cannot open %s (%d.0)\n"
|
|
#define DOSLIB_NAME "dos.library"
|
|
#define DOSLIB_REV 33L
|
|
#define BSDLIB_NAME "bsdsocket.library"
|
|
#define BSDLIB_REV 03L
|
|
|
|
#include <clib/exec_protos.h>
|
|
|
|
extern struct Library *DOSBase;
|
|
extern struct Library *SocketBase;
|
|
|
|
extern int errno;
|
|
|
|
const char *getprogname(void);
|
|
void setprogname(const char *progname);
|
|
|
|
void err0(int eval, const char *text);
|
|
void errx0(int eval, const char *text);
|
|
void errx2(int eval, const char *fmt, const void *arg1, const void *arg2);
|
|
void warn2(const char *fmt, const void *arg1, const void *arg2);
|
|
void warnx0(const char *text);
|
|
void warnx1(const char *fmt, const void *arg1);
|
|
void warnx2(const char *fmt, const void *arg1, const void *arg2);
|
|
|
|
void cpy1(char **dest, const char *src);
|
|
void cpy2(char **dest, const char *src1, const char *src2);
|
|
void cpy1pad(char **dest, int minlen, const char *src);
|
|
|
|
char *strnstr(const char *s, const char *find, size_t slen);
|
|
|
|
char* sgetln(int sd, size_t *len);
|
|
|
|
#ifndef EX_USAGE
|
|
#define EX_USAGE 64
|
|
#endif
|
|
|
|
#endif
|