2 * gawkmisc.c --- miscellanious gawk routines that are OS specific.
6 * Copyright (C) 1986, 1988, 1989, 1991-2004, 2010, 2011
7 * the Free Software Foundation, Inc.
9 * This file is part of GAWK, the GNU implementation of the
10 * AWK Programming Language.
12 * GAWK is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 3 of the License, or
15 * (at your option) any later version.
17 * GAWK is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
29 #if defined(HAVE_FCNTL_H)
33 /* some old compilers don't grok #elif. sigh */
35 #if defined(__EMX__) || defined(__DJGPP__) || defined(__MINGW32__)
36 #include "pc/gawkmisc.pc"
37 #else /* not __DJGPP__, not __MINGW32__ */
39 #include "vms/gawkmisc.vms"
41 #include "posix/gawkmisc.c"
43 #endif /* not __DJGPP__, not __MINGW32__ */
45 /* xmalloc --- provide this so that other GNU library routines work */
47 typedef void *pointer;
49 extern pointer xmalloc(size_t bytes); /* get rid of gcc warning */
55 emalloc(p, pointer, bytes, "xmalloc");