Skip to content

Commit 11cdf8b

Browse files
committed
Archival checkin of partially building minix68k plat. I don't think
porting the old minixST code is going to work here, and it needs a whole new set of headers.
1 parent 23cd6e3 commit 11cdf8b

File tree

34 files changed

+331
-236
lines changed

34 files changed

+331
-236
lines changed

lang/cem/libcc.ansi/core/misc/raise.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <stdlib.h>
88
#include <sys/types.h>
99
#include <signal.h>
10+
#include <unistd.h>
1011

1112
#if ACKCONF_WANT_EMULATED_RAISE
1213

lang/cem/libcc.ansi/headers/ack/config.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
#define ACKCONF_WANT_STANDARD_SIGNALS 1
2424
#endif
2525

26+
#ifndef ACKCONF_WANT_SYS_ERRNO_H
27+
#define ACKCONF_WANT_SYS_ERRNO_H 0
28+
#endif
29+
2630
#ifndef ACKCONF_WANT_TERMIOS
2731
/* Don't compile termios-using functions unless the plat explicitly asks for it. */
2832
#define ACKCONF_WANT_TERMIOS 0

lang/cem/libcc.ansi/headers/errno.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
#ifndef _ERRNO_H
77
#define _ERRNO_H
88

9+
#if ACKCONF_WANT_SYS_ERRNO_H
10+
#include <sys/errno.h>
11+
#else
12+
913
/* These values are defined by the ANSI standard. */
1014

1115
#define EDOM 33
@@ -51,3 +55,5 @@
5155
extern int errno;
5256

5357
#endif
58+
59+
#endif

lang/cem/libcc.ansi/sys/misc/sleep.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ alfun(int sig)
1818
longjmp(setjmpbuf, 1);
1919
} /* used with sleep() below */
2020

21-
void sleep(int n)
21+
unsigned int sleep(int n)
2222
{
2323
/* sleep(n) pauses for 'n' seconds by scheduling an alarm interrupt. */
2424
unsigned oldalarm = 0;
@@ -30,7 +30,7 @@ void sleep(int n)
3030
{
3131
signal(SIGALRM, oldsig);
3232
alarm(oldalarm);
33-
return;
33+
return 0;
3434
}
3535
oldalarm = alarm(5000); /* Who cares how long, as long
3636
* as it is long enough

lib/minix/include/string.h

Lines changed: 0 additions & 57 deletions
This file was deleted.

lib/minix/include/sys/errno.h

Lines changed: 0 additions & 96 deletions
This file was deleted.

plat/minix/include/build.lua

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
include("plat/build.lua")
2+
3+
headermap = {}
4+
packagemap = {}
5+
6+
local function addheader(h)
7+
headermap[h] = "plat/minix/include/"..h
8+
packagemap["$(PLATIND)/minix/include/"..h] = "plat/minix/include/"..h
9+
end
10+
11+
addheader("unistd.h")
12+
addheader("ansi.h")
13+
addheader("minix/callnr.h")
14+
addheader("minix/const.h")
15+
addheader("minix/config.h")
16+
addheader("minix/type.h")
17+
addheader("minix/com.h")
18+
addheader("utime.h")
19+
addheader("sgtty.h")
20+
addheader("sys/types.h")
21+
addheader("sys/errno.h")
22+
addheader("sys/times.h")
23+
addheader("sys/stat.h")
24+
addheader("sys/wait.h")
25+
addheader("signal.h")
26+
addheader("limits.h")
27+
addheader("fcntl.h")
28+
addheader("time.h")
29+
addheader("lib.h")
30+
31+
acklibrary {
32+
name = "headers",
33+
hdrs = headermap
34+
}
35+
36+
installable {
37+
name = "pkg",
38+
map = packagemap
39+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
#ifndef _FCNTL_H
1111
#define _FCNTL_H
1212

13+
#include <sys/types.h>
14+
1315
/* These values are used for cmd in fcntl(). POSIX Table 6-1. */
1416
#define F_DUPFD 0 /* duplicate file descriptor */
1517
#define F_GETFD 1 /* get file descriptor flags */

0 commit comments

Comments
 (0)