1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-02-01 22:32:40 +00:00

Move SYSVONLY define from version.h to the individual makefiles for Linux

Add makefile for Linux on x86_64 platforms
Remove include <stropts.h> for Linux as modern systems have dropped this
Adjust code to account for fcntl() vs ioctl() for generating signals on X I/O
Adjust includes for time related include files for modern Linux systems

	modified:   bin/makefile-linux.386-x
	new file:   bin/makefile-linux.x86_64-x
	modified:   inc/version.h
	modified:   src/mkvdate.c
	modified:   src/timer.c
This commit is contained in:
Nick Briggs
2020-08-03 20:19:02 -07:00
parent 79ad101cc1
commit 9821329ec0
5 changed files with 115 additions and 5 deletions

View File

@@ -33,7 +33,7 @@ static char *id = "$Id: mkvdate.c,v 1.5 2001/12/26 22:17:03 sybalsky Exp $ Copyr
/* */
/************************************************************************/
#ifdef OSF1
#if defined(OSF1) || defined(LINUX)
#include "time.h"
#endif

View File

@@ -50,7 +50,11 @@ unsigned long tick_count = 0; /* approx 18 ticks per sec */
#include <sys/types.h>
#include <stdio.h>
#include <signal.h>
#ifdef LINUX
#include <linux/fcntl.h>
#else
#include <fcntl.h>
#endif
#ifdef ISC
#include <sys/bsdtypes.h>
@@ -77,7 +81,6 @@ extern int ether_fd;
#endif
#ifdef LINUX
#include <stropts.h>
#include <sys/ioctl.h>
#define _BSD_SOURCE
#include <signal.h>
@@ -366,7 +369,7 @@ void subr_settime(LispPTR args[])
dosday.dayofweek = uxtime.tm_wday;
_dos_setdate(&dosday);
#elif defined(SYSVONLY) && !defined(MACOSX)
#elif defined(SYSVONLY) && !defined(MACOSX) && !defined(LINUX)
time_t newTime = (time_t)(*((int *)Addr68k_from_LADDR(args[0])) - UNIX_ALTO_TIME_DIFF);
stime(&newTime);
#else
@@ -686,7 +689,11 @@ void int_io_init() {
#ifndef DOS
SIGERRCHK(sigset(SIGIO, getsignaldata), "sigset io");
#ifdef XWINDOW
#ifdef LINUX
if (fcntl(ConnectionNumber(currentdsp->display_id), F_SETSIG, 0) < 0)
#else
if (ioctl(ConnectionNumber(currentdsp->display_id), I_SETSIG, S_INPUT) < 0)
#endif
perror("ioctl on X fd - SETSIG");
#endif /* XWINDOW */
#ifdef USE_DLPI