#! /bin/sh -e
## 
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description. 

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"

if [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi  
case "$1" in
       -patch) patch $patch_opts -p1 < $0;;
       -unpatch) patch $patch_opts -p1 -R < $0;;
        *)
                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
		exit 1;;
esac            

exit 0
@DPATCH@
diff --git a/frontends/fax-by-lpr.txt b/frontends/fax-by-lpr.txt
index ead52c6..fc56fbf 100644
--- a/frontends/fax-by-lpr.txt
+++ b/frontends/fax-by-lpr.txt
@@ -78,18 +78,18 @@ Here are the relevant files and directory listings:
 	    :lp=:\
 	    :rm=love:\
 	    :rp=lpf1:\
-	    :sd=/usr/spool/lf:\
+	    :sd=/var/spool/lf:\
 	    :sh:\
 	    :mx#0: 
     # 
     # Local Fax printer 
     # 
     lpf1:\
-	    :lp=/usr/spool/lpf1/foo:\
-	    :sd=/usr/spool/lpf1:\
-	    :lf=/usr/spool/lpf1/lf:\
+	    :lp=/var/spool/lpf1/foo:\
+	    :sd=/var/spool/lpf1:\
+	    :lf=/var/spool/lpf1/lf:\
 	    :sb:\
-	    :if=/usr/spool/lpf1/tf:\
+	    :if=/var/spool/lpf1/tf:\
 	    :mx#0:
 =============================================================================
 ls -l /var/spool:
diff --git a/logfile.c b/logfile.c
index cd92d39..c815230 100644
--- a/logfile.c
+++ b/logfile.c
@@ -25,7 +25,7 @@
 #include <syslog.h>
 
 #if !defined(linux) && !defined(BSD) && !defined(_SCO_DS) && \
-    !defined(SVR42) && !defined(solaris2) && !defined(_AIX) && !defined(__GLIBC__)
+    !defined(SVR42) && !defined(solaris2) && !defined(_AIX)
 int openlog _PROTO(( char *, int, int ));
 int syslog _PROTO(( int, char *, ... ));
 #endif
diff --git a/mgetty.h b/mgetty.h
index 38751dc..fb983b2 100644
--- a/mgetty.h
+++ b/mgetty.h
@@ -365,7 +365,7 @@ int getdiskstats _PROTO ((char *path, mntinf *mi));
 extern char * mktemp _PROTO(( char * template ));
 
 #if  !defined(linux) && !defined(SVR4) && !defined(__hpux) && \
-     !defined(BSD) && !defined(M_UNIX) && !defined(_AIX) && !defined(__GLIBC__)
+     !defined(BSD) && !defined(M_UNIX) && !defined(_AIX)
 extern int	getopt _PROTO(( int, char **, char * ));
 #endif
 extern int	optind;
diff --git a/tio.c b/tio.c
index dc72091..bb9b887 100644
--- a/tio.c
+++ b/tio.c
@@ -45,7 +45,7 @@
 
 /* some systems do not define all flags needed later, e.g. NetBSD */
 
-#if defined(BSD) || defined(__FreeBSD_kernel__)
+#ifdef BSD
 # ifndef IUCLC
 # define IUCLC 0
 # endif
diff --git a/tio.h b/tio.h
index 8a3a063..79d2e75 100644
--- a/tio.h
+++ b/tio.h
@@ -18,7 +18,7 @@
 #if !defined( POSIX_TERMIOS ) && !defined( BSD_SGTTY ) && !defined( SYSV_TERMIO)
 # if defined(linux) || defined(sunos4) || defined(_AIX) || defined(BSD) || \
      defined(SVR4) || defined(solaris2) || defined(m88k) || defined(M_UNIX) ||\
-     defined(__sgi) || defined(__GLIBC__)
+     defined(__sgi)
 #  define POSIX_TERMIOS
 # else
 #  define SYSV_TERMIO
