1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-15 15:57:13 +00:00

More linux related fixups for string.h.

Fix some type warnings.

	modified:   ../src/dsk.c
	modified:   ../src/fvar.c
	modified:   ../src/ldsout.c
	modified:   ../src/main.c
	modified:   ../src/timer.c
This commit is contained in:
Nick Briggs 2018-03-27 10:39:23 -07:00
parent 8e99402729
commit 69796e34d7
5 changed files with 15 additions and 4 deletions

View File

@ -15,7 +15,7 @@ static char *id = "$Id: dsk.c,v 1.4 2001/12/24 01:09:01 sybalsky Exp $ Copyright
#include "version.h"
#if defined(MACOSX) || defined(FREEBSD)
#if defined(MACOSX) || defined(FREEBSD) || defined(LINUX)
#include <string.h>
#endif

View File

@ -415,7 +415,7 @@ LispPTR N_OP_fvar_(register LispPTR tos, register int n) {
: (swapx((int)(x) + NEWATOM_VALUE_OFFSET)))
#endif /* BIGVM */
#define STK_HI_RET(x) ((int)(x) << 16) | 1 | ((unsigned int)(x) >> 16)
#define STK_HI_RET(x) ((unsigned int)(x) << 16) | 1 | ((unsigned int)(x) >> 16)
#endif /* BIGATOMS */

View File

@ -59,11 +59,15 @@ extern int errno;
int Storage_expanded; /* T or NIL */
/* RISCOS, OSF1 and MACOSX don't have valloc, and malloc works OK there. */
#if defined(LINUX)
/* has valloc() */
#else
#if defined(SYSVONLY) || defined(OSF1) || defined(MACOSX)
#define valloc malloc
#else
char *valloc();
#endif /* SYSVONLY || OSF1 || MACOSX */
#endif /* not LINUX */
/************************************************************************/
/* */

View File

@ -38,6 +38,9 @@ static char *id = "$Id: main.c,v 1.4 2001/12/26 22:17:03 sybalsky Exp $ Copyrigh
#include <string.h>
#include <i32.h>
#endif /* DOS */
#ifdef LINUX
#include <time.h>
#endif
#ifndef NOETHER
#ifndef USE_DLPI
@ -796,7 +799,7 @@ void print_info_lines() {
#elif (RELEASE == 351)
printf("Emulator for Medley release 3.51\n");
#endif /* RELEASE */
#if defined(MACOSX) || defined(FREEBSD)
#if defined(MACOSX) || defined(FREEBSD) || defined(LINUX)
printf("Creation date: %s", ctime((const time_t *)&MDate));
#else
printf("Creation date: %s", ctime(&MDate));

View File

@ -77,6 +77,10 @@ extern int ether_fd;
#endif
#ifdef LINUX
#include <stropts.h>
#include <sys/ioctl.h>
#define _BSD_SOURCE
#include <signal.h>
#include <sys/times.h>
#endif
@ -421,7 +425,7 @@ LispPTR N_OP_rclk(LispPTR tos)
struct timeval timev;
gettimeofday(&timev, NULL);
usec = (timev.tv_sec * 1000000) + timev.tv_usec;
usec = (timev.tv_sec * 1000000UL) + timev.tv_usec;
#endif /* USETIMEFN */
*((unsigned int *)(Addr68k_from_LADDR(tos))) = usec;
return (tos);