portability: fix problems compiling with C++ compiler
commit87dfd917de533d0b21cb376423e6d8f78348c243
authorTony Finch <dot@dotat.at>
Fri, 26 Feb 2016 09:39:13 +0000 (26 09:39 +0000)
committerTony Finch <dot@dotat.at>
Fri, 26 Feb 2016 09:39:13 +0000 (26 09:39 +0000)
tree34c31858794e758af01ca920caff417bb4b2d020
parent5a40ec53190e080ca5e283161ea3b962a69f4b9b
portability: fix problems compiling with C++ compiler

Michael McConville suggested removing a "redundant" cast of
the return value from malloc(), based on a change in the
OpenBSD version of unifdef. This is a good suggestion for
a purely C program, but the cast is required in C++.

Carsten Hey contributed some portability improvements in
2012 which included this cast, so that unifdef can be
compiled with a C++ compiler. Unfortunately since then
there have been several regressions in C++ support.

This commit fixes those regressions.
unifdef.c
win32/unifdef.h
win32/win32.c