Improved support for Plan 9, older SunOS, and AIX.

This commit is contained in:
Sean 2014-01-25 10:44:07 -08:00
parent 0d53abebcd
commit 900e3bea6b

View File

@ -24,6 +24,11 @@
#ifndef TOX_H
#define TOX_H
#ifndef PLAN9
#include <u.h>
#include <libc.h>
#endif
#include <stdint.h>
#if defined(_WIN32) || defined(__WIN32__) || defined (WIN32)
@ -57,6 +62,18 @@ typedef short sa_family_t;
extern "C" {
#endif
#if defined(__AIX__)
# define _XOPEN_SOURCE 1
#endif
#if defined(__sun__)
#define __EXTENSIONS__ 1 /* SunOS */
#if defined(__SunOS5_6__) || defined(__SunOS5_7__) || defined(__SunOS5_8__) || defined(__SunOS5_9__) || defined(__SunOS5_10__)
//Nothing needed
#else
#define __MAKECONTEXT_V2_SOURCE 1
#endif
#define TOX_MAX_NAME_LENGTH 128
#define TOX_MAX_STATUSMESSAGE_LENGTH 128
#define TOX_CLIENT_ID_SIZE 32