X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fport.c;h=f07c8dcd452347b59479c0bb7c596be8ce7b91d1;hb=86d2ec4f33295b8acb63773762c6f47f4238315a;hp=2f3c28240aa6bc440688267497372446b0fea0fa;hpb=02a3a65bdd04b3ddf4fa5a84efdd1f0db4acdb5b;p=chaz%2Ftar diff --git a/src/port.c b/src/port.c index 2f3c282..f07c8dc 100644 --- a/src/port.c +++ b/src/port.c @@ -46,16 +46,23 @@ extern long baserec; #ifdef __MSDOS__ char TTY_NAME[] = "con"; +#define MKNOD_MISSING +#define UTILS_MISSING +#define VALLOC_MISSING + #else /* not __MSDOS__ */ char TTY_NAME[] ="/dev/tty"; +#define UTILS_MISSING +#define CK_PIPE_MISSING + #endif /* not __MSDOS__ */ /* End of system-dependent #ifdefs */ -#ifndef HAVE_VALLOC +#ifdef VALLOC_MISSING /* * valloc() does a malloc() on a page boundary. On some systems, * this can make large block I/O more efficient. @@ -68,7 +75,7 @@ valloc (size) } #endif -#ifndef HAVE_MKDIR +#ifdef MKDIR_MISSING /* * Written by Robert Rother, Mariah Corporation, August 1985. * @@ -166,7 +173,7 @@ rmdir(dpath) } #endif -#ifndef HAVE_RENAME +#ifdef RENAME_MISSING /* Rename file FROM to file TO. Return 0 if successful, -1 if not. */ @@ -188,7 +195,7 @@ rename (from, to) } #endif -#ifndef HAVE_BZERO +#ifdef BZERO_MISSING /* Minix has bcopy but not bzero, and no memset. Thanks, Andy. */ void bzero (s1, n) @@ -450,7 +457,7 @@ int flags, mode; } #endif -#ifndef HAVE_MKNOD +#ifdef MKNOD_MISSING #ifdef __MSDOS__ typedef int dev_t; #endif @@ -516,7 +523,7 @@ geteuid() { return 0; } -#endif /* !HAVE_MKNOD */ +#endif /* MKNOD_MISSING */ #ifdef __TURBOC__ #include @@ -567,6 +574,7 @@ utime (char *filename, struct utimbuf *utb) } #endif +#ifdef UTILS_MISSING /* Stash argv[0] here so panic will know what the program is called */ char *myname = 0; @@ -917,7 +925,9 @@ char *string; *to_there++='\0'; return ret; } +#endif +#ifdef CK_PIPE_MISSING void ck_pipe(pipes) int *pipes; { @@ -927,8 +937,10 @@ int *pipes; } } +#endif + +#ifdef STRSTR_MISSING -#ifndef HAVE_STRSTR /* * strstr - find first occurrence of wanted in s */ @@ -958,7 +970,7 @@ char *wanted; } #endif -#infdef HAVE_FTRUNCATE +#ifdef FTRUNCATE_MISSING #ifdef F_CHSIZE int @@ -1015,7 +1027,7 @@ off_t length; extern FILE *msg_file; -#if defined (HAVE_VPRINTF) && __STDC__ +#if !defined (VPRINTF_MISSING) && defined (__STDC__) #include void @@ -1052,9 +1064,9 @@ msg_perror(char *str,...) perror(" "); fflush(stderr); } -#endif /* HAVE_VPRINTF and __STDC__ */ +#endif /* not VPRINTF_MISSING or __STDC__ */ -#if defined(HAVE_VPRINTF) && !__STDC__ +#if !defined(VPRINTF_MISSING) && !defined(__STDC__) #include void msg(str,va_alist) @@ -1094,9 +1106,9 @@ va_dcl perror(" "); fflush(stderr); } -#endif /* HAVE_VPRINTF and not __STDC__ */ +#endif /* not VPRINTF_MISSING and not __STDC__ */ -#if !defined(HAVE_VPRINTF) && defined(HAVE_DOPRNT) +#if defined(VPRINTF_MISSING) && !defined(DOPRNT_MISSING) void msg(str,args) char *str; @@ -1127,9 +1139,9 @@ char *str; perror(" "); fflush(stderr); } -#endif /* !HAVE_VPRINTF and HAVE_DOPRNT */ +#endif /* VPRINTF_MISSING and not DOPRNT_MISSING */ -#if !defined(HAVE_VPRINTF) && !defined(HAVE_DOPRNT) +#if defined(VPRINTF_MISSING) && defined(DOPRNT_MISSING) void msg(str,a1,a2,a3,a4,a5,a6) char *str; { @@ -1158,4 +1170,4 @@ char *str; errno=save_e; perror(" "); } -#endif /* !HAVE_VPRINTF and !HAVE_DOPRNT */ +#endif /* VPRINTF_MISSING and DOPRNT_MISSING */