Commit 8a759ad3 authored by Frank Morgner's avatar Frank Morgner

try to link symlink and use a define on error

fixes compiling with Minimalist GNU win32 (cross) compiler 4.2.1, which
defines symlink, but doesn't implement it.
parent 101c26db
......@@ -63,6 +63,7 @@ AC_SEARCH_LIBS(getopt, iberty)
AC_CHECK_FUNCS(strtoimax strtoll)
AC_CHECK_FUNCS(mergesort)
AC_CHECK_FUNCS(mkstemps)
AC_TRY_LINK_FUNC([symlink],[AC_DEFINE([HAVE_SYMLINK], 1, [Define to 1 if you have the symlink function.])])
AC_OUTPUT( \
skeletons/standard-modules/Makefile \
......
......@@ -6,6 +6,10 @@
#include "asn1c_save.h"
#include "asn1c_out.h"
#ifndef HAVE_SYMLINK
#define symlink(a,b) (errno=ENOSYS, -1)
#endif
#define HINCLUDE(s) \
((arg->flags & A1C_INCLUDES_QUOTED) \
? fprintf(fp_h, "#include \"%s\"\n", s) \
......
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