static pid_t gtob_pid = 0;
static pid_t btop_pid = 0;
-#if defined( SVR4 ) || defined( SYSV ) || defined(__osf__)
+#if defined( SVR4 ) || defined( SYSV ) || defined(__osf__) || defined(__FreeBSD__)
static int chld_stat ;
#else
static union wait chld_stat ;
#else
fclose( WriteSnf.output );
WaitID( btop_pid, chld_stat ) ;
-#if !defined( SVR4 ) && !defined( SYSV ) &&!defined(__osf__)
+#if !defined( SVR4 ) && !defined( SYSV ) &&!defined(__osf__) && !defined(__FreeBSD__)
if ( !WIFEXITED(chld_stat) ) {
#else
if ( ! ( WIFEXITED(chld_stat) && !WEXITSTATUS(chld_stat) ) ) {
char *style ; /* style */
int chk_fd;
pid_t chld_pid = 0;
-#if defined( SVR4 ) || defined( SYSV )
+#if defined( SVR4 ) || defined( SYSV ) || defined(__FreeBSD__)
int chld_stat ;
#else
union wait chld_stat ;
fclose( Head.output );
close( pfd[1] );
wait( &exit_stat );
-#if !defined( SVR4 ) && !defined( SYSV )
+#if !defined( SVR4 ) && !defined( SYSV ) && !defined(__FreeBSD__)
if ( !WIFEXITED(exit_stat) ) {
#else
if (! ( WIFEXITED(exit_stat) && !WEXITSTATUS(exit_stat) ) ) {