kopia lustrzana https://github.com/micropython/micropython
py: Use <alloca.h> for alloca()
alloca() is declared in alloca.h which als happens to be included by stdlib.h. On mingw however it resides in malloc.h only. So if we include alloca.h directly, and add an alloca.h for mingw in it's port directory we can get rid of the mingw-specific define to include malloc.h and the other ports are happy as well.pull/552/head
rodzic
8f472ad577
commit
98e2ee0ec1
|
@ -1,12 +1,8 @@
|
|||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#ifdef __MINGW32__
|
||||
// For alloca()
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#include <alloca.h>
|
||||
|
||||
#include "mpconfig.h"
|
||||
#include "nlr.h"
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#ifdef __MINGW32__
|
||||
// For alloca()
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#include <alloca.h>
|
||||
|
||||
#include "mpconfig.h"
|
||||
#include "nlr.h"
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
#include <malloc.h>
|
Ładowanie…
Reference in New Issue