Commit 262371b7 authored by Peter Pentchev's avatar Peter Pentchev

Fix the build with NEED_ALLOCA_H.

parent 46291e8f
......@@ -3,6 +3,7 @@ Change log for hexer, the multi-view binary editor
1.0.0 not yet
- drop support for ancient compilers that do not support
the "const" keyword or do not provide the alloca() function
- fix the build on systems that do not need or have alloca.h
0.2.3 2015/12/10
- build with large file support on Linux
......
......@@ -49,7 +49,6 @@
#define NDEBUG
#include <alloca.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......
......@@ -45,7 +45,6 @@
#include "config.h"
#include <alloca.h>
#include <assert.h>
#include <pwd.h>
#include <string.h>
......
......@@ -45,7 +45,6 @@
#include "config.h"
#include <alloca.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......
......@@ -46,7 +46,6 @@
#include "config.h"
#include <alloca.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......
......@@ -45,7 +45,6 @@
#include "config.h"
#include <alloca.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
......
......@@ -51,8 +51,20 @@
#include <stdio.h>
#include <stdarg.h>
#if NEED_ALLOCA_H
#include <alloca.h>
#else
/**
* Sigh, some platforms insist on hiding alloca(3) with _POSIX_C_SOURCE or
* _XOPEN_SOURCE, so we'll just have to declare it ourselves.
*/
#if defined(__GNUC__) && __GNUC__ >= 2 || defined(__INTEL_COMPILER)
#undef alloca
#define alloca(sz) __builtin_alloca(sz)
#else
void *alloca(size_t size);
#endif
#endif
#define TIO_MAP 1
......
......@@ -47,7 +47,6 @@
#include "config.h"
#include <alloca.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment