X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=ckutio.c;h=05564deab32aae17ccc780ebb80baa569e4af144;hb=779a514af67d51cefda6d6130e8d7c50a0e4c62b;hp=d3354be5c2752a41fdaf834f26926213512dc761;hpb=31e271107096d1ffa97b7d0c15222b8bd5e69f74;p=ckermit.git diff --git a/ckutio.c b/ckutio.c index d3354be..05564de 100644 --- a/ckutio.c +++ b/ckutio.c @@ -1,12 +1,12 @@ #define CKUTIO_C #ifdef aegis -char *ckxv = "Aegis Communications support, 9.0.323, 10 June 2011"; +char *ckxv = "Aegis Communications support, 9.0.326, 20 August 2011"; #else #ifdef Plan9 -char *ckxv = "Plan 9 Communications support, 9.0.323, 10 June 2011"; +char *ckxv = "Plan 9 Communications support, 9.0.326, 20 August 2011"; #else -char *ckxv = "UNIX Communications support, 9.0.323, 10 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 @@ -828,10 +834,18 @@ Time functions #endif /* XENIX */ #ifdef CK_SCOV5 /* Ditto for SCO OpenServer 5.0 */ +#ifndef SCO_OSR507 /* 299 */ #ifdef FIONREAD #undef FIONREAD #endif /* FIONREAD */ -#endif /* XENIX */ +#endif /* SCO_OSR507 */ +#endif /* CK_SCOV5 */ + +#ifdef SCO_OSR507 /* 299 */ +#ifdef RDCHK +#undef RDCHK +#endif /* RDCHK */ +#endif /* SCO_OSR507 */ /* Whether to include */ @@ -4962,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); @@ -4973,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); /* @@ -14397,9 +14423,11 @@ pty_chk(fd) int fd; { ckitoa(n)); debug(F100,msgbuf,"",0); #else +#ifdef RDCHK n = rdchk(fd); debug(F101,"pty_chk rdchk","",n); -#ifdef RDCHK +#else + n = 1; #endif /* RDCHK */ #endif /* FIONREAD */ return((n > -1) ? n : 0);