Home | History | Annotate | Line # | Download | only in ksh
conf-end.h revision 1.3
      1 /*	$NetBSD: conf-end.h,v 1.3 2017/06/22 23:54:13 kamil Exp $	*/
      2 
      3 /*
      4  * End of configuration stuff for PD ksh.
      5  *
      6  * RCSid: $NetBSD: conf-end.h,v 1.3 2017/06/22 23:54:13 kamil Exp $
      7  */
      8 
      9 #if defined(EMACS) || defined(VI)
     10 # define	EDIT
     11 #else
     12 # undef		EDIT
     13 #endif
     14 
     15 /* Editing implies history */
     16 #if defined(EDIT) && !defined(HISTORY)
     17 # define HISTORY
     18 #endif /* EDIT */
     19 
     20 #if defined(HISTORY) && (!defined(COMPLEX_HISTORY) || !defined(HAVE_FLOCK))
     21 # undef COMPLEX_HISTORY
     22 # define EASY_HISTORY			/* sjg's trivial history file */
     23 #endif
     24 
     25 /* Can we safely catch sigchld and wait for processes? */
     26 #if (defined(HAVE_WAITPID) || defined(HAVE_WAIT3)) \
     27     && (defined(POSIX_SIGNALS) || defined(BSD42_SIGNALS))
     28 # define JOB_SIGS
     29 #endif
     30 
     31 #if !defined(JOB_SIGS) || !(defined(POSIX_PGRP) || defined(BSD_PGRP))
     32 # undef JOBS /* if no JOB_SIGS, no job control support */
     33 #endif
     34 
     35 /* pdksh assumes system calls return EINTR if a signal happened (this so
     36  * the signal handler doesn't have to longjmp()).  I don't know if this
     37  * happens (or can be made to happen) with sigset() et. al. (the bsd41 signal
     38  * routines), so, the autoconf stuff checks what they do and defines
     39  * SIGNALS_DONT_INTERRUPT if signals don't interrupt read().
     40  * If SIGNALS_DONT_INTERRUPT isn't defined and your compiler chokes on this,
     41  * delete the hash in front of the error (and file a bug report).
     42  */
     43 #ifdef SIGNALS_DONT_INTERRUPT
     44   # error pdksh needs interruptable system calls.
     45 #endif /* SIGNALS_DONT_INTERRUPT */
     46 
     47 #ifdef HAVE_GCC_FUNC_ATTR
     48 # define GCC_FUNC_ATTR(x)	__attribute__((x))
     49 # define GCC_FUNC_ATTR2(x,y)	__attribute__((x,y))
     50 #else
     51 # define GCC_FUNC_ATTR(x)
     52 # define GCC_FUNC_ATTR2(x,y)
     53 #endif /* HAVE_GCC_FUNC_ATTR */
     54