# endif
#endif
-#ifdef __NetBSD__
+#if defined(__NetBSD__) || defined(__OpenBSD__)
#define ORDINARY_LINK
#endif
#ifndef NOT_C_CODE
/* We need these because pointers are larger than the default ints. */
-#ifndef __NetBSD__
+#if !defined(__NetBSD__) && !defined(__OpenBSD__)
#include <alloca.h>
#else
#include <stdlib.h>
{ \
int dummy; \
SIGMASKTYPE mask; \
- mask = sigblock (SIGCHLD); \
+ mask = sigblock (sigmask (SIGCHLD)); \
if (-1 == openpty (&fd, &dummy, pty_name, 0, 0)) \
fd = -1; \
sigsetmask (mask); \
termio and struct termios are mutually incompatible. */
#define NO_TERMIO
-#ifdef LINUX
+#if defined (LINUX) || defined (__NetBSD__) || defined (__OpenBSD__)
# define TEXT_END ({ extern int _etext; &_etext; })
# ifndef __ELF__
# define COFF
# define DATA_END ({ extern int _EDATA; &_EDATA; })
# endif /* notdef __ELF__ */
#endif
+
+#if (defined (__NetBSD__) || defined (__OpenBSD__)) && defined (__ELF__)
+#define HAVE_TEXT_START
+#endif