[Mit-cadr-cvs] r341 - trunk/emulator/chaos

ggilley at common-lisp.net ggilley at common-lisp.net
Fri Nov 23 05:54:24 UTC 2012


Author: ggilley
Date: Thu Nov 22 21:54:23 2012
New Revision: 341

Log:
sigh, make chaos work on netbsd again

Modified:
   trunk/emulator/chaos/FILE.c

Modified: trunk/emulator/chaos/FILE.c
==============================================================================
--- trunk/emulator/chaos/FILE.c	Thu Nov 22 20:50:44 2012	(r340)
+++ trunk/emulator/chaos/FILE.c	Thu Nov 22 21:54:23 2012	(r341)
@@ -2566,14 +2566,22 @@
 #endif
 		if (protocol > 0)
 			(void)sprintf(response,
+#if defined(linux)
 				"%02d/%02d/%02d %02d:%02d:%02d %ld%c%s%c",
+#else
+				"%02d/%02d/%02d %02d:%02d:%02d %lld%c%s%c",
+#endif
 				tm->tm_mon+1, tm->tm_mday, tm->tm_year,
 				tm->tm_hour, tm->tm_min, tm->tm_sec,
 				sbuf.st_size, CHNL,
 				x->x_realname, CHNL);
 		else
 			(void)sprintf(response,
+#if defined(linux)
 				"%d %02d/%02d/%02d %02d:%02d:%02d %ld%c%s%c",
+#else
+				"%d %02d/%02d/%02d %02d:%02d:%02d %lld%c%s%c",
+#endif
 				-1, tm->tm_mon+1, tm->tm_mday,
 				tm->tm_year, tm->tm_hour, tm->tm_min,
 				tm->tm_sec, sbuf.st_size, CHNL,
@@ -3567,7 +3575,11 @@
 static char *
 xgetbsize(struct stat *s, char *cp)
 {
+#if defined(linux)
 	(void)sprintf(cp, "%ld", (s->st_size + FSBSIZE - 1) / FSBSIZE);
+#else
+	(void)sprintf(cp, "%lld", (s->st_size + FSBSIZE - 1) / FSBSIZE);
+#endif
 
 	while (*cp)
 		cp++;
@@ -3588,7 +3600,11 @@
 register struct stat *s;
 register char *cp;	
 {
+#if defined(linux)
 	(void)sprintf(cp, "%ld", s->st_size);
+#else
+	(void)sprintf(cp, "%lld", s->st_size);
+#endif
 	while (*cp)
 		cp++;
 	return cp;




More information about the mit-cadr-cvs mailing list