--- pgp/src/system.c 2018/04/24 16:39:56 1.1.1.4 +++ pgp/src/system.c 2018/04/24 16:42:01 1.1.1.6 @@ -3,6 +3,23 @@ * * Routines specific for non-MSDOS implementations of pgp. * + * (c) Copyright 1990-1994 by Philip Zimmermann. All rights reserved. + * The author assumes no liability for damages resulting from the use + * of this software, even if the damage results from defects in this + * software. No warranty is expressed or implied. + * + * Note that while most PGP source modules bear Philip Zimmermann's + * copyright notice, many of them have been revised or entirely written + * by contributors who frequently failed to put their names in their + * code. Code that has been incorporated into PGP from other authors + * was either originally published in the public domain or is used with + * permission from the various authors. + * + * PGP is available for free to the public under certain restrictions. + * See the PGP User's Guide (included in the release package) for + * important information about licensing, patent restrictions on + * certain algorithms, trademarks, copyrights, and export controls. + * * Modified 24-Jun-92 HAJK * Adapt for VAX/VMS. * @@ -115,7 +132,8 @@ void ttycbreak(void) #else if (ioctl(ttyfd, TCGETA, &tio) < 0) #endif /* not SVR2 */ - { fprintf (stderr, "\nUnable to get terminal characteristics: "); + { + fprintf (stderr, "\nUnable to get terminal characteristics: "); perror("ioctl"); exitPGP(1); } @@ -135,8 +153,8 @@ void ttycbreak(void) ioctl(ttyfd, TCSETAF, &tio); #endif /* not SVR2 */ #else - if (ioctl(ttyfd, TIOCGETP, &sg) < 0) - { fprintf (stderr, "\nUnable to get terminal characteristics: "); + if (ioctl(ttyfd, TIOCGETP, &sg) < 0) { + fprintf (stderr, "\nUnable to get terminal characteristics: "); perror("ioctl"); exitPGP(1); } @@ -197,14 +215,16 @@ static void sig1 (int sig) } static void sig2 (int sig) -{ if (gottio) +{ + if (gottio) ttycbreak(); else setsigs(); } static void setsigs(void) -{ savesig = signal (SIGINT, sig1); +{ + savesig = signal (SIGINT, sig1); #ifdef SIGTSTP signal (SIGCONT, sig2); signal (SIGTSTP, sig1); @@ -310,7 +330,7 @@ register int n; } #endif /* _BSD */ -#if (defined(MACH) || defined(SVR2) || defined(_BSD)) && !defined(NEXT) +#if (defined(MACH) || defined(SVR2) || defined(_BSD)) && !defined(NEXT) && !defined(AUX) || (defined(sun) && defined(i386)) int remove(name) char *name; { @@ -318,7 +338,7 @@ char *name; } #endif -#ifdef SVR2 +#if defined(SVR2) && !defined(AUX) int rename(old, new) register char *old, *new; { @@ -337,7 +357,7 @@ register char *old, *new; long Clock() /* not a replacement for clock(), just for random number generation */ { -#if defined(_BSD) || defined(sun) || defined(MACH) || defined(linux) +#if defined(_BSD) || (defined(sun) && !defined(SOLARIS)) || defined(MACH) || defined(linux) #include #include struct rusage ru;