X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=ckutio.c;h=05564deab32aae17ccc780ebb80baa569e4af144;hb=b5203ffb6f7937fb4c616e718c91b123ea8116ce;hp=6551e7707d7a78b860c925ae769dc0eab8bac777;hpb=c8091b603419995c9b3d1b7b1d2904c917415af0;p=ckermit.git diff --git a/ckutio.c b/ckutio.c index 6551e77..05564de 100644 --- a/ckutio.c +++ b/ckutio.c @@ -1,12 +1,12 @@ #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 */ @@ -50,7 +50,13 @@ extern int duplex; #endif /* CK_ANSIC */ #endif /* OSF13 */ -#include /* System error numbers */ +#ifndef HPUXPRE65 +#include /* Error number symbols */ +#else +#ifndef ERRNO_INCLUDED +#include /* Error number symbols */ +#endif /* ERRNO_INCLUDED */ +#endif /* HPUXPRE65 */ #ifdef __386BSD__ #define ENOTCONN 57 @@ -4970,6 +4976,9 @@ ttlock(ttdev) char *ttdev; { int x, n; int islink = 0; +#ifdef __FreeBSD__ + char *devname; +#endif /* __FreeBSD__ */ #ifdef NOUUCP debug(F100,"ttlock NOUUCP","",0); @@ -4981,8 +4990,17 @@ ttlock(ttdev) char *ttdev; { #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); /*