head 1.6; access; symbols pkgsrc-2026Q1:1.6.0.8 pkgsrc-2026Q1-base:1.6 pkgsrc-2025Q4:1.6.0.6 pkgsrc-2025Q4-base:1.6 pkgsrc-2025Q3:1.6.0.4 pkgsrc-2025Q3-base:1.6 pkgsrc-2025Q2:1.6.0.2 pkgsrc-2025Q2-base:1.6 pkgsrc-2025Q1:1.4.0.36 pkgsrc-2025Q1-base:1.4 pkgsrc-2024Q4:1.4.0.34 pkgsrc-2024Q4-base:1.4 pkgsrc-2024Q3:1.4.0.32 pkgsrc-2024Q3-base:1.4 pkgsrc-2024Q2:1.4.0.30 pkgsrc-2024Q2-base:1.4 pkgsrc-2024Q1:1.4.0.28 pkgsrc-2024Q1-base:1.4 pkgsrc-2023Q4:1.4.0.26 pkgsrc-2023Q4-base:1.4 pkgsrc-2023Q3:1.4.0.24 pkgsrc-2023Q3-base:1.4 pkgsrc-2023Q2:1.4.0.22 pkgsrc-2023Q2-base:1.4 pkgsrc-2023Q1:1.4.0.20 pkgsrc-2023Q1-base:1.4 pkgsrc-2022Q4:1.4.0.18 pkgsrc-2022Q4-base:1.4 pkgsrc-2022Q3:1.4.0.16 pkgsrc-2022Q3-base:1.4 pkgsrc-2022Q2:1.4.0.14 pkgsrc-2022Q2-base:1.4 pkgsrc-2022Q1:1.4.0.12 pkgsrc-2022Q1-base:1.4 pkgsrc-2021Q4:1.4.0.10 pkgsrc-2021Q4-base:1.4 pkgsrc-2021Q3:1.4.0.8 pkgsrc-2021Q3-base:1.4 pkgsrc-2021Q2:1.4.0.6 pkgsrc-2021Q2-base:1.4 pkgsrc-2021Q1:1.4.0.4 pkgsrc-2021Q1-base:1.4 pkgsrc-2020Q4:1.4.0.2 pkgsrc-2020Q4-base:1.4 pkgsrc-2020Q3:1.3.0.46 pkgsrc-2020Q3-base:1.3 pkgsrc-2020Q2:1.3.0.42 pkgsrc-2020Q2-base:1.3 pkgsrc-2020Q1:1.3.0.22 pkgsrc-2020Q1-base:1.3 pkgsrc-2019Q4:1.3.0.44 pkgsrc-2019Q4-base:1.3 pkgsrc-2019Q3:1.3.0.40 pkgsrc-2019Q3-base:1.3 pkgsrc-2019Q2:1.3.0.38 pkgsrc-2019Q2-base:1.3 pkgsrc-2019Q1:1.3.0.36 pkgsrc-2019Q1-base:1.3 pkgsrc-2018Q4:1.3.0.34 pkgsrc-2018Q4-base:1.3 pkgsrc-2018Q3:1.3.0.32 pkgsrc-2018Q3-base:1.3 pkgsrc-2018Q2:1.3.0.30 pkgsrc-2018Q2-base:1.3 pkgsrc-2018Q1:1.3.0.28 pkgsrc-2018Q1-base:1.3 pkgsrc-2017Q4:1.3.0.26 pkgsrc-2017Q4-base:1.3 pkgsrc-2017Q3:1.3.0.24 pkgsrc-2017Q3-base:1.3 pkgsrc-2017Q2:1.3.0.20 pkgsrc-2017Q2-base:1.3 pkgsrc-2017Q1:1.3.0.18 pkgsrc-2017Q1-base:1.3 pkgsrc-2016Q4:1.3.0.16 pkgsrc-2016Q4-base:1.3 pkgsrc-2016Q3:1.3.0.14 pkgsrc-2016Q3-base:1.3 pkgsrc-2016Q2:1.3.0.12 pkgsrc-2016Q2-base:1.3 pkgsrc-2016Q1:1.3.0.10 pkgsrc-2016Q1-base:1.3 pkgsrc-2015Q4:1.3.0.8 pkgsrc-2015Q4-base:1.3 pkgsrc-2015Q3:1.3.0.6 pkgsrc-2015Q3-base:1.3 pkgsrc-2015Q2:1.3.0.4 pkgsrc-2015Q2-base:1.3 pkgsrc-2015Q1:1.3.0.2 pkgsrc-2015Q1-base:1.3 pkgsrc-2014Q4:1.2.0.22 pkgsrc-2014Q4-base:1.2 pkgsrc-2014Q3:1.2.0.20 pkgsrc-2014Q3-base:1.2 pkgsrc-2014Q2:1.2.0.18 pkgsrc-2014Q2-base:1.2 pkgsrc-2014Q1:1.2.0.16 pkgsrc-2014Q1-base:1.2 pkgsrc-2013Q4:1.2.0.14 pkgsrc-2013Q4-base:1.2 pkgsrc-2013Q3:1.2.0.12 pkgsrc-2013Q3-base:1.2 pkgsrc-2013Q2:1.2.0.10 pkgsrc-2013Q2-base:1.2 pkgsrc-2013Q1:1.2.0.8 pkgsrc-2013Q1-base:1.2 pkgsrc-2012Q4:1.2.0.6 pkgsrc-2012Q4-base:1.2 pkgsrc-2012Q3:1.2.0.4 pkgsrc-2012Q3-base:1.2 pkgsrc-2012Q2:1.2.0.2 pkgsrc-2012Q2-base:1.2 pkgsrc-2012Q1:1.1.0.62 pkgsrc-2012Q1-base:1.1 pkgsrc-2011Q4:1.1.0.60 pkgsrc-2011Q4-base:1.1 pkgsrc-2011Q3:1.1.0.58 pkgsrc-2011Q3-base:1.1 pkgsrc-2011Q2:1.1.0.56 pkgsrc-2011Q2-base:1.1 pkgsrc-2011Q1:1.1.0.54 pkgsrc-2011Q1-base:1.1 pkgsrc-2010Q4:1.1.0.52 pkgsrc-2010Q4-base:1.1 pkgsrc-2010Q3:1.1.0.50 pkgsrc-2010Q3-base:1.1 pkgsrc-2010Q2:1.1.0.48 pkgsrc-2010Q2-base:1.1 pkgsrc-2010Q1:1.1.0.46 pkgsrc-2010Q1-base:1.1 pkgsrc-2009Q4:1.1.0.44 pkgsrc-2009Q4-base:1.1 pkgsrc-2009Q3:1.1.0.42 pkgsrc-2009Q3-base:1.1 pkgsrc-2009Q2:1.1.0.40 pkgsrc-2009Q2-base:1.1 pkgsrc-2009Q1:1.1.0.38 pkgsrc-2009Q1-base:1.1 pkgsrc-2008Q4:1.1.0.36 pkgsrc-2008Q4-base:1.1 pkgsrc-2008Q3:1.1.0.34 pkgsrc-2008Q3-base:1.1 cube-native-xorg:1.1.0.32 cube-native-xorg-base:1.1 pkgsrc-2008Q2:1.1.0.30 pkgsrc-2008Q2-base:1.1 cwrapper:1.1.0.28 pkgsrc-2008Q1:1.1.0.26 pkgsrc-2008Q1-base:1.1 pkgsrc-2007Q4:1.1.0.24 pkgsrc-2007Q4-base:1.1 pkgsrc-2007Q3:1.1.0.22 pkgsrc-2007Q3-base:1.1 pkgsrc-2007Q2:1.1.0.20 pkgsrc-2007Q2-base:1.1 pkgsrc-2007Q1:1.1.0.18 pkgsrc-2007Q1-base:1.1 pkgsrc-2006Q4:1.1.0.16 pkgsrc-2006Q4-base:1.1 pkgsrc-2006Q3:1.1.0.14 pkgsrc-2006Q3-base:1.1 pkgsrc-2006Q2:1.1.0.12 pkgsrc-2006Q2-base:1.1 pkgsrc-2006Q1:1.1.0.10 pkgsrc-2006Q1-base:1.1 pkgsrc-2005Q4:1.1.0.8 pkgsrc-2005Q4-base:1.1 pkgsrc-2005Q3:1.1.0.6 pkgsrc-2005Q3-base:1.1 pkgsrc-2005Q2:1.1.0.4 pkgsrc-2005Q2-base:1.1 pkgsrc-2005Q1:1.1.0.2 pkgsrc-2005Q1-base:1.1; locks; strict; comment @# @; 1.6 date 2025.04.21.16.16.57; author wiz; state Exp; branches; next 1.5; commitid TYaHJ3f1D4gz8WRF; 1.5 date 2025.04.21.16.11.22; author wiz; state Exp; branches; next 1.4; commitid oyEH7lH2F7KD6WRF; 1.4 date 2020.11.25.14.59.24; author ryoon; state Exp; branches; next 1.3; commitid vwVdwgBv8MJwohxC; 1.3 date 2015.02.15.14.45.48; author ryoon; state Exp; branches; next 1.2; commitid B1Zl9hwkTEES87ay; 1.2 date 2012.06.23.18.02.15; author dholland; state Exp; branches; next 1.1; 1.1 date 2005.01.19.17.08.09; author tv; state Exp; branches; next ; desc @@ 1.6 log @afio: update comment @ text @$NetBSD: patch-ac,v 1.5 2025/04/21 16:11:22 wiz Exp $ - Use standard headers. - Use strerror, not sys_errlist and sys_nerr. - Use POSIX utime() interface, not half-baked version. - Use W* macros from sys/wait.h instead of hard-coding the historic bit patterns. - Build fix for makedev() on Solaris. - Fix bad calls to execlp() that break on 64-bit platforms. --- afio.c.orig 2018-11-30 14:25:04.000000000 +0000 +++ afio.c @@@@ -163,7 +163,7 @@@@ #include #include -#ifdef sun +#ifdef __sun #include #include #include @@@@ -199,30 +199,29 @@@@ extern char *sys_errlist[]; #include #include #include +#include #include #include +#include #include "patchlevel.h" #ifdef linux -#define linux_tstamp 1 - -#include -#include - /* for flushing floppy cache */ #include #endif /* compatibility fixes for IRIX native c compiler. */ #ifdef irix_cc_compatibility -#define linux_tstamp 1 #include #endif #ifndef major #ifdef sun #include +# if !defined(makedev) && defined(mkdev) +# define makedev(a,b) mkdev((a),(b)) +# endif #else #include #endif @@@@ -1187,7 +1186,7 @@@@ savedirstamp (char *name, time_t mtime) STATIC void restoredirstamps (void) { -#ifdef linux_tstamp +#ifndef broken_utime auto struct utimbuf tstamp; #else auto time_t tstamp[2]; @@@@ -1196,7 +1195,7 @@@@ restoredirstamps (void) Dir *DirP_forw; while(DirP_curr!=NULL) { -#ifdef linux_tstamp +#ifndef broken_utime tstamp.actime = DirP_curr->d_mtime; tstamp.modtime = DirP_curr->d_mtime; /* no error code checking on purpose */ @@@@ -1287,7 +1286,7 @@@@ readcheck (av) auto char name[PATHSIZE]; auto char local[PATHSIZE]; int sel, res; -#ifdef linux_tstamp +#ifndef broken_utime auto struct utimbuf tstamp; #else auto time_t tstamp[2]; @@@@ -1315,7 +1314,7 @@@@ readcheck (av) if(aflag && atime_sb_valid && ((sb.sb_mode & S_IFMT)==S_IFREG)) { /* reset access time, this distroys the ctime btw. */ -#ifdef linux_tstamp +#ifndef broken_utime tstamp.actime = atime_sb.sb_atime; tstamp.modtime = atime_sb.sb_mtime; VOID utime (name, &tstamp); @@@@ -1807,7 +1806,7 @@@@ inentry (name, asb) reg Link *linkp; reg int ifd; reg int ofd; -#ifdef linux_tstamp +#ifndef broken_utime auto struct utimbuf tstamp; #else auto time_t tstamp[2]; @@@@ -1843,7 +1842,7 @@@@ inentry (name, asb) /* Cannot set utime on symlink (at least not under Linux) */ if((asb->sb_mode & S_IFMT) != S_IFLNK) { -#ifdef linux_tstamp +#ifndef broken_utime tstamp.actime = tstamp.modtime = mflag ? timenow : asb->sb_mtime; VOID utime (name, &tstamp); #else @@@@ -3727,7 +3726,7 @@@@ out (av) auto char name[PATHSIZE]; auto char fsname[PATHSIZE]; auto int compression; -#ifdef linux_tstamp +#ifndef broken_utime auto struct utimbuf tstamp; #else auto time_t tstamp[2]; @@@@ -3905,7 +3904,7 @@@@ out (av) if(aflag && *fsname && ((sb.sb_mode & S_IFMT)==S_IFREG)) { /* reset access time, this distroys the ctime btw. */ -#ifdef linux_tstamp +#ifndef broken_utime tstamp.actime = sb.sb_atime; tstamp.modtime = sb.sb_mtime; VOID utime (fsname, &tstamp); @@@@ -4405,7 +4404,7 @@@@ passitem (from, asb, ifd, dir) { reg int ofd; -#ifdef linux_tstamp +#ifndef broken_utime auto struct utimbuf tstamp; #else auto time_t tstamp[2]; @@@@ -4421,7 +4420,7 @@@@ passitem (from, asb, ifd, dir) continue; if (ofd > 0) passdata (from, ifd, to, ofd); -#ifdef linux_tstamp +#ifndef broken_utime tstamp.actime = tstamp.modtime = mflag ? timenow : asb->sb_mtime; VOID utime (to, &tstamp); #else @@@@ -5103,7 +5102,7 @@@@ xwait (pid, what, compstat2) char *what; int compstat2; { - reg int status; + int status; reg Child *cp; reg Child **acp; auto char why[100]; @@@@ -5120,16 +5119,16 @@@@ xwait (pid, what, compstat2) free ((char *) cp); if (status == 0) return (0); - if (status & 0377) + if (WIFSIGNALED(status)) VOID sprintf (why, "Killed by signal %d%s", - status & 0177, status & 0200 ? " -- core dumped" : ""); + WTERMSIG(status), WCOREDUMP(status) ? " -- core dumped" : ""); else - VOID sprintf (why, "Exit %d", (status >> 8) & 0377); + VOID sprintf (why, "Exit %d", WEXITSTATUS(status)); - if ((!compstat2 && (((status >> 8) & 0377) != 2)) || compstat2) + if ((!compstat2 && (WEXITSTATUS(status) != 2)) || compstat2) return (warn (what, why)); else - return ((status >> 8) & 0377); + return WEXITSTATUS(status); } @ 1.5 log @afio: remove Interix patch @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.4 2020/11/25 14:59:24 ryoon Exp $ d8 1 a8 1 - Build fix for makedev() on Solaris and Interix. @ 1.4 log @afio: Update to 2.5.2 Changelog: Not available. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.3 2015/02/15 14:45:48 ryoon Exp $ d50 1 a50 2 -#ifdef sun +#if defined(sun) || defined(__INTERIX) @ 1.3 log @Update to 2.5.1 Changelog: Version 2.5.1: (This version folds in all non-debian specific bug fixes and feature extensions, with respect to 2.5, that were made in the Debian afio package 2.5-6) (This version does not incorporate fixes for all bug reports or feature requests I got since afio 2.5: some of these remain on the todo list) Fixed a file descriptor handling bug that caused gzip subprocess to keep running when afio -oZ is killed or crashes. Based on bug report and patch by Alain Spineux. Fixed bug that could cause afio -oZ to hang, and/or write faulty data without warning, if a large file was modified while being written. The bug fix prevents hanging, and introduces warnings when faulty data might be written. Based on bug report and patch by Alain Spineux. Improved error reporting in -r operation, based on discussions with Alain Spineux. Note that the error message text is all changed now, to be more verbose and explanatory, so scripts that grep the message text have to be rewritten. Verfication reporting via exit code 0/1 is unchanged, unless the -1 r flag is used. Added -1 r flag to ignore certain warnings when verifying the backup of a live filesystem. Based on discussions with Alain Spineux. Changed 'diff -u0' into 'diff -U 0' in regtest.do script in order to be compatible with command line argument parsing of newer gnu diff versions. Also added sort commands to sort find output because when order changes with respect to order in which files where created, this gives false fail on the hardlink check part of regression test. Based on problem reports by Dallas Legan, Shlomi Levi. Added defines to compile under CYGWIN based on patches by Dirk Eddelbuettel and Jari Aalto. Fixed bug in test script, that triggered when find(1) listed files in a different order than the order in which afio unpacked then into the directory. This bug cause the test script to report failure even though there was no failure. Bug reported by Andre Francois, also by Fred Wright and Bruce Bowler. Fixed bugs in test script, having to do with 'bash -c' and 'source' not being ablre to find the dircomp and dircompare commands, that were reported openSuse 10.3 and 11.4. (I have been unable to reproduce the bugs in my environment, so I hope the fixes work.) Bugs reported and fixes proposed by Fred Wright. Added .ogg as an extensions to the list of those to be excluded from compression by default. Proposed by Dirk Eddelbuettel. Fixed logic in in() to correctly report failure with a warning message when uncompression of a commpressed-archived file fails. Also fixes that, potentially valid archive data would be skipped after this error. Based on bug report by Daniel Webb. In next(), changed msg to variable-length string, to avoid possible buffer overflow. Part of the patch by Erik Schanze (downstream Debian). Extended -0 option to influence -t processing and -w and -W file reading too. The -0 option now toggles when used multiple times. Added -7 option to disable/enable globbing in processing -yYwW filename patterns. Based on feature request and patch by Christian Schrader (via Debian). Note that the semantics of the -7 command line options is sligtly different than it was in the Debian 2.5-3 to 2.5-6 branches: in those branches, -7 was non-toggling so it was not necessary to supply the -7 before any -yYwW options it should affect. Replaced several 0 by NULL to avoid compiler warnings. Based on patch by Erik Schanze (downstream Debian). Replaced sys_errlist usage by strerror(3). This avoids (on some systems) compiler warnings about sys_errlist being obsolete. Left in the old code (with #if 0) to ease porting. Based on patch by Erik Schanze (downstream Debian) and report by Mike Black. Fixed bug in gpg usage examples in script3/, and removed script5/ which had the same bug. Bug reported, and bug fix found, by Marcus Williams. Also added info on this to the manpage. In the earlier scripts, the built-in compression feature of gpg was used, but it turns out that this cannot be reliably used with afio: it should be disabled using the -z 0 option to gpg. The reason why gpg built-in compression cannot be used is as follows. When compression is used, and gpg is run twice on the same input file, it can generate differing outputs with different lengths. This is a problem for afio if the output length is larger than the afio -M option value. If the length is larger than the -M value, then afio will call the 'compression' program twice, once to get the 'compressed' file length and once to get the actual file contents and write them to the archive, and if the lenght is bigger in the second run then the data in the archive will be truncated (and therefore corrupted). Afio does emit an error message when this happens, but it might be overlooked. Some caveats: in testing it looks like if -z 0 is used with gpg, it will never produce different-length files for the same input, but I can not find anything in the documentation of gpg suggesting that this is a guaranteed feature. pgp (the non-GNU implementation) might has a similar different-length behavior causing afio to fail occasionally, but I have found no reports on the web about this. (An alternative would be to use openssl as the encryption engine??) Updated legal information for redistributers about the afio license in afio.c and in the .lsm files. Removed earlier text concluding that by Linux Software Map standards, the correct afio license label was LGPL. Added the text file afio_license_issues_v5.txt. All of this was triggerd by a blog entry writen by Tom Callaway, and informed in part by further discussion in the blog comment section and on some Debian mailing lists. Thanks to Mark Brukhartz for going on record to clarify the intent of the original license text. Increase default size for -M option from 2 to 250 megabytes. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.2 2012/06/23 18:02:15 dholland Exp $ d11 1 a11 1 --- afio.c.orig 2012-02-05 13:25:57.000000000 +0000 d13 1 a13 1 @@@@ -166,7 +166,7 @@@@ static char *ident = "$Header: /u/buhrt/ d22 1 a22 1 @@@@ -202,30 +202,29 @@@@ extern char *sys_errlist[]; d59 1 a59 1 @@@@ -1140,7 +1139,7 @@@@ savedirstamp (char *name, time_t mtime) d68 1 a68 1 @@@@ -1148,7 +1147,7 @@@@ restoredirstamps (void) d70 1 a70 1 while(DirP!=NULL) d74 2 a75 2 tstamp.actime = DirP->d_mtime; tstamp.modtime = DirP->d_mtime; d77 1 a77 1 @@@@ -1239,7 +1238,7 @@@@ readcheck (av) d86 1 a86 1 @@@@ -1267,7 +1266,7 @@@@ readcheck (av) d95 1 a95 1 @@@@ -1758,7 +1757,7 @@@@ inentry (name, asb) d104 1 a104 1 @@@@ -1794,7 +1793,7 @@@@ inentry (name, asb) d113 1 a113 1 @@@@ -3580,7 +3579,7 @@@@ out (av) d122 1 a122 1 @@@@ -3750,7 +3749,7 @@@@ out (av) d131 1 a131 1 @@@@ -4251,7 +4250,7 @@@@ passitem (from, asb, ifd, dir) d140 1 a140 1 @@@@ -4267,7 +4266,7 @@@@ passitem (from, asb, ifd, dir) d149 1 a149 1 @@@@ -4901,7 +4900,7 @@@@ xwait (pid, what, compstat2) d158 1 a158 1 @@@@ -4918,16 +4917,16 @@@@ xwait (pid, what, compstat2) @ 1.2 log @Fix broken Solaris build by not using sys_errlist. Clean up other problems revealed by gcc -Wall: - pass (char *)NULL, not 0, as the last arg of execlp, to avoid crashes on LP64 platforms; - use signal.h, not sys/signal.h; - use utime(3) correctly; - use W* macros and sys/wait.h instead of hardcoding bit patterns. Note in the DESCR that the package has been patched, as the license might be construed to require this. PKGREVISION -> 2. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.1 2005/01/19 17:08:09 tv Exp $ d11 1 a11 1 --- afio.c.orig 2003-12-20 22:16:13.000000000 +0000 d13 8 a20 1 @@@@ -166,52 +166,40 @@@@ static char *ident = "$Header: /u/buhrt/ d22 1 a22 22 #include #include -#define linux_tstamp 1 -/* fix SunOS errno.h not declaring what the manpage says it declares - bogosity. */ - extern int sys_nerr; - extern char *sys_errlist[]; -#endif - -#ifdef hpux - /* Fix that HPUX dosent have sys_nerr or sys_errlist - Added by Daniel Andersson, daniel.andersson@@sto.sema.se - */ -extern int sys_nerr; -extern char *sys_errlist[]; #endif #include #include #include -#include +#include d33 1 a33 1 - a48 3 +/* nothing should need this */ +/*#define broken_utime*/ + d59 1 a59 1 @@@@ -1122,7 +1110,7 @@@@ savedirstamp (char *name, time_t mtime) d68 1 a68 1 @@@@ -1130,7 +1118,7 @@@@ restoredirstamps (void) d77 1 a77 1 @@@@ -1212,7 +1200,7 @@@@ readcheck (av) d86 1 a86 1 @@@@ -1241,7 +1229,7 @@@@ readcheck (av) d95 1 a95 10 @@@@ -1585,7 +1573,7 @@@@ incheckdata (int fd, off_t size, char *n if(compressargs) execvp (compressprog, compress_arg_list); else - execlp (compressprog, compressprog, "-d", "-c", 0); + execlp (compressprog, compressprog, "-d", "-c", (char *)NULL); fprintf (stderr, "Could not uncompress, errno %d\n", errno); exit(1); break; @@@@ -1696,7 +1684,7 @@@@ inentry (name, asb) d104 1 a104 1 @@@@ -1729,7 +1717,7 @@@@ inentry (name, asb) d113 1 a113 19 @@@@ -3004,7 +2992,7 @@@@ opencontrolscript (char *name) VOID dup (pfd[0]); VOID close (pfd[0]); - execlp (controlscript, controlscript, label, 0); + execlp (controlscript, controlscript, label, (char *)NULL); warnarch("Problems running control script:",(off_t)0); warn(controlscript,syserr()); @@@@ -3266,7 +3254,7 @@@@ openotty (name, asb, linkp, ispass, dozf if(compressargs) execvp (compressprog, compress_arg_list); else - execlp (compressprog, compressprog, "-d", "-c", 0); + execlp (compressprog, compressprog, "-d", "-c", (char *)NULL); fprintf (stderr, "Could not uncompress, errno %d\n", errno); exit (1); } @@@@ -3493,7 +3481,7 @@@@ out (av) d122 1 a122 1 @@@@ -3638,7 +3626,7 @@@@ out (av) d131 1 a131 1 @@@@ -4133,7 +4121,7 @@@@ passitem (from, asb, ifd, dir) d140 1 a140 1 @@@@ -4149,7 +4137,7 @@@@ passitem (from, asb, ifd, dir) d149 1 a149 15 @@@@ -4354,12 +4342,7 @@@@ fswrite (fd, buf, len) STATIC char * syserr () { - static char msg[40]; - - if (errno > 0 && errno < sys_nerr) - return ((char *) sys_errlist[errno]); - VOID sprintf (msg, "Unknown error (errno %d)", errno); - return (msg); + return strerror(errno); } /* @@@@ -4765,7 +4748,7 @@@@ xwait (pid, what, compstat2) d158 1 a158 1 @@@@ -4782,16 +4765,16 @@@@ xwait (pid, what, compstat2) @ 1.1 log @Build fix for Interix: strerror() is your friend. @ text @d1 1 a1 1 $NetBSD$ d3 9 a11 1 --- afio.c.orig 2005-01-19 11:49:18.000000000 -0500 d13 48 a60 1 @@@@ -210,8 +210,11 @@@@ extern char *sys_errlist[]; d63 3 d76 118 a193 1 @@@@ -4354,12 +4357,16 @@@@ fswrite (fd, buf, len) d197 6 a202 1 +#ifdef __INTERIX d204 1 a204 2 +#else static char msg[40]; d206 29 a234 5 if (errno > 0 && errno < sys_nerr) return ((char *) sys_errlist[errno]); VOID sprintf (msg, "Unknown error (errno %d)", errno); return (msg); +#endif d237 1 a237 1 /* @