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
stijn 2014-05-03 10:14:16 +02:00
rodzic 8f472ad577
commit 98e2ee0ec1
3 zmienionych plików z 3 dodań i 10 usunięć

Wyświetl plik

@ -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"

Wyświetl plik

@ -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"

1
windows/alloca.h 100644
Wyświetl plik

@ -0,0 +1 @@
#include <malloc.h>