shithub: npe

ref: 7b724339b6807d81776861191cdb5ac933f2641c
dir: /include/npe/plan9.h/

View raw version
#ifndef __plan9_h__
#define __plan9_h__

#pragma lib "libnpe.a"

#include <u.h>
#include <libc.h>

/* programs quite often do not include these directly */
#include </sys/include/stdio.h>
#include </sys/include/ctype.h>

/* some programs do not #include <strings.h> */
#define strcasecmp cistrcmp
#define strncasecmp cistrncmp

#ifndef __attribute__
#define __attribute__(a)
#endif

/* some programs do not #include <stdlib.h> */
#define getenv npe_getenv
char *npe_getenv(char *s);

/* to override "main" with our own threadmain */
#define main npe_main_renamed

uvlong npe_nanosec(void);
void npe_nsleep(uvlong ns);

#endif