Hi,
i'm not an expert in C but i try to compile BTNG software under linux
kernel 2.4.2-2. I get these errors at the very first stage. Does
someone could have a rapid look on this and tell me what's wrong
regards
I get this error:
dmemory.h:66: parse error before `mem2ulong'
dmemory.h:66: warning: data definition has no type or storage class
dmemory.h:66: parse error before `ulong'
dmemory.h:71: parse error before `mem2uint'
dmemory.h:71: warning: data definition has no type or storage class
dmemory.h:71: parse error before `uint'
Here is the dmemory.h:
/* Beholder RMON ethernet network monitor,Copyright (C) 1993 DNPAP
group */
/* See file COPYING 'GNU General Public Licence' for copyright details
*/
#ifndef _DMEMORY_H
#define _DMEMORY_H
#include <dnpap.h>
#ifndef HAS_UINT
typedef unsigned int uint;
#endif
#ifndef HAS_ULONG
typedef unsigned long ulong;
#endif
typedef WORD word;
typedef DWORD dword;
typedef LWORD lword;
#ifndef HAS_MEMMOVE
#define memmove(dst, src, n) bcopy((src), (dst), (n));
#endif
#define protconvtype(type) type mem2##type(BYTE *mem); \
void type##2mem(BYTE *mem, type val)
#ifdef ALIGNSECURE
#define defconvtype(type) \
type mem2##type(BYTE *mem) \
{ \
type val; \
\
memcpy(&val, mem, sizeof(type)); \
return val; \
} \
\
void type##2mem(BYTE *mem, type val) \
{ \
memcpy(mem, &val, sizeof(type)); \
}
#else
#define defconvtype(type) \
type mem2##type(BYTE *mem) \
{ \
return *(type *)mem; \
} \
\
void type##2mem(BYTE *mem, type val) \
{ \
*(type *)mem = val; \
}
#endif
#ifdef SPECIAL_MEMCMP
int memcmp(CONST VOID *b1, CONST VOID *b2, ULONG len);
#endif
protconvtype(long);
protconvtype(ulong);
protconvtype(word);
protconvtype(dword);
protconvtype(lword);
protconvtype(int);
protconvtype(uint);
#endif