add make CONF=pthread for modern systems

This commit is contained in:
Russ Cox
2008-12-09 07:05:09 +00:00
parent 189f67ae9b
commit 4f14409f56
11 changed files with 590 additions and 3 deletions

View File

@@ -121,7 +121,12 @@ extern char* utfrrune(char*, long);
typedef struct Lock
{
#ifdef PTHREAD
int init;
pthread_mutex_t mutex;
#else
long key;
#endif
} Lock;
typedef struct QLock

View File

@@ -1,3 +1,4 @@
#undef _FORTIFY_SOURCE /* stupid ubuntu warnings */
#define __BSD_VISIBLE 1 /* FreeBSD 5.x */
#define _BSD_SOURCE 1
#define _NETBSD_SOURCE 1 /* NetBSD */
@@ -24,7 +25,10 @@
#include <inttypes.h>
#include <ctype.h>
#include <errno.h>
#ifdef PTHREAD
#include <pthread.h>
#endif
typedef long long p9_vlong;
typedef unsigned long long p9_uvlong;
typedef unsigned long long p9_uvlong;
typedef uintptr_t uintptr;