11 lines
424 B
C
11 lines
424 B
C
#include "net.h"
|
|
#include "nwdbm.h"
|
|
#include <stddef.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
int main(void) {
|
|
NETPROP a={0}, b={0}; a.obj_id=b.obj_id=1; a.id=1; b.id=2;
|
|
printf("uint32=%zu; NETPROP.id offset=%zu; key=%d; distinct keys=%d\n",sizeof(uint32),offsetof(NETPROP,id),NETPROP_KEY_SIZE,memcmp(&a,&b,NETPROP_KEY_SIZE)!=0);
|
|
return sizeof(uint32)!=4 || offsetof(NETPROP,id)!=4 || !memcmp(&a,&b,NETPROP_KEY_SIZE);
|
|
}
|