Mercurial > octave
diff libinterp/corefcn/oct-tex-lexer.in.ll @ 21910:4d723ba06b4a
provide wrappers for some unistd.h functions
* liboctave/wrappers/unistd-wrappers.c,
liboctave/wrappers/unistd-wrappers.h: New files.
* liboctave/wrappers/module.mk: Update.
* gl2ps-print.cc, oct-hist.cc, oct-procbuf.cc, oct-tex-lexer.in.ll,
sysdep.cc, octave.cc, parse-tree/lex.ll, file-ops.cc, lo-sysdep.cc,
oct-env.cc, oct-syscalls.cc, cmd-edit.cc, kpse.cc:
Use wrappers instead of calling unistd.h functions directly.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 14 Jun 2016 18:10:04 -0400 |
parents | 72bf7fbc8210 |
children | aab79a1885cc |
line wrap: on
line diff
--- a/libinterp/corefcn/oct-tex-lexer.in.ll Tue Jun 14 16:31:34 2016 -0400 +++ b/libinterp/corefcn/oct-tex-lexer.in.ll Tue Jun 14 18:10:04 2016 -0400 @@ -58,12 +58,7 @@ %{ -// The generated code may include unistd.h. We need that to happen -// before defining isatty to be prefixed with the gnulib namespace -// identifier. - -#include <sys/types.h> -#include <unistd.h> +#include "unistd-wrappers.h" #include "txt-eng.h" #include "oct-tex-parser.h" @@ -79,6 +74,9 @@ # define YYSTYPE OCTAVE_TEX_STYPE #endif +#define YY_NO_UNISTD_H 1 +#define isatty octave_isatty_wrapper + #if defined (GNULIB_NAMESPACE) // Calls to the following functions appear in the generated output // from flex without the namespace tag. Redefine them so we will use @@ -87,7 +85,6 @@ # define fread GNULIB_NAMESPACE::fread # define fwrite GNULIB_NAMESPACE::fwrite # define getc GNULIB_NAMESPACE::getc -# define isatty GNULIB_NAMESPACE::isatty # define malloc GNULIB_NAMESPACE::malloc # define realloc GNULIB_NAMESPACE::realloc #endif