chiark / gitweb /
portability: Provide implementation of fmemopen
We are going to want one of these. I have tested it as follows:
1. In configure.ac just before AC_CHECK_FUNCS, add: LIBS+=-lbsd
2. In osdep.c, add: #include <bsd/stdio.h>
3. Change all fmemopen to Yfmemopen, with
git-ls-files | perl -lne 'print if lstat and -f _' | xargs perl -i~ -pe 's/fmemopen/Y$&/gi'
The result is that we do not find Yfmemopen. The tests still pass and
I have verified that my stunt implementation is called.
FTR, this rune undoes the Y:
git-ls-files | perl -lne 'print if lstat and -f _' | xargs perl -i~ -pe 's/Y(fmemopen)/$1/gi'
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>