Webware / WebKit / Adapters / common / wkcommon.h

/* wkcommon.h */

#include <stdlib.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>

#ifdef WIN32
#include <winsock.h>
#include <io.h>
#include <fcntl.h>
#include <time.h>
#define EINTR WSAEINTR
#define EAGAIN WSAEMFILE   //is this right????
#define strcasecmp _stricmp
#else
#include <sys/socket.h>
#include <netdb.h>
#include <errno.h>
#include <netinet/in.h>
#if defined(__MACH__) && defined(__APPLE__)
#include <nameser.h>
#endif
#include <resolv.h>
#endif

#include "marshal.h"
#include "environ.h"

#define ConfigFilename "webkit.cfg"

typedef struct {
	WFILE* int_dict;
	WFILE* whole_dict;
} DictHolder;

typedef struct {
	char* host;
	int port;
	int retry_attempts;
	int retry_delay;
} Configuration;

int log_message(char* msg);
DictHolder* createDicts(EnvItem ** envItems);
int wksock_open(unsigned long address, int port);
unsigned long resolve_host(char *value);
struct WFILE*  setup_WFILE();
int freeWFILE(struct WFILE* wf);
Configuration* GetConfiguration(Configuration*, char*);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.