mirror of
https://github.com/wassname/keras-language-modeling.git
synced 2026-10-30 13:20:10 +08:00
40 lines
1.1 KiB
C
40 lines
1.1 KiB
C
#ifndef SYSFUNCH
|
|
#define SYSFUNCH
|
|
/* Declarations of major functions within standard C libraries */
|
|
/* Once all of the major systems get their act together (and I follow
|
|
suit!), this file should just include system header files from
|
|
/usr/include. Until then... */
|
|
|
|
#include <unistd.h>
|
|
#include <limits.h>
|
|
#include <ctype.h>
|
|
#include <fcntl.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <stdlib.h>
|
|
#include <math.h>
|
|
#include <memory.h>
|
|
#include <sys/stat.h>
|
|
#include <sys/wait.h>
|
|
#include <sys/time.h>
|
|
#include <sys/mman.h>
|
|
|
|
/* For time being, define Berkeley constructs in terms of SVR4 constructs*/
|
|
#define bzero(dest,len) memset(dest,'\0',len)
|
|
#define bcopy(source,dest,len) memcpy(dest,source,len)
|
|
#define srandom(seed) srand(seed)
|
|
#define random() rand()
|
|
|
|
/* ANSI should give us an offsetof suitable for the implementation;
|
|
* otherwise, try a non-portable but commonly supported definition
|
|
*/
|
|
#ifdef __STDC__
|
|
#include <stddef.h>
|
|
#endif
|
|
#ifndef offsetof
|
|
#define offsetof(type, member) ((size_t) \
|
|
((char *)&((type*)0)->member - (char *)(type *)0))
|
|
#endif
|
|
|
|
#endif /* SYSFUNCH */
|