4 |
|
*/ |
5 |
|
#ifndef _RAD_RTMISC_H_ |
6 |
|
#define _RAD_RTMISC_H_ |
7 |
– |
#ifdef __cplusplus |
8 |
– |
extern "C" { |
9 |
– |
#endif |
7 |
|
|
8 |
|
#include <stdlib.h> |
12 |
– |
/* memory operations */ |
13 |
– |
#ifdef NOSTRUCTASS |
14 |
– |
#define copystruct(d,s) bcopy((void *)(s),(void *)(d),sizeof(*(d))) |
15 |
– |
#else |
16 |
– |
#define copystruct(d,s) (*(d) = *(s)) |
17 |
– |
#endif |
9 |
|
|
10 |
< |
#ifndef BSD |
11 |
< |
#define bcopy(s,d,n) (void)memcpy(d,s,n) |
21 |
< |
#define bzero(d,n) (void)memset(d,0,n) |
22 |
< |
#define bcmp(b1,b2,n) memcmp(b1,b2,n) |
10 |
> |
#ifdef __cplusplus |
11 |
> |
extern "C" { |
12 |
|
#endif |
13 |
|
|
25 |
– |
#ifdef _WIN32 |
26 |
– |
#define NIX 1 |
27 |
– |
#endif |
28 |
– |
#ifdef AMIGA |
29 |
– |
#define NIX 1 |
30 |
– |
#endif |
14 |
|
/* defined in bmalloc.c */ |
15 |
|
extern char *bmalloc(unsigned int n); |
16 |
|
extern void bfree(char *p, unsigned int n); |
17 |
+ |
/* defined in myhostname.c */ |
18 |
+ |
extern char *myhostname(void); |
19 |
|
|
20 |
|
#ifdef __cplusplus |
21 |
|
} |