Browse Source

test

release/v0.1
jl777 8 years ago
parent
commit
161c1dd5a9
  1. 1
      crypto777/OS_portable.h
  2. 2
      crypto777/iguana_OS.c
  3. 1
      includes/cJSON.h

1
crypto777/OS_portable.h

@ -55,6 +55,7 @@
#include <pthread.h>
#include <sys/mman.h>
#include <sys/socket.h>
#include <unistd.h>
#define closesocket close
#endif

2
crypto777/iguana_OS.c

@ -107,7 +107,7 @@ void *mycalloc(uint8_t type,int32_t n,long itemsize)
while ( (item= calloc(1,sizeof(struct allocitem) + allocsize + 16)) == 0 )
{
char str[65];
printf("mycalloc: need to wait for memory.(%d,%ld) %s to be available\n",n,itemsize,mbstr(str,allocsize));
printf("mycalloc.%c: need to wait for memory.(%d,%ld) %s to be available\n",type,n,itemsize,mbstr(str,allocsize));
sleep(1);
}
//printf("calloc origptr.%p retptr.%p size.%ld\n",item,(void *)(long)item + sizeof(*item),allocsize);

1
includes/cJSON.h

@ -26,7 +26,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <unistd.h>
#include <math.h>
#include <ctype.h>
#include <float.h>

Loading…
Cancel
Save