#define CKUTIO_C
#ifdef aegis
-char *ckxv = "Aegis Communications support, 9.0.324, 20 June 2011";
+char *ckxv = "Aegis Communications support, 9.0.326, 20 August 2011";
#else
#ifdef Plan9
-char *ckxv = "Plan 9 Communications support, 9.0.324, 20 June 2011";
+char *ckxv = "Plan 9 Communications support, 9.0.326, 20 August 2011";
#else
-char *ckxv = "UNIX Communications support, 9.0.324, 20 June 2011";
+char *ckxv = "UNIX Communications support, 9.0.326, 20 August 2011";
#endif /* Plan9 */
#endif /* aegis */
#endif /* CK_ANSIC */
#endif /* OSF13 */
-#include <errno.h> /* System error numbers */
+#ifndef HPUXPRE65
+#include <errno.h> /* Error number symbols */
+#else
+#ifndef ERRNO_INCLUDED
+#include <errno.h> /* Error number symbols */
+#endif /* ERRNO_INCLUDED */
+#endif /* HPUXPRE65 */
#ifdef __386BSD__
#define ENOTCONN 57
int x, n;
int islink = 0;
+#ifdef __FreeBSD__
+ char *devname;
+#endif /* __FreeBSD__ */
#ifdef NOUUCP
debug(F100,"ttlock NOUUCP","",0);
#ifdef USETTYLOCK
haslock = 0; /* Not locked yet. */
*flfnam = '\0'; /* Lockfile name is empty. */
+#ifdef __FreeBSD__
+ if ((devname = xxlast(ttdev,'/')) != NULL)
+#ifdef FREEBSD8
+ ckstrncat(lockname,devname+1,DEVNAMLEN-ckstrncpy(lockname,"pts",4));
+#else
+ ckstrncpy(lockname,devname+1,DEVNAMLEN);
+#endif /* FREEBSD8 */
+#else
if (!strncmp(ttdev,"/dev/",5) && ttdev[5])
ckstrncpy(lockname,ttdev+5,DEVNAMLEN);
+#endif /* __FreeBSD__ */
else
ckstrncpy(lockname,ttdev,DEVNAMLEN);
/*