- FreeBSD provides alloca() via stdlib.h, in contrast to Linux and Windows

- Move the includes for alloca() intp mpconfigport.h
pull/673/head
Marcus von Appen 2014-06-07 09:36:04 +02:00
rodzic c61be8e1e1
commit 0c90eb1658
7 zmienionych plików z 9 dodań i 6 usunięć

Wyświetl plik

@ -29,7 +29,6 @@
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <alloca.h>
#include "mpconfig.h"
#include "nlr.h"

Wyświetl plik

@ -28,7 +28,6 @@
#include <stdbool.h>
#include <string.h>
#include <assert.h>
#include <alloca.h>
#include "mpconfig.h"
#include "nlr.h"

Wyświetl plik

@ -27,7 +27,6 @@
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <alloca.h>
#include "mpconfig.h"
#include "nlr.h"

Wyświetl plik

@ -28,7 +28,6 @@
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <alloca.h>
#include "mpconfig.h"
#include "nlr.h"

Wyświetl plik

@ -37,7 +37,6 @@
#include <arpa/inet.h>
#include <netdb.h>
#include <errno.h>
#include <alloca.h>
#include "mpconfig.h"
#include "nlr.h"

Wyświetl plik

@ -98,3 +98,11 @@ extern const struct _mp_obj_fun_native_t mp_builtin_open_obj;
#define MICROPY_PORT_BUILTINS \
{ MP_OBJ_NEW_QSTR(MP_QSTR_input), (mp_obj_t)&mp_builtin_input_obj }, \
{ MP_OBJ_NEW_QSTR(MP_QSTR_open), (mp_obj_t)&mp_builtin_open_obj },
/* We need the correct header for alloca() */
#ifdef __FreeBSD__
#include <stdlib.h>
#else
#include <alloca.h>
#endif

Wyświetl plik

@ -114,7 +114,7 @@ void msec_sleep(double msec);
#include <stddef.h> //for NULL
#include <assert.h> //for assert
#include <alloca.h> //for alloca()
// Functions implemented in platform code