You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(56) |
Sep
(40) |
Oct
(30) |
Nov
(144) |
Dec
(23) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(41) |
Feb
(29) |
Mar
(31) |
Apr
(39) |
May
(193) |
Jun
(45) |
Jul
(19) |
Aug
(3) |
Sep
(23) |
Oct
(83) |
Nov
(92) |
Dec
(123) |
| 2007 |
Jan
(90) |
Feb
(267) |
Mar
(120) |
Apr
(51) |
May
(40) |
Jun
(121) |
Jul
(109) |
Aug
(173) |
Sep
(77) |
Oct
(52) |
Nov
(121) |
Dec
(62) |
| 2008 |
Jan
(76) |
Feb
(53) |
Mar
(98) |
Apr
(87) |
May
(26) |
Jun
(27) |
Jul
(23) |
Aug
(136) |
Sep
(79) |
Oct
(68) |
Nov
(29) |
Dec
(14) |
| 2009 |
Jan
(7) |
Feb
(2) |
Mar
(11) |
Apr
(75) |
May
(1) |
Jun
(95) |
Jul
(19) |
Aug
(4) |
Sep
(8) |
Oct
(93) |
Nov
(43) |
Dec
(21) |
| 2010 |
Jan
(20) |
Feb
(23) |
Mar
(18) |
Apr
(6) |
May
(20) |
Jun
(23) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
(2) |
Feb
(6) |
Mar
(15) |
Apr
(5) |
May
(9) |
Jun
(14) |
Jul
(9) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
(2) |
Jun
(17) |
Jul
(37) |
Aug
|
Sep
(1) |
Oct
(6) |
Nov
|
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
(5) |
Apr
(2) |
May
(7) |
Jun
(11) |
Jul
(8) |
Aug
|
Sep
(1) |
Oct
(2) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
|
May
(1) |
Jun
(1) |
Jul
(7) |
Aug
(2) |
Sep
|
Oct
(5) |
Nov
(2) |
Dec
(4) |
| 2015 |
Jan
|
Feb
(2) |
Mar
(2) |
Apr
|
May
|
Jun
(9) |
Jul
(1) |
Aug
|
Sep
|
Oct
(4) |
Nov
(1) |
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
(1) |
Feb
(3) |
Mar
(3) |
Apr
(7) |
May
(2) |
Jun
(2) |
Jul
(5) |
Aug
(1) |
Sep
(2) |
Oct
(17) |
Nov
(4) |
Dec
(7) |
| 2018 |
Jan
(5) |
Feb
(14) |
Mar
(2) |
Apr
(5) |
May
(2) |
Jun
(5) |
Jul
|
Aug
(2) |
Sep
|
Oct
(3) |
Nov
(5) |
Dec
|
| 2019 |
Jan
(4) |
Feb
(2) |
Mar
(3) |
Apr
(1) |
May
(8) |
Jun
(14) |
Jul
(2) |
Aug
|
Sep
(2) |
Oct
(2) |
Nov
(15) |
Dec
(2) |
| 2020 |
Jan
(10) |
Feb
(3) |
Mar
(1) |
Apr
|
May
(9) |
Jun
(4) |
Jul
(16) |
Aug
(10) |
Sep
(4) |
Oct
(3) |
Nov
|
Dec
|
| 2021 |
Jan
(11) |
Feb
(2) |
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(5) |
Sep
|
Oct
(6) |
Nov
(4) |
Dec
(4) |
| 2022 |
Jan
(4) |
Feb
(2) |
Mar
(2) |
Apr
|
May
(6) |
Jun
(3) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2023 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(5) |
Jun
(1) |
Jul
(4) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
(13) |
Dec
|
| 2024 |
Jan
(1) |
Feb
|
Mar
(5) |
Apr
|
May
(10) |
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
(1) |
Dec
(14) |
| 2025 |
Jan
(3) |
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
(3) |
Jul
|
Aug
|
Sep
(2) |
Oct
(3) |
Nov
|
Dec
|
|
From: Matthew F. <fl...@ml...> - 2006-05-15 13:45:05
|
Fixed script for exnHistory regressions
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/bin/regression
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/bin/regression
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bin/regression 2006-05-14 05:35:04 UTC (rev 4537)
+++ mlton/branches/on-20050822-x86_64-branch/bin/regression 2006-05-15 20:45:05 UTC (rev 4538)
@@ -18,6 +18,7 @@
short='false'
skipTo=''
declare -a flags
+declare -a extraFlags
while [ "$#" -gt 0 ]; do
case "$1" in
-cross)
@@ -147,13 +148,12 @@
;;
esac
echo "testing $f"
+ unset extraFlags
case "$f" in
exnHistory*)
- extraFlags="-const 'Exn.keepHistory true'"
+ extraFlags[${#extraFlags[@]}]="-const"
+ extraFlags[${#extraFlags[@]}]="Exn.keepHistory true"
;;
- *)
- extraFlags=""
- ;;
esac
if (! $runOnly); then
mlb="$f.mlb"
@@ -167,7 +167,7 @@
\"redundantMatch ignore\"
in $f.sml
end" >"$mlb"
- "$mlton" "${flags[@]}" $extraFlags -output "$f" "$mlb"
+ "$mlton" "${flags[@]}" "${extraFlags[@]}" -output "$f" "$mlb"
if [ "$?" -ne '0' ] || ((! $cross) && [ ! -x "$f" ]); then
compFail "$f"
fi
@@ -214,7 +214,7 @@
/c/cygwin/bin/sed 's/$/\r/' <"$f.ok" >"$compare"
fi
if ! diff "$compare" "$tmp"; then
- echo "difference with ${flags[*]}"
+ echo "difference with ${flags[*]} ${extraFlags[*]}"
fi
fi
fi
|
|
From: Ville L. <vi...@ml...> - 2006-05-13 22:35:08
|
AIX doesn't use GNU binutils, so GNU options for `strip' don't work. ---------------------------------------------------------------------- U mlton/trunk/Makefile ---------------------------------------------------------------------- Modified: mlton/trunk/Makefile =================================================================== --- mlton/trunk/Makefile 2006-05-13 21:26:09 UTC (rev 4536) +++ mlton/trunk/Makefile 2006-05-14 05:35:04 UTC (rev 4537) @@ -1,4 +1,4 @@ -## Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh +## Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh # Jagannathan, and Stephen Weeks. # Copyright (C) 1997-2000 NEC Research Institute. # @@ -411,7 +411,7 @@ cd $(TMAN) && $(GZIP) $(MAN_PAGES); \ fi case "$(TARGET_OS)" in \ - cygwin|darwin|solaris) \ + aix|cygwin|darwin|solaris) \ ;; \ *) \ for f in $(TLIB)/$(AOUT)$(EXE) $(TBIN)/$(LEX)$(EXE) \ |
|
From: Ville L. <vi...@ml...> - 2006-05-13 15:07:50
|
Ported to PowerPC/AIX.
Fixed a bug in the runtime for the cases where nonblocking IO with
sockets was implemented using MSG_DONTWAIT. This flag does not exist
on AIX, Cygwin, HPUX, and MinGW and was previously just ignored. Now
the runtime simulates the flag for these platforms (except MinGW, yet,
where it's still ignored).
Some cosmetics.
----------------------------------------------------------------------
U mlton/trunk/basis-library/misc/primitive.sml
U mlton/trunk/basis-library/mlton/platform.sig
U mlton/trunk/basis-library/mlton/platform.sml
U mlton/trunk/basis-library/sml-nj/sml-nj.sml
U mlton/trunk/bin/mlton-script
U mlton/trunk/bin/platform
U mlton/trunk/bin/upgrade-basis
U mlton/trunk/doc/changelog
U mlton/trunk/lib/mlton-stubs/mlton.sml
U mlton/trunk/lib/mlton-stubs/platform.sig
U mlton/trunk/runtime/basis/Net/Socket/Socket.c
A mlton/trunk/runtime/platform/aix.c
A mlton/trunk/runtime/platform/aix.h
U mlton/trunk/runtime/platform/cygwin.c
U mlton/trunk/runtime/platform/cygwin.h
U mlton/trunk/runtime/platform/darwin.h
U mlton/trunk/runtime/platform/freebsd.h
U mlton/trunk/runtime/platform/hpux.c
U mlton/trunk/runtime/platform/hpux.h
U mlton/trunk/runtime/platform/linux.h
U mlton/trunk/runtime/platform/mingw.h
U mlton/trunk/runtime/platform/netbsd.h
U mlton/trunk/runtime/platform/openbsd.h
A mlton/trunk/runtime/platform/recv.nonblock.c
U mlton/trunk/runtime/platform/solaris.h
U mlton/trunk/runtime/platform.h
U mlton/trunk/runtime/types.h
----------------------------------------------------------------------
Modified: mlton/trunk/basis-library/misc/primitive.sml
===================================================================
--- mlton/trunk/basis-library/misc/primitive.sml 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/basis-library/misc/primitive.sml 2006-05-13 21:26:09 UTC (rev 4536)
@@ -964,7 +964,8 @@
structure OS =
struct
datatype t =
- Cygwin
+ AIX
+ | Cygwin
| Darwin
| FreeBSD
| HPUX
@@ -976,7 +977,8 @@
val host: t =
case _const "MLton_Platform_OS_host": string; of
- "cygwin" => Cygwin
+ "aix" => AIX
+ | "cygwin" => Cygwin
| "darwin" => Darwin
| "freebsd" => FreeBSD
| "hpux" => HPUX
Modified: mlton/trunk/basis-library/mlton/platform.sig
===================================================================
--- mlton/trunk/basis-library/mlton/platform.sig 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/basis-library/mlton/platform.sig 2006-05-13 21:26:09 UTC (rev 4536)
@@ -20,7 +20,8 @@
structure OS:
sig
datatype t =
- Cygwin
+ AIX
+ | Cygwin
| Darwin
| FreeBSD
| HPUX
Modified: mlton/trunk/basis-library/mlton/platform.sml
===================================================================
--- mlton/trunk/basis-library/mlton/platform.sml 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/basis-library/mlton/platform.sml 2006-05-13 21:26:09 UTC (rev 4536)
@@ -43,7 +43,8 @@
struct
open OS
- val all = [(Cygwin, "Cygwin"),
+ val all = [(AIX, "AIX"),
+ (Cygwin, "Cygwin"),
(Darwin, "Darwin"),
(FreeBSD, "FreeBSD"),
(HPUX, "HPUX"),
Modified: mlton/trunk/basis-library/sml-nj/sml-nj.sml
===================================================================
--- mlton/trunk/basis-library/sml-nj/sml-nj.sml 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/basis-library/sml-nj/sml-nj.sml 2006-05-13 21:26:09 UTC (rev 4536)
@@ -30,7 +30,8 @@
open MLton.Platform.OS
in
case host of
- Cygwin => UNIX
+ AIX => UNIX
+ | Cygwin => UNIX
| Darwin => MACOS
| FreeBSD => UNIX
| HPUX => UNIX
Modified: mlton/trunk/bin/mlton-script
===================================================================
--- mlton/trunk/bin/mlton-script 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/bin/mlton-script 2006-05-13 21:26:09 UTC (rev 4536)
@@ -96,10 +96,12 @@
-malign-functions=5
-malign-jumps=2
-malign-loops=2' \
+ -target-link-opt aix '-lgmp' \
-target-link-opt amd64 '-m32' \
-target-link-opt cygwin '-lgmp' \
-target-link-opt darwin "$darwinLinkOpts -lgmp" \
-target-link-opt freebsd '-L/usr/local/lib/ -lgmp' \
+ -target-link-opt hpux '-lgmp' \
-target-link-opt linux '-lgmp' \
-target-link-opt mingw \
'-lgmp -lws2_32 -lkernel32 -lpsapi -lnetapi32' \
Modified: mlton/trunk/bin/platform
===================================================================
--- mlton/trunk/bin/platform 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/bin/platform 2006-05-13 21:26:09 UTC (rev 4536)
@@ -24,8 +24,13 @@
esac
uname=`uname`
+arch_flag=-m
case "$uname" in
+AIX)
+ HOST_OS='aix'
+ arch_flag=-p
+;;
CYGWIN*)
HOST_OS='cygwin'
;;
@@ -58,7 +63,7 @@
;;
esac
-arch=`uname -m`
+arch=`uname $arch_flag`
case "$arch" in
alpha*)
@@ -90,6 +95,9 @@
# big-endian and little-endian detect via headers
HOST_ARCH=mips
;;
+powerpc)
+ HOST_ARCH=powerpc
+;;
ppc*)
HOST_ARCH=powerpc
;;
Modified: mlton/trunk/bin/upgrade-basis
===================================================================
--- mlton/trunk/bin/upgrade-basis 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/bin/upgrade-basis 2006-05-13 21:26:09 UTC (rev 4536)
@@ -135,6 +135,9 @@
esac
case "$OS" in
+aix)
+ os='AIX'
+;;
cygwin)
os='Cygwin'
;;
@@ -209,10 +212,11 @@
structure OS =
struct
- datatype t = Cygwin | Darwin | FreeBSD | HPUX | Linux | MinGW
- | NetBSD | OpenBSD | Solaris
+ datatype t = AIX | Cygwin | Darwin | FreeBSD | HPUX | Linux
+ | MinGW | NetBSD | OpenBSD | Solaris
- val all = [(Cygwin, "Cygwin"),
+ val all = [(AIX, "AIX"),
+ (Cygwin, "Cygwin"),
(Darwin, "Darwin"),
(FreeBSD, "FreeBSD"),
(HPUX, "HPUX"),
Modified: mlton/trunk/doc/changelog
===================================================================
--- mlton/trunk/doc/changelog 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/doc/changelog 2006-05-13 21:26:09 UTC (rev 4536)
@@ -1,5 +1,13 @@
Here are the changes since version 20051202.
+* 2006-05-11
+ - Ported to PowerPC-AIX.
+ - Fixed a bug in the runtime for the cases where nonblocking IO with
+ sockets was implemented using MSG_DONTWAIT. This flag does not
+ exist on AIX, Cygwin, HPUX, and MinGW and was previously just
+ ignored. Now the runtime simulates the flag for these platforms
+ (except MinGW, yet, where it's still ignored).
+
* 2006-04-25
- Ported to HPPA-HPUX.
- Fixed PackReal{,32,64}{Big,Little} to follow the Basis Library
Modified: mlton/trunk/lib/mlton-stubs/mlton.sml
===================================================================
--- mlton/trunk/lib/mlton-stubs/mlton.sml 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/lib/mlton-stubs/mlton.sml 2006-05-13 21:26:09 UTC (rev 4536)
@@ -210,7 +210,8 @@
structure OS =
struct
datatype t =
- Cygwin
+ AIX
+ | Cygwin
| Darwin
| FreeBSD
| HPUX
@@ -222,7 +223,8 @@
val host: t = Linux
- val all = [(Cygwin, "Cygwin"),
+ val all = [(AIX, "AIX"),
+ (Cygwin, "Cygwin"),
(Darwin, "Darwin"),
(FreeBSD, "FreeBSD"),
(HPUX, "HPUX"),
Modified: mlton/trunk/lib/mlton-stubs/platform.sig
===================================================================
--- mlton/trunk/lib/mlton-stubs/platform.sig 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/lib/mlton-stubs/platform.sig 2006-05-13 21:26:09 UTC (rev 4536)
@@ -20,7 +20,8 @@
structure OS:
sig
datatype t =
- Cygwin
+ AIX
+ | Cygwin
| Darwin
| FreeBSD
| HPUX
Modified: mlton/trunk/runtime/basis/Net/Socket/Socket.c
===================================================================
--- mlton/trunk/runtime/basis/Net/Socket/Socket.c 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/runtime/basis/Net/Socket/Socket.c 2006-05-13 21:26:09 UTC (rev 4536)
@@ -30,13 +30,13 @@
Int Socket_recv (Int s, Char *msg, Int start, Int len, Word flags) {
MLton_initSockets ();
- return recv (s, (void*)((char *)msg + start), (size_t)len, flags);
+ return mlton_recv (s, (void*)((char *)msg + start), (size_t)len, flags);
}
Int Socket_recvFrom (Int s, Char *msg, Int start, Int len, Word flags,
Char* addr, Int *addrlen) {
MLton_initSockets ();
- return recvfrom (s, (void*)((char *)msg + start), (size_t)len, flags,
+ return mlton_recvfrom (s, (void*)((char *)msg + start), (size_t)len, flags,
(struct sockaddr*)addr, (socklen_t*)addrlen);
}
Added: mlton/trunk/runtime/platform/aix.c
===================================================================
--- mlton/trunk/runtime/platform/aix.c 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/runtime/platform/aix.c 2006-05-13 21:26:09 UTC (rev 4536)
@@ -0,0 +1,170 @@
+
+/* On AIX 5.1 (and older) there is no fegetround() or fesetround().
+ Instead, float.h defines fp_read_rnd() and fp_swap_rnd() with
+ equivalent functionality. GCC has its own version of float.h, so
+ we include the system header directly before everything else. */
+#include "/usr/include/float.h"
+#include "platform.h"
+
+#include <sys/mman.h>
+#include <sys/procfs.h>
+#include <sys/vminfo.h>
+
+#include "getrusage.c"
+#include "mkdir2.c"
+#include "recv.nonblock.c"
+#include "ssmmap.c"
+#include "use-mmap.c"
+
+int fegetround(void)
+{
+ return fp_read_rnd ();
+}
+
+void fesetround(int mode)
+{
+ fp_swap_rnd (mode);
+}
+
+int fpclassify64(double d)
+{
+ int c;
+ c = class (d);
+ switch (c) {
+ case FP_PLUS_NORM:
+ case FP_MINUS_NORM:
+ return FP_NORMAL;
+ case FP_PLUS_ZERO:
+ case FP_MINUS_ZERO:
+ return FP_ZERO;
+ case FP_PLUS_INF:
+ case FP_MINUS_INF:
+ return FP_INFINITE;
+ case FP_PLUS_DENORM:
+ case FP_MINUS_DENORM:
+ return FP_SUBNORMAL;
+ case FP_SNAN:
+ case FP_QNAN:
+ return FP_NAN;
+ default:
+ die ("Real_class error: invalid class %d\n", c);
+ }
+}
+
+W32 totalRam (GC_state s) {
+ struct vminfo info;
+ int pagesize;
+
+ pagesize = sysconf (_SC_PAGESIZE);
+ if (vmgetinfo (&info, VMINFO, sizeof(info)) < 0)
+ diee ("totalRam error: vmgetinfo failed\n");
+ return info.memsizepgs * pagesize;
+}
+
+
+struct map_type {
+ int flag;
+ char *type;
+};
+
+static struct map_type map_types[] =
+ {{MA_MAINEXEC, "main"},
+ {MA_KERNTEXT, "kern"},
+ {MA_SHARED, "shared"},
+ {MA_STACK, "stack"},
+ {0, NULL}};
+
+
+struct map_segment {
+ prptr64_t start;
+ prptr64_t end;
+ char *name;
+};
+
+static struct map_segment map_segments[] =
+ {{0x00000000, 0x0fffffff, "kernel"},
+ /* Application program text. */
+ {0x10000000, 0x1fffffff, "text"},
+ /* Application program data and the application stack. */
+ {0x20000000, 0x2fffffff, "data"},
+ /* Available for use by shared memory or mmap services. */
+ {0x30000000, 0xafffffff, "mmap"},
+ /* Shared library text. */
+ {0xd0000000, 0xdfffffff, "shtext"},
+ /* Miscellaneous kernel data. */
+ {0xe0000000, 0xefffffff, "kdata"},
+ /* Application shared library data. */
+ {0xf0000000, 0xffffffff, "shdata"},
+ {0, 0, NULL}};
+
+
+static char *
+get_map_type(int flags, prptr64_t addr)
+{
+ struct map_type *m;
+
+ for (m = map_types; m->flag; m++)
+ if (m->flag & flags)
+ return m->type;
+ if ((addr >= 0xd0000000 && addr <= 0xdfffffff)
+ || (addr >= 0xf0000000 && addr <= 0xffffffff))
+ return "shlib";
+ return "";
+}
+
+static char *
+get_map_segment(prptr64_t addr)
+{
+ struct map_segment *m;
+
+ for (m = map_segments; m->name; m++)
+ if (m->start <= addr && m->end >= addr)
+ return m->name;
+ return "";
+}
+
+#define BUFLEN 65536
+
+void showMem(void)
+{
+ pid_t pid = getpid ();
+ char fname[128];
+ int fd = 0;
+ char *buf;
+ struct prmap *map;
+
+ printf ("va_start va_end perm type segment file (member) [object]\n");
+ printf ("--------+--------+---+------+------+----------------------\n");
+
+ snprintf (fname, sizeof (fname), "/proc/%d/map", pid);
+ fd = open (fname, O_RDONLY);
+ if (fd == -1)
+ diee ("showMem error: opening %s failed", fname);
+
+ /* I couldn't figure out a way to get the size of the map file
+ beforehand (only open, read, write, and close work on files under
+ /proc), so let's just hope that 64k will be enough. */
+ buf = malloc (BUFLEN);
+ if (buf == NULL)
+ die ("showMem error: out of memory.");
+
+ read (fd, buf, BUFLEN);
+ map = (struct prmap*)buf;
+
+ for (map = (struct prmap*)buf; map->pr_size; map++) {
+ char *m = buf + map->pr_pathoff;
+ m += strlen (m) + 1;
+ if (!m[0])
+ m = NULL;
+ printf ("%08llx %08llx %s%s%s %-6s %-6s %s %s%s%s[%s]\n",
+ map->pr_vaddr, map->pr_vaddr + map->pr_size,
+ map->pr_mflags & MA_READ ? "r" : "-",
+ map->pr_mflags & MA_WRITE ? "w" : "-",
+ map->pr_mflags & MA_EXEC ? "x" : "-",
+ get_map_type (map->pr_mflags, map->pr_vaddr),
+ get_map_segment (map->pr_vaddr),
+ buf + map->pr_pathoff,
+ m ? "(" : "", m ? m : "", m ? ") " : "",
+ map->pr_mapname);
+ }
+}
Added: mlton/trunk/runtime/platform/aix.h
===================================================================
--- mlton/trunk/runtime/platform/aix.h 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/runtime/platform/aix.h 2006-05-13 21:26:09 UTC (rev 4536)
@@ -0,0 +1,52 @@
+#define HAS_FEROUND TRUE
+#define HAS_FPCLASSIFY FALSE
+#define HAS_FPCLASSIFY64 TRUE
+#define HAS_MSG_DONTWAIT FALSE
+#define HAS_PTRACE FALSE
+#define HAS_REMAP FALSE
+#define HAS_SIGALTSTACK TRUE
+#define HAS_SIGNBIT FALSE
+#define HAS_SPAWN FALSE
+#define HAS_TIME_PROFILING FALSE
+
+#define MLton_Platform_OS_host "aix"
+#define __ppc__
+
+#include <grp.h>
+#include <math.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#include <netinet/tcp.h>
+#include <pwd.h>
+#include <sys/ioctl.h>
+#include <sys/poll.h>
+#include <sys/select.h>
+#include <sys/socket.h>
+#include <sys/syslog.h>
+#include <sys/times.h>
+#include <sys/types.h>
+#include <sys/types.h>
+#include <sys/un.h>
+#include <sys/utsname.h>
+#include <termios.h>
+
+
+#include "feround.h"
+
+#define FE_TOWARDZERO 0 // FP_RND_RZ
+#define FE_TONEAREST 1 // FP_RND_RN
+#define FE_UPWARD 2 // FP_RND_RP
+#define FE_DOWNWARD 3 // FP_RND_RM
+
+enum {
+ FP_NAN,
+ FP_INFINITE,
+ FP_ZERO,
+ FP_SUBNORMAL,
+ FP_NORMAL
+};
+
+int fpclassify64(double d);
+
+/* This should not conflict with existing flags. */
+#define MSG_DONTWAIT 0x1000000
Modified: mlton/trunk/runtime/platform/cygwin.c
===================================================================
--- mlton/trunk/runtime/platform/cygwin.c 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/runtime/platform/cygwin.c 2006-05-13 21:26:09 UTC (rev 4536)
@@ -5,6 +5,7 @@
#include "getrusage.c"
#include "mkdir2.c"
#include "mmap.c"
+#include "recv.nonblock.c"
#include "totalRam.sysconf.c"
#include "windows.c"
Modified: mlton/trunk/runtime/platform/cygwin.h
===================================================================
--- mlton/trunk/runtime/platform/cygwin.h 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/runtime/platform/cygwin.h 2006-05-13 21:26:09 UTC (rev 4536)
@@ -23,8 +23,9 @@
#define MLton_Platform_OS_host "cygwin"
+#define HAS_FEROUND FALSE
#define HAS_FPCLASSIFY TRUE
-#define HAS_FEROUND FALSE
+#define HAS_MSG_DONTWAIT FALSE
#define HAS_PTRACE FALSE
#define HAS_REMAP FALSE
#define HAS_SIGALTSTACK FALSE
@@ -47,7 +48,8 @@
#define _SC_RE_DUP_MAX _SC_BOGUS
#define _SC_STREAM_MAX _SC_BOGUS
-#define MSG_DONTWAIT 0
+/* This should not conflict with existing flags. */
+#define MSG_DONTWAIT 0x1000000
#define PF_INET6 0
struct sockaddr_in6 {};
Modified: mlton/trunk/runtime/platform/darwin.h
===================================================================
--- mlton/trunk/runtime/platform/darwin.h 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/runtime/platform/darwin.h 2006-05-13 21:26:09 UTC (rev 4536)
@@ -25,6 +25,7 @@
#define HAS_FEROUND TRUE
#define HAS_FPCLASSIFY TRUE
+#define HAS_MSG_DONTWAIT TRUE
#define HAS_PTRACE FALSE
#define HAS_REMAP FALSE
#define HAS_SIGALTSTACK TRUE
Modified: mlton/trunk/runtime/platform/freebsd.h
===================================================================
--- mlton/trunk/runtime/platform/freebsd.h 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/runtime/platform/freebsd.h 2006-05-13 21:26:09 UTC (rev 4536)
@@ -25,6 +25,7 @@
#define HAS_FEROUND TRUE
#define HAS_FPCLASSIFY TRUE
+#define HAS_MSG_DONTWAIT TRUE
#define HAS_PTRACE TRUE
#define HAS_REMAP FALSE
#define HAS_SIGALTSTACK TRUE
Modified: mlton/trunk/runtime/platform/hpux.c
===================================================================
--- mlton/trunk/runtime/platform/hpux.c 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/runtime/platform/hpux.c 2006-05-13 21:26:09 UTC (rev 4536)
@@ -1,17 +1,19 @@
#include "platform.h"
+
#include <sys/mman.h>
-#define MAP_ANON MAP_ANONYMOUS
-
+#include <sys/newsig.h>
#include <sys/param.h>
#include <sys/pstat.h>
-#include <sys/newsig.h>
-#include "ssmmap.c"
+#define MAP_ANON MAP_ANONYMOUS
+
#include "getrusage.c"
-#include "use-mmap.c"
#include "mkdir2.c"
+#include "recv.nonblock.c"
#include "setenv.putenv.c"
+#include "ssmmap.c"
+#include "use-mmap.c"
W32 totalRam (GC_state s) {
struct pst_static buf;
Modified: mlton/trunk/runtime/platform/hpux.h
===================================================================
--- mlton/trunk/runtime/platform/hpux.h 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/runtime/platform/hpux.h 2006-05-13 21:26:09 UTC (rev 4536)
@@ -22,6 +22,7 @@
#define HAS_FEROUND TRUE
#define HAS_FPCLASSIFY TRUE
+#define HAS_MSG_DONTWAIT FALSE
#define HAS_PTRACE FALSE
#define HAS_REMAP FALSE
#define HAS_SIGALTSTACK TRUE
@@ -34,7 +35,8 @@
#define LOG_PERROR 0
#define LOG_AUTHPRIV LOG_AUTH
-#define MSG_DONTWAIT 0
+/* This should not conflict with existing flags. */
+#define MSG_DONTWAIT 0x1000000
#ifndef PF_INET6
/* Old versions of HP-UX don't have IPv6 support. */
Modified: mlton/trunk/runtime/platform/linux.h
===================================================================
--- mlton/trunk/runtime/platform/linux.h 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/runtime/platform/linux.h 2006-05-13 21:26:09 UTC (rev 4536)
@@ -24,6 +24,7 @@
#define HAS_FEROUND TRUE
#define HAS_FPCLASSIFY TRUE
+#define HAS_MSG_DONTWAIT TRUE
#define HAS_PTRACE TRUE
#define HAS_REMAP TRUE
#define HAS_SIGALTSTACK TRUE
Modified: mlton/trunk/runtime/platform/mingw.h
===================================================================
--- mlton/trunk/runtime/platform/mingw.h 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/runtime/platform/mingw.h 2006-05-13 21:26:09 UTC (rev 4536)
@@ -19,6 +19,7 @@
// classifies subnormals as normals. So, we disable it here, which causes the
// runtime to use our own version.
#define HAS_FPCLASSIFY FALSE
+#define HAS_MSG_DONTWAIT TRUE
#define HAS_PTRACE FALSE
#define HAS_REMAP FALSE
#define HAS_SIGALTSTACK FALSE
@@ -61,8 +62,6 @@
#define F_SETLKW 9
#define FD_CLOEXEC 1
-#define MSG_DONTWAIT 0
-
#define SHUT_RD SD_RECEIVE
#define SHUT_WR SD_SEND
#define SHUT_RDWR SD_BOTH
Modified: mlton/trunk/runtime/platform/netbsd.h
===================================================================
--- mlton/trunk/runtime/platform/netbsd.h 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/runtime/platform/netbsd.h 2006-05-13 21:26:09 UTC (rev 4536)
@@ -22,6 +22,7 @@
#define HAS_FEROUND FALSE
#define HAS_FPCLASSIFY TRUE
+#define HAS_MSG_DONTWAIT TRUE
#define HAS_PTRACE FALSE
#define HAS_REMAP FALSE
#define HAS_SIGALTSTACK TRUE
Modified: mlton/trunk/runtime/platform/openbsd.h
===================================================================
--- mlton/trunk/runtime/platform/openbsd.h 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/runtime/platform/openbsd.h 2006-05-13 21:26:09 UTC (rev 4536)
@@ -21,6 +21,7 @@
#define HAS_FEROUND FALSE
#define HAS_FPCLASSIFY FALSE
+#define HAS_MSG_DONTWAIT TRUE
#define HAS_PTRACE FALSE
#define HAS_REMAP FALSE
#define HAS_SIGALTSTACK TRUE
Added: mlton/trunk/runtime/platform/recv.nonblock.c
===================================================================
--- mlton/trunk/runtime/platform/recv.nonblock.c 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/runtime/platform/recv.nonblock.c 2006-05-13 21:26:09 UTC (rev 4536)
@@ -0,0 +1,38 @@
+/* Simulates MSG_DONTWAIT using fcntl() and O_NONBLOCK. */
+
+static void fd_modify(int fd, int flags, int add, int remove)
+{
+ if (flags & MSG_DONTWAIT) {
+ int f = fcntl(fd, F_GETFL);
+ fcntl(fd, F_SETFL, (f | add) & ~remove);
+ }
+}
+
+static void set_nonblock(int fd, int flags)
+{
+ fd_modify(fd, flags, O_NONBLOCK, 0);
+}
+
+static void clear_nonblock(int fd, int flags)
+{
+ fd_modify(fd, flags, 0, O_NONBLOCK);
+}
+
+int mlton_recv(int s, void *buf, int len, int flags)
+{
+ int ret;
+ set_nonblock(s, flags);
+ ret = recv(s, buf, len, flags & ~MSG_DONTWAIT);
+ clear_nonblock(s, flags);
+ return ret;
+}
+
+int mlton_recvfrom(int s, void *buf, int len, int flags, void *from,
+ socklen_t *fromlen)
+{
+ int ret;
+ set_nonblock(s, flags);
+ ret = recvfrom(s, buf, len, flags & ~MSG_DONTWAIT, from, fromlen);
+ clear_nonblock(s, flags);
+ return ret;
+}
Modified: mlton/trunk/runtime/platform/solaris.h
===================================================================
--- mlton/trunk/runtime/platform/solaris.h 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/runtime/platform/solaris.h 2006-05-13 21:26:09 UTC (rev 4536)
@@ -34,6 +34,7 @@
#define HAS_FEROUND TRUE
#define HAS_FPCLASSIFY FALSE
#define HAS_FPCLASSIFY64 TRUE
+#define HAS_MSG_DONTWAIT TRUE
#define HAS_PTRACE TRUE
#define HAS_REMAP FALSE
#define HAS_SIGALTSTACK TRUE
Modified: mlton/trunk/runtime/platform.h
===================================================================
--- mlton/trunk/runtime/platform.h 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/runtime/platform.h 2006-05-13 21:26:09 UTC (rev 4536)
@@ -58,7 +58,9 @@
#define __Darwin__
#endif
-#if (defined (__CYGWIN__))
+#if (defined (_AIX))
+#include "platform/aix.h"
+#elif (defined (__CYGWIN__))
#include "platform/cygwin.h"
#elif (defined (__Darwin__))
#include "platform/darwin.h"
@@ -160,6 +162,10 @@
#error HAS_TIME_PROFILING not defined
#endif
+#ifndef HAS_MSG_DONTWAIT
+#error HAS_MSG_DONTWAIT not defined
+#endif
+
#ifndef EXECVP
#define EXECVP execvp
#endif
@@ -201,6 +207,17 @@
#endif
#endif
+#if HAS_MSG_DONTWAIT
+#define mlton_recv recv
+#define mlton_recvfrom recvfrom
+#else
+/* Platform has no MSG_DONTWAIT flag for recv(), so these must be
+ defined to simulate that flag. */
+int mlton_recv(int s, void *buf, int len, int flags);
+int mlton_recvfrom(int s, void *buf, int len, int flags, void *from,
+ socklen_t *fromlen);
+#endif
+
/* If HAS_TIME_PROFILING, then you must define these. */
void *getTextStart ();
void *getTextEnd ();
Modified: mlton/trunk/runtime/types.h
===================================================================
--- mlton/trunk/runtime/types.h 2006-05-13 21:11:02 UTC (rev 4535)
+++ mlton/trunk/runtime/types.h 2006-05-13 21:26:09 UTC (rev 4536)
@@ -16,7 +16,7 @@
#ifndef _ISOC99_SOURCE
#define _ISOC99_SOURCE
#endif
-#if (defined(__hpux__) || defined (__OpenBSD__))
+#if defined(_AIX) || (defined(__hpux__) || defined (__OpenBSD__))
#include <inttypes.h>
#elif (defined (__sun__))
#include <sys/int_types.h>
|
|
From: Ville L. <vi...@ml...> - 2006-05-13 15:07:45
|
Don't try to use -gstabs+ on ia64 and powerpc. ---------------------------------------------------------------------- U mlton/trunk/bytecode/Makefile U mlton/trunk/runtime/Makefile ---------------------------------------------------------------------- Modified: mlton/trunk/bytecode/Makefile =================================================================== --- mlton/trunk/bytecode/Makefile 2006-05-13 15:51:31 UTC (rev 4534) +++ mlton/trunk/bytecode/Makefile 2006-05-13 21:11:02 UTC (rev 4535) @@ -1,4 +1,4 @@ -## Copyright (C) 2004-2005 Henry Cejtin, Matthew Fluet, Suresh +## Copyright (C) 2004-2006 Henry Cejtin, Matthew Fluet, Suresh # Jagannathan, and Stephen Weeks. # # MLton is released under a BSD-style license. @@ -11,6 +11,13 @@ CC = gcc -std=gnu99 CFLAGS = -fomit-frame-pointer -I../runtime -I../include -Wall +DEBUGFLAGS = $(CFLAGS) +ifneq ($(TARGET_ARCH), ia64) +ifneq ($(TARGET_ARCH), powerpc) +DEBUGFLAGS += -gstabs+ +endif +endif +DEBUGFLAGS += -g2 ifeq ($(TARGET_ARCH), amd64) CFLAGS += -mtune=opteron -m32 @@ -24,7 +31,7 @@ $(CC) $(CFLAGS) -c -O2 interpret.c interpret-gdb.o: interpret.c interpret.h - $(CC) $(CFLAGS) -c -o $@ -gstabs+ -g2 -DASSERT=1 interpret.c + $(CC) $(DEBUGFLAGS) -c -o $@ -DASSERT=1 interpret.c print-opcodes: print-opcodes.c opcode.h $(CC) $(CFLAGS) -o print-opcodes -I../runtime -L../runtime \ Modified: mlton/trunk/runtime/Makefile =================================================================== --- mlton/trunk/runtime/Makefile 2006-05-13 15:51:31 UTC (rev 4534) +++ mlton/trunk/runtime/Makefile 2006-05-13 21:11:02 UTC (rev 4535) @@ -50,7 +50,13 @@ CC = gcc -std=gnu99 CFLAGS = -O2 -Wall -I. -Iplatform -D_FILE_OFFSET_BITS=64 $(FLAGS) -DEBUGFLAGS = $(CFLAGS) -gstabs+ -g2 +DEBUGFLAGS = $(CFLAGS) +ifneq ($(TARGET_ARCH), ia64) +ifneq ($(TARGET_ARCH), powerpc) +DEBUGFLAGS += -gstabs+ +endif +endif +DEBUGFLAGS += -g2 CFILES = \ $(shell find basis -type f | grep '\.c$$' | grep -v Real/) \ |
|
From: Matthew F. <fl...@ml...> - 2006-05-13 08:51:32
|
Type-check all platforms with c-types.sml. ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/basis-library/Makefile D mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/test/ ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/Makefile =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library/Makefile 2006-05-13 15:50:55 UTC (rev 4533) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/Makefile 2006-05-13 15:51:31 UTC (rev 4534) @@ -23,8 +23,8 @@ OBJPTR_MAPS = objptr-rep32.map objptr-rep64.map HEADER_MAPS = header-word32.map header-word64.map SEQINDEX_MAPS = seqindex-int32.map seqindex-int64.map -TARGET_ARCH = x86 amd64 -TARGET_OS = linux +TARGET_ARCH = amd64 hppa powerpc sparc x86 +TARGET_OS = cygwin darwin freebsd hpux linux mingw netbsd openbsd solaris DEFAULT_CHAR = char8 DEFAULT_INT = int32 int64 intinf DEFAULT_REAL = real32 real64 @@ -40,21 +40,24 @@ for objptrrep in $(OBJPTR_MAPS); do \ for header in $(HEADER_MAPS); do \ for seqindex in $(SEQINDEX_MAPS); do \ - for targetarch in $(TARGET_ARCH); do \ - for targetos in $(TARGET_OS); do \ for defchar in $(DEFAULT_CHAR); do \ for defint in $(DEFAULT_INT); do \ for defreal in $(DEFAULT_REAL); do \ for defword in $(DEFAULT_WORD); do \ + for targetarch in $(TARGET_ARCH); do \ + for targetos in $(TARGET_OS); do \ if [ ! -r config/c/$$targetarch-$$targetos/c-types.sml ]; then \ - break; \ + continue; \ fi; \ echo "Type checking: $$objptrrep $$header $$seqindex $$targetarch $$targetos $$defchar $$defint $$defreal $$defword"; \ + rm -f target.map; \ + ( echo "TARGET_ARCH $$targetarch"; \ + echo "TARGET_OS $$targetos"; ) > target.map; \ "$(MLTON)" -disable-ann deadCode -stop tc -show-types true \ -mlb-path-map "maps/$$objptrrep" \ -mlb-path-map "maps/$$header" \ -mlb-path-map "maps/$$seqindex" \ - -mlb-path-map "maps/c-types.$$targetarch-$$targetos.map" \ + -mlb-path-map "target.map" \ -default-type "$$defchar" \ -default-type "$$defint" \ -default-type "$$defreal" \ |
|
From: Matthew F. <fl...@ml...> - 2006-05-13 08:50:55
|
Restored signedness of ino_t. ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/x86-mingw/c-types.sml ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/x86-mingw/c-types.sml =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/x86-mingw/c-types.sml 2006-05-13 15:50:25 UTC (rev 4532) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/x86-mingw/c-types.sml 2006-05-13 15:50:55 UTC (rev 4533) @@ -94,8 +94,8 @@ functor C_GId_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word16 (A) structure C_Id = struct open Int32 type t = int end functor C_Id_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) -structure C_INo = struct open Word16 type t = word end -functor C_INo_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word16 (A) +structure C_INo = struct open Int16 type t = int end +functor C_INo_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int16 (A) structure C_Mode = struct open Word16 type t = word end functor C_Mode_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word16 (A) structure C_NLink = struct open Int16 type t = int end |
|
From: Matthew F. <fl...@ml...> - 2006-05-13 08:50:25
|
Exposed a few more coercions in INTEGER_EXTRA to accommodate different
signedness in C system types.
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/basis-library/integer/integer.sig
U mlton/branches/on-20050822-x86_64-branch/basis-library/posix/file-sys.sml
U mlton/branches/on-20050822-x86_64-branch/basis-library/posix/proc-env.sml
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/integer/integer.sig
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/integer/integer.sig 2006-05-13 15:49:28 UTC (rev 4531)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/integer/integer.sig 2006-05-13 15:50:25 UTC (rev 4532)
@@ -69,6 +69,8 @@
val gtu: int * int -> bool
val geu: int * int -> bool
+ val toLargeInt: int -> LargeInt.int
+ val fromLargeInt: LargeInt.int -> int
val fromSysWord: SysWord.word -> int
val toSysWord: int -> SysWord.word
end
@@ -118,6 +120,8 @@
val gtu: int * int -> bool
val geu: int * int -> bool
+ val toLargeInt: int -> LargeInt.int
+ val fromLargeInt: LargeInt.int -> int
val fromSysWord: SysWord.word -> int
val toSysWord: int -> SysWord.word
end
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/posix/file-sys.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/posix/file-sys.sml 2006-05-13 15:49:28 UTC (rev 4531)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/posix/file-sys.sml 2006-05-13 15:50:25 UTC (rev 4532)
@@ -283,12 +283,12 @@
end
type dev = C_Dev.t
- val wordToDev = C_Dev.fromLargeWord o SysWord.toLargeWord
- val devToWord = SysWord.fromLargeWord o C_Dev.toLargeWord
+ val wordToDev = C_Dev.fromSysWord
+ val devToWord = C_Dev.toSysWord
type ino = C_INo.t
- val wordToIno = C_INo.fromLargeWord o SysWord.toLargeWord
- val inoToWord = SysWord.fromLargeWord o C_INo.toLargeWord
+ val wordToIno = C_INo.fromSysWord
+ val inoToWord = C_INo.toSysWord
structure ST =
struct
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/posix/proc-env.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/posix/proc-env.sml 2006-05-13 15:49:28 UTC (rev 4531)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/posix/proc-env.sml 2006-05-13 15:50:25 UTC (rev 4532)
@@ -35,10 +35,10 @@
fun setsid () = SysCall.simpleResult (Prim.setsid)
- val uidToWord = SysWord.fromLarge o C_UId.toLarge
- val wordToUid = C_UId.fromLarge o SysWord.toLarge
- val gidToWord = SysWord.fromLarge o C_GId.toLarge
- val wordToGid = C_GId.fromLarge o SysWord.toLarge
+ val uidToWord = C_UId.toSysWord
+ val wordToUid = C_UId.fromSysWord
+ val gidToWord = C_GId.toSysWord
+ val wordToGid = C_GId.fromSysWord
fun getgroups () =
SysCall.syscall
@@ -228,7 +228,7 @@
fun cvt (ticks: C_Clock.t) =
Time.fromTicks (LargeInt.quot
- (LargeInt.* (C_Clock.toLarge ticks,
+ (LargeInt.* (C_Clock.toLargeInt ticks,
Time.ticksPerSecond),
ticksPerSec))
in
|
|
From: Matthew F. <fl...@ml...> - 2006-05-13 08:49:29
|
FreeBSD typedefs ---------------------------------------------------------------------- A mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/x86-freebsd/c-types.sml ---------------------------------------------------------------------- Added: mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/x86-freebsd/c-types.sml =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/x86-freebsd/c-types.sml 2006-05-13 15:07:53 UTC (rev 4530) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/x86-freebsd/c-types.sml 2006-05-13 15:49:28 UTC (rev 4531) @@ -0,0 +1,131 @@ +(* Copyright (C) 2004-2006 Henry Cejtin, Matthew Fluet, Suresh + * Jagannathan, and Stephen Weeks. + * + * MLton is released under a BSD-style license. + * See the file MLton-LICENSE for details. + *) + + +(* C *) +structure C_Char = struct open Int8 type t = int end +functor C_Char_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int8 (A) +structure C_SChar = struct open Int8 type t = int end +functor C_SChar_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int8 (A) +structure C_UChar = struct open Word8 type t = word end +functor C_UChar_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word8 (A) +structure C_Short = struct open Int16 type t = int end +functor C_Short_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int16 (A) +structure C_SShort = struct open Int16 type t = int end +functor C_SShort_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int16 (A) +structure C_UShort = struct open Word16 type t = word end +functor C_UShort_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word16 (A) +structure C_Int = struct open Int32 type t = int end +functor C_Int_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_SInt = struct open Int32 type t = int end +functor C_SInt_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_UInt = struct open Word32 type t = word end +functor C_UInt_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_Long = struct open Int32 type t = int end +functor C_Long_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_SLong = struct open Int32 type t = int end +functor C_SLong_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_ULong = struct open Word32 type t = word end +functor C_ULong_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_LongLong = struct open Int64 type t = int end +functor C_LongLong_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int64 (A) +structure C_SLongLong = struct open Int64 type t = int end +functor C_SLongLong_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int64 (A) +structure C_ULongLong = struct open Word64 type t = word end +functor C_ULongLong_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word64 (A) +structure C_Float = struct open Real32 type t = real end +functor C_Float_ChooseRealN (A: CHOOSE_REALN_ARG) = ChooseRealN_Real32 (A) +structure C_Double = struct open Real64 type t = real end +functor C_Double_ChooseRealN (A: CHOOSE_REALN_ARG) = ChooseRealN_Real64 (A) +structure C_Size = struct open Word32 type t = word end +functor C_Size_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +structure C_Pointer = struct open Word32 type t = word end +functor C_Pointer_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_String = struct open Word32 type t = word end +functor C_String_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_StringArray = struct open Word32 type t = word end +functor C_StringArray_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +(* Generic integers *) +structure C_Fd = C_Int +functor C_Fd_ChooseIntN (A: CHOOSE_INTN_ARG) = C_Int_ChooseIntN (A) +structure C_Signal = C_Int +functor C_Signal_ChooseIntN (A: CHOOSE_INTN_ARG) = C_Int_ChooseIntN (A) +structure C_Status = C_Int +functor C_Status_ChooseIntN (A: CHOOSE_INTN_ARG) = C_Int_ChooseIntN (A) +structure C_Sock = C_Int +functor C_Sock_ChooseIntN (A: CHOOSE_INTN_ARG) = C_Int_ChooseIntN (A) + +(* C99 *) +structure C_Ptrdiff = struct open Int32 type t = int end +functor C_Ptrdiff_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_Intmax = struct open Int64 type t = int end +functor C_Intmax_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int64 (A) +structure C_UIntmax = struct open Word64 type t = word end +functor C_UIntmax_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word64 (A) +structure C_Intptr = struct open Int32 type t = int end +functor C_Intptr_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_UIntptr = struct open Word32 type t = word end +functor C_UIntptr_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +(* from <dirent.h> *) +structure C_DirP = struct open Word32 type t = word end +functor C_DirP_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +(* from <poll.h> *) +structure C_NFds = struct open Word32 type t = word end +functor C_NFds_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +(* from <resource.h> *) +structure C_RLim = struct open Int64 type t = int end +functor C_RLim_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int64 (A) + +(* from <sys/types.h> *) +structure C_Clock = struct open Word32 type t = word end +functor C_Clock_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_Dev = struct open Word32 type t = word end +functor C_Dev_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_GId = struct open Word32 type t = word end +functor C_GId_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_Id = struct open Int64 type t = int end +functor C_Id_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int64 (A) +structure C_INo = struct open Word32 type t = word end +functor C_INo_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_Mode = struct open Word16 type t = word end +functor C_Mode_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word16 (A) +structure C_NLink = struct open Word16 type t = word end +functor C_NLink_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word16 (A) +structure C_Off = struct open Int64 type t = int end +functor C_Off_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int64 (A) +structure C_PId = struct open Int32 type t = int end +functor C_PId_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_SSize = struct open Int32 type t = int end +functor C_SSize_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_SUSeconds = struct open Int32 type t = int end +functor C_SUSeconds_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_Time = struct open Int32 type t = int end +functor C_Time_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_UId = struct open Word32 type t = word end +functor C_UId_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +(* from <sys/socket.h> *) +structure C_Socklen = struct open Word32 type t = word end +functor C_Socklen_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +(* from <termios.h> *) +structure C_CC = struct open Word8 type t = word end +functor C_CC_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word8 (A) +structure C_Speed = struct open Word32 type t = word end +functor C_Speed_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_TCFlag = struct open Word32 type t = word end +functor C_TCFlag_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +(* from "gmp.h" *) +structure C_MPLimb = struct open Word32 type t = word end +functor C_MPLimb_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + |
|
From: Matthew F. <fl...@ml...> - 2006-05-13 08:07:54
|
formatting
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/basis-library/integer/word0.sml
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/integer/word0.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/integer/word0.sml 2006-05-11 10:54:30 UTC (rev 4529)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/integer/word0.sml 2006-05-13 15:07:53 UTC (rev 4530)
@@ -172,7 +172,7 @@
in
val (fromInt8, fromInt8Z, toInt8, toInt8X) =
make {fromIntUnsafe = fromInt8Unsafe,
- fromIntZUnsafe = fromInt8ZUnsafe,
+ fromIntZUnsafe = fromInt8ZUnsafe,
toIntUnsafe = toInt8Unsafe,
toIntXUnsafe = toInt8XUnsafe,
other = {precision' = Primitive.Int8.precision',
@@ -180,7 +180,7 @@
minInt' = Primitive.Int8.minInt'}}
val (fromInt16, fromInt16Z, toInt16, toInt16X) =
make {fromIntUnsafe = fromInt16Unsafe,
- fromIntZUnsafe = fromInt16ZUnsafe,
+ fromIntZUnsafe = fromInt16ZUnsafe,
toIntUnsafe = toInt16Unsafe,
toIntXUnsafe = toInt16XUnsafe,
other = {precision' = Primitive.Int16.precision',
@@ -188,7 +188,7 @@
minInt' = Primitive.Int16.minInt'}}
val (fromInt32, fromInt32Z, toInt32, toInt32X) =
make {fromIntUnsafe = fromInt32Unsafe,
- fromIntZUnsafe = fromInt32ZUnsafe,
+ fromIntZUnsafe = fromInt32ZUnsafe,
toIntUnsafe = toInt32Unsafe,
toIntXUnsafe = toInt32XUnsafe,
other = {precision' = Primitive.Int32.precision',
|
|
From: Wesley T. <we...@ml...> - 2006-05-11 03:54:31
|
MacOS X Tiger typedefs ---------------------------------------------------------------------- A mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/powerpc-darwin/c-types.sml ---------------------------------------------------------------------- Added: mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/powerpc-darwin/c-types.sml =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/powerpc-darwin/c-types.sml 2006-05-11 10:53:29 UTC (rev 4528) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/powerpc-darwin/c-types.sml 2006-05-11 10:54:30 UTC (rev 4529) @@ -0,0 +1,131 @@ +(* Copyright (C) 2004-2006 Henry Cejtin, Matthew Fluet, Suresh + * Jagannathan, and Stephen Weeks. + * + * MLton is released under a BSD-style license. + * See the file MLton-LICENSE for details. + *) + + +(* C *) +structure C_Char = struct open Int8 type t = int end +functor C_Char_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int8 (A) +structure C_SChar = struct open Int8 type t = int end +functor C_SChar_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int8 (A) +structure C_UChar = struct open Word8 type t = word end +functor C_UChar_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word8 (A) +structure C_Short = struct open Int16 type t = int end +functor C_Short_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int16 (A) +structure C_SShort = struct open Int16 type t = int end +functor C_SShort_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int16 (A) +structure C_UShort = struct open Word16 type t = word end +functor C_UShort_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word16 (A) +structure C_Int = struct open Int32 type t = int end +functor C_Int_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_SInt = struct open Int32 type t = int end +functor C_SInt_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_UInt = struct open Word32 type t = word end +functor C_UInt_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_Long = struct open Int32 type t = int end +functor C_Long_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_SLong = struct open Int32 type t = int end +functor C_SLong_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_ULong = struct open Word32 type t = word end +functor C_ULong_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_LongLong = struct open Int64 type t = int end +functor C_LongLong_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int64 (A) +structure C_SLongLong = struct open Int64 type t = int end +functor C_SLongLong_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int64 (A) +structure C_ULongLong = struct open Word64 type t = word end +functor C_ULongLong_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word64 (A) +structure C_Float = struct open Real32 type t = real end +functor C_Float_ChooseRealN (A: CHOOSE_REALN_ARG) = ChooseRealN_Real32 (A) +structure C_Double = struct open Real64 type t = real end +functor C_Double_ChooseRealN (A: CHOOSE_REALN_ARG) = ChooseRealN_Real64 (A) +structure C_Size = struct open Word32 type t = word end +functor C_Size_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +structure C_Pointer = struct open Word32 type t = word end +functor C_Pointer_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_String = struct open Word32 type t = word end +functor C_String_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_StringArray = struct open Word32 type t = word end +functor C_StringArray_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +(* Generic integers *) +structure C_Fd = C_Int +functor C_Fd_ChooseIntN (A: CHOOSE_INTN_ARG) = C_Int_ChooseIntN (A) +structure C_Signal = C_Int +functor C_Signal_ChooseIntN (A: CHOOSE_INTN_ARG) = C_Int_ChooseIntN (A) +structure C_Status = C_Int +functor C_Status_ChooseIntN (A: CHOOSE_INTN_ARG) = C_Int_ChooseIntN (A) +structure C_Sock = C_Int +functor C_Sock_ChooseIntN (A: CHOOSE_INTN_ARG) = C_Int_ChooseIntN (A) + +(* C99 *) +structure C_Ptrdiff = struct open Int32 type t = int end +functor C_Ptrdiff_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_Intmax = struct open Int64 type t = int end +functor C_Intmax_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int64 (A) +structure C_UIntmax = struct open Word64 type t = word end +functor C_UIntmax_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word64 (A) +structure C_Intptr = struct open Int32 type t = int end +functor C_Intptr_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_UIntptr = struct open Word32 type t = word end +functor C_UIntptr_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +(* from <dirent.h> *) +structure C_DirP = struct open Word32 type t = word end +functor C_DirP_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +(* from <poll.h> *) +structure C_NFds = struct open Word32 type t = word end +functor C_NFds_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +(* from <resource.h> *) +structure C_RLim = struct open Int64 type t = int end +functor C_RLim_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int64 (A) + +(* from <sys/types.h> *) +structure C_Clock = struct open Word32 type t = word end +functor C_Clock_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_Dev = struct open Int32 type t = int end +functor C_Dev_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_GId = struct open Word32 type t = word end +functor C_GId_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_Id = struct open Word32 type t = word end +functor C_Id_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_INo = struct open Word32 type t = word end +functor C_INo_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_Mode = struct open Word16 type t = word end +functor C_Mode_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word16 (A) +structure C_NLink = struct open Word16 type t = word end +functor C_NLink_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word16 (A) +structure C_Off = struct open Int64 type t = int end +functor C_Off_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int64 (A) +structure C_PId = struct open Int32 type t = int end +functor C_PId_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_SSize = struct open Int32 type t = int end +functor C_SSize_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_SUSeconds = struct open Int32 type t = int end +functor C_SUSeconds_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_Time = struct open Int32 type t = int end +functor C_Time_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_UId = struct open Word32 type t = word end +functor C_UId_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +(* from <sys/socket.h> *) +structure C_Socklen = struct open Word32 type t = word end +functor C_Socklen_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +(* from <termios.h> *) +structure C_CC = struct open Word8 type t = word end +functor C_CC_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word8 (A) +structure C_Speed = struct open Int32 type t = int end +functor C_Speed_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_TCFlag = struct open Word32 type t = word end +functor C_TCFlag_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +(* from "gmp.h" *) +structure C_MPLimb = struct open Word32 type t = word end +functor C_MPLimb_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + |
|
From: Wesley T. <we...@ml...> - 2006-05-11 03:53:30
|
C-Types for MinGW 4.1 and a modified ino_t = unsigned short in sys/types.h ---------------------------------------------------------------------- A mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/x86-mingw/c-types.sml ---------------------------------------------------------------------- Added: mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/x86-mingw/c-types.sml =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/x86-mingw/c-types.sml 2006-05-10 21:44:36 UTC (rev 4527) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/x86-mingw/c-types.sml 2006-05-11 10:53:29 UTC (rev 4528) @@ -0,0 +1,131 @@ +(* Copyright (C) 2004-2006 Henry Cejtin, Matthew Fluet, Suresh + * Jagannathan, and Stephen Weeks. + * + * MLton is released under a BSD-style license. + * See the file MLton-LICENSE for details. + *) + + +(* C *) +structure C_Char = struct open Int8 type t = int end +functor C_Char_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int8 (A) +structure C_SChar = struct open Int8 type t = int end +functor C_SChar_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int8 (A) +structure C_UChar = struct open Word8 type t = word end +functor C_UChar_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word8 (A) +structure C_Short = struct open Int16 type t = int end +functor C_Short_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int16 (A) +structure C_SShort = struct open Int16 type t = int end +functor C_SShort_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int16 (A) +structure C_UShort = struct open Word16 type t = word end +functor C_UShort_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word16 (A) +structure C_Int = struct open Int32 type t = int end +functor C_Int_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_SInt = struct open Int32 type t = int end +functor C_SInt_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_UInt = struct open Word32 type t = word end +functor C_UInt_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_Long = struct open Int32 type t = int end +functor C_Long_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_SLong = struct open Int32 type t = int end +functor C_SLong_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_ULong = struct open Word32 type t = word end +functor C_ULong_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_LongLong = struct open Int64 type t = int end +functor C_LongLong_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int64 (A) +structure C_SLongLong = struct open Int64 type t = int end +functor C_SLongLong_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int64 (A) +structure C_ULongLong = struct open Word64 type t = word end +functor C_ULongLong_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word64 (A) +structure C_Float = struct open Real32 type t = real end +functor C_Float_ChooseRealN (A: CHOOSE_REALN_ARG) = ChooseRealN_Real32 (A) +structure C_Double = struct open Real64 type t = real end +functor C_Double_ChooseRealN (A: CHOOSE_REALN_ARG) = ChooseRealN_Real64 (A) +structure C_Size = struct open Word32 type t = word end +functor C_Size_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +structure C_Pointer = struct open Word32 type t = word end +functor C_Pointer_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_String = struct open Word32 type t = word end +functor C_String_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_StringArray = struct open Word32 type t = word end +functor C_StringArray_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +(* Generic integers *) +structure C_Fd = C_Int +functor C_Fd_ChooseIntN (A: CHOOSE_INTN_ARG) = C_Int_ChooseIntN (A) +structure C_Signal = C_Int +functor C_Signal_ChooseIntN (A: CHOOSE_INTN_ARG) = C_Int_ChooseIntN (A) +structure C_Status = C_Int +functor C_Status_ChooseIntN (A: CHOOSE_INTN_ARG) = C_Int_ChooseIntN (A) +structure C_Sock = C_Int +functor C_Sock_ChooseIntN (A: CHOOSE_INTN_ARG) = C_Int_ChooseIntN (A) + +(* C99 *) +structure C_Ptrdiff = struct open Int32 type t = int end +functor C_Ptrdiff_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_Intmax = struct open Int64 type t = int end +functor C_Intmax_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int64 (A) +structure C_UIntmax = struct open Word64 type t = word end +functor C_UIntmax_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word64 (A) +structure C_Intptr = struct open Int32 type t = int end +functor C_Intptr_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_UIntptr = struct open Word32 type t = word end +functor C_UIntptr_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +(* from <dirent.h> *) +structure C_DirP = struct open Word32 type t = word end +functor C_DirP_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +(* from <poll.h> *) +structure C_NFds = struct open Word32 type t = word end +functor C_NFds_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +(* from <resource.h> *) +structure C_RLim = struct open Word32 type t = word end +functor C_RLim_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +(* from <sys/types.h> *) +structure C_Clock = struct open Int32 type t = int end +functor C_Clock_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_Dev = struct open Word32 type t = word end +functor C_Dev_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_GId = struct open Word16 type t = word end +functor C_GId_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word16 (A) +structure C_Id = struct open Int32 type t = int end +functor C_Id_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_INo = struct open Word16 type t = word end +functor C_INo_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word16 (A) +structure C_Mode = struct open Word16 type t = word end +functor C_Mode_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word16 (A) +structure C_NLink = struct open Int16 type t = int end +functor C_NLink_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int16 (A) +structure C_Off = struct open Int32 type t = int end +functor C_Off_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_PId = struct open Int32 type t = int end +functor C_PId_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_SSize = struct open Int32 type t = int end +functor C_SSize_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_SUSeconds = struct open Int32 type t = int end +functor C_SUSeconds_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_Time = struct open Int32 type t = int end +functor C_Time_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) +structure C_UId = struct open Word16 type t = word end +functor C_UId_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word16 (A) + +(* from <sys/socket.h> *) +structure C_Socklen = struct open Int32 type t = int end +functor C_Socklen_ChooseIntN (A: CHOOSE_INTN_ARG) = ChooseIntN_Int32 (A) + +(* from <termios.h> *) +structure C_CC = struct open Word8 type t = word end +functor C_CC_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word8 (A) +structure C_Speed = struct open Word32 type t = word end +functor C_Speed_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) +structure C_TCFlag = struct open Word32 type t = word end +functor C_TCFlag_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + +(* from "gmp.h" *) +structure C_MPLimb = struct open Word32 type t = word end +functor C_MPLimb_ChooseWordN (A: CHOOSE_WORDN_ARG) = ChooseWordN_Word32 (A) + Property changes on: mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/x86-mingw/c-types.sml ___________________________________________________________________ Name: svn:executable + * |
|
From: Stephen W. <sw...@ml...> - 2006-05-10 14:44:37
|
Eliminated -Winline.
Fixed gdtoa warnings, using gdtoa-patch.
Eliminated prototypes of gdtoa_strtof and gdtoa_strtod from
platform.h, becuase they cause spurious warnings in files that include
both platform.h and gdtoa.h, like basis/Real/gdtoa.c. Instead, I
explicitly added a prototype in the only place where it's currently
otherwise needed, in runtime/gc/init.c.
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/Makefile
U mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/strto.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gdtoa-patch
U mlton/branches/on-20050822-x86_64-branch/runtime/platform.h
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2006-05-10 20:42:07 UTC (rev 4526)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2006-05-10 21:44:36 UTC (rev 4527)
@@ -104,7 +104,7 @@
WARNCFLAGS += -Wnested-externs
WARNCFLAGS += -Wlong-long
# WARNCFLAGS += -Wunreachable-code
-OPTWARNCFLAGS = $(WARNCFLAGS) -Winline -Wdisabled-optimization
+OPTWARNCFLAGS = $(WARNCFLAGS) -Wdisabled-optimization
DEBUGWARNCFLAGS = $(WARNCFLAGS)
UTILCFILES = \
@@ -167,8 +167,6 @@
libgdtoa.a: gdtoa/arith.h
cd gdtoa && \
$(CC) $(OPTCFLAGS) $(OPTWARNCFLAGS) \
- -Dstrtod=gdtoa_strtod \
- -Dstrtof=gdtoa_strtof \
-w -O1 -c -DINFNAN_CHECK \
*.c
$(AR) libgdtoa.a gdtoa/*.o
@@ -259,7 +257,7 @@
.PHONY: gdtoa-patch
gdtoa-patch:
- cd gdtoa && $(MAKE) clean && rm -f &~
+ cd gdtoa && $(MAKE) clean && rm -f *~
mv gdtoa gdtoa-new
gzip -dc gdtoa.tgz | tar xf -
diff -P -C 2 -r gdtoa gdtoa-new >gdtoa-patch || exit 0
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/strto.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/strto.c 2006-05-10 20:42:07 UTC (rev 4526)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/strto.c 2006-05-10 21:44:36 UTC (rev 4527)
@@ -1,4 +1,5 @@
#include "platform.h"
+#include "gdtoa/gdtoa.h"
Real32_t Real32_strto (NullString8_t s) {
char *endptr;
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.c 2006-05-10 20:42:07 UTC (rev 4526)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.c 2006-05-10 21:44:36 UTC (rev 4527)
@@ -20,6 +20,10 @@
}
#endif
+// From gdtoa/gdtoa.h.
+// Can't include the whole thing because it brings in too much junk.
+float gdtoa_strtof (const char *, char **);
+
static float stringToFloat (char *s) {
char *endptr;
float f;
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gdtoa-patch
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gdtoa-patch 2006-05-10 20:42:07 UTC (rev 4526)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gdtoa-patch 2006-05-10 21:44:36 UTC (rev 4527)
@@ -0,0 +1,74 @@
+diff -P -C 2 -r gdtoa/arithchk.c gdtoa-new/arithchk.c
+*** gdtoa/arithchk.c 1998-06-19 13:46:11.000000000 -0700
+--- gdtoa-new/arithchk.c 2006-05-10 14:12:02.477056503 -0700
+***************
+*** 137,141 ****
+ }
+
+! main()
+ {
+ Akind *a = 0;
+--- 137,141 ----
+ }
+
+! int main()
+ {
+ Akind *a = 0;
+diff -P -C 2 -r gdtoa/gdtoa.h gdtoa-new/gdtoa.h
+*** gdtoa/gdtoa.h 2000-11-01 07:01:39.000000000 -0800
+--- gdtoa-new/gdtoa.h 2006-05-10 14:06:30.680495461 -0700
+***************
+*** 114,119 ****
+ int mode, int ndigits, int *decpt, char **rve));
+ extern void freedtoa ANSI((char*));
+! extern float strtof ANSI((CONST char *, char **));
+! extern double strtod ANSI((CONST char *, char **));
+ extern int strtodg ANSI((CONST char*, char**, FPI*, Long*, ULong*));
+
+--- 114,119 ----
+ int mode, int ndigits, int *decpt, char **rve));
+ extern void freedtoa ANSI((char*));
+! extern float gdtoa_strtof ANSI((CONST char *, char **));
+! extern double gdtoa_strtod ANSI((CONST char *, char **));
+ extern int strtodg ANSI((CONST char*, char**, FPI*, Long*, ULong*));
+
+diff -P -C 2 -r gdtoa/strtod.c gdtoa-new/strtod.c
+*** gdtoa/strtod.c 2003-03-21 13:24:01.000000000 -0800
+--- gdtoa-new/strtod.c 2006-05-10 14:05:47.597263849 -0700
+***************
+*** 59,63 ****
+
+ double
+! strtod
+ #ifdef KR_headers
+ (s00, se) CONST char *s00; char **se;
+--- 59,63 ----
+
+ double
+! gdtoa_strtod
+ #ifdef KR_headers
+ (s00, se) CONST char *s00; char **se;
+diff -P -C 2 -r gdtoa/strtof.c gdtoa-new/strtof.c
+*** gdtoa/strtof.c 2000-11-01 20:31:40.000000000 -0800
+--- gdtoa-new/strtof.c 2006-05-10 14:06:15.872478149 -0700
+***************
+*** 38,46 ****
+ #include "gdtoaimp.h"
+
+! float
+ #ifdef KR_headers
+! strtof(s, sp) CONST char *s; char **sp;
+ #else
+! strtof(CONST char *s, char **sp)
+ #endif
+ {
+--- 38,46 ----
+ #include "gdtoaimp.h"
+
+! float gdtoa_strtof
+ #ifdef KR_headers
+! (s, sp) CONST char *s; char **sp;
+ #else
+! (CONST char *s, char **sp)
+ #endif
+ {
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform.h 2006-05-10 20:42:07 UTC (rev 4526)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform.h 2006-05-10 21:44:36 UTC (rev 4527)
@@ -106,13 +106,6 @@
#include "basis-ffi.h"
/* ---------------------------------------------------------------- */
-/* gdtoa */
-/* ---------------------------------------------------------------- */
-
-Real32_t gdtoa_strtof (const char *s, char **endptr);
-Real64_t gdtoa_strtod (const char *s, char **endptr);
-
-/* ---------------------------------------------------------------- */
/* Runtime Init/Exit */
/* ---------------------------------------------------------------- */
|
|
From: Stephen W. <sw...@ml...> - 2006-05-10 13:42:08
|
Tweaked last commit. Keep -Wformat=2; turn off only -Wformat-nonliteral. ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/Makefile ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Makefile =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2006-05-10 20:39:30 UTC (rev 4525) +++ mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2006-05-10 20:42:07 UTC (rev 4526) @@ -71,8 +71,8 @@ WARNCFLAGS += -W endif # -Wformat=2 implies -Wformat-nonliteral, which causes spurious warnings. -# WARNCFLAGS += -Wformat=2 -WARNCFLAGS += -Wformat +WARNCFLAGS += -Wformat=2 +WARNCFLAGS += -Wno-format-nonliteral # WARNCFLAGS += -Wswitch-default -Wswitch-enum WARNCFLAGS += -Wuninitialized ifeq ($(findstring $(GCC_VERSION), 4),4) |
|
From: Stephen W. <sw...@ml...> - 2006-05-10 13:39:32
|
Switched from -Wformat=2 to -Wformat to remove spurious warning(s) about "format not a string literal". ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/Makefile ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Makefile =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2006-05-10 18:12:26 UTC (rev 4524) +++ mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2006-05-10 20:39:30 UTC (rev 4525) @@ -70,7 +70,9 @@ else WARNCFLAGS += -W endif -WARNCFLAGS += -Wformat=2 +# -Wformat=2 implies -Wformat-nonliteral, which causes spurious warnings. +# WARNCFLAGS += -Wformat=2 +WARNCFLAGS += -Wformat # WARNCFLAGS += -Wswitch-default -Wswitch-enum WARNCFLAGS += -Wuninitialized ifeq ($(findstring $(GCC_VERSION), 4),4) |
|
From: Wesley T. <we...@ml...> - 2006-05-10 11:12:27
|
not on mingw, and why use it as its only short-hard...
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/bytecode/interpret.c
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/bytecode/interpret.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bytecode/interpret.c 2006-05-10 18:09:24 UTC (rev 4523)
+++ mlton/branches/on-20050822-x86_64-branch/bytecode/interpret.c 2006-05-10 18:12:26 UTC (rev 4524)
@@ -351,7 +351,7 @@
#define disp(ty) \
for (i = 0; i < ty##RegI; ++i) \
fprintf (stderr, "\n" #ty "Reg[%d] = 0x%08x", \
- i, (uint)(ty##Reg[i]));
+ i, (unsigned int)(ty##Reg[i]));
void displayRegs () {
int i;
@@ -473,8 +473,8 @@
void MLton_Bytecode_interpret (Bytecode b, Word32 codeOffset) {
if (DEBUG or DEBUG_BYTECODE) {
fprintf (stderr, "MLton_Bytecode_interpret (0x%08x, %u)\n",
- (uint)b,
- (uint)codeOffset);
+ (unsigned int)b,
+ (unsigned int)codeOffset);
disassemble (b, codeOffset);
fprintf (stderr, "interpret starting\n");
}
|
|
From: Wesley T. <we...@ml...> - 2006-05-10 11:09:28
|
sufficient to get mingw runtime to compile
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.c
U mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.h
U mlton/branches/on-20050822-x86_64-branch/runtime/platform/windows.c
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.c 2006-05-10 16:44:52 UTC (rev 4522)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.c 2006-05-10 18:09:24 UTC (rev 4523)
@@ -16,7 +16,7 @@
Windows_release (base);
}
-Word32 GC_totalRam (GC_state s) {
+Word32 GC_totalRam (void) {
MEMORYSTATUS memStat;
memStat.dwLength = sizeof(memStat);
@@ -89,6 +89,7 @@
int setitimer (int which,
const struct itimerval *value,
struct itimerval *ovalue) {
+ // !!! perhaps used code from alarm?
die ("setitimer not implemented");
}
@@ -98,7 +99,7 @@
static struct rlimit rlimits[RLIM_NLIMITS];
-static void initRlimits () {
+static void initRlimits (void) {
static int done = FALSE;
int lim;
@@ -191,6 +192,13 @@
return _chmod (fname, mode);
}
+int fchdir (int filedes) {
+ char fname[MAX_PATH + 1];
+
+ GetWin32FileName (filedes, fname);
+ return chdir (fname);
+}
+
int chown (const char *path, uid_t owner, gid_t group) {
die ("chown not implemented");
}
@@ -213,14 +221,14 @@
}
int mkdir2 (const char *pathname, mode_t mode) {
- return mkdir (pathname);
+ return mkdir (pathname, mode);
}
int mkfifo (const char *pathname, mode_t mode) {
die ("mkfifo not implemented");
}
-long pathconf (char *path, int name) {
+long pathconf (const char *path, int name) {
die ("pathconf not implemented");
}
@@ -232,6 +240,20 @@
die ("symlink not implemented");
}
+int truncate (const char *path, off_t len) {
+ int fd;
+
+ if ((fd = open(path, O_RDWR)) == -1)
+ return -1;
+ if (ftruncate(fd, len) < 0) {
+ close(fd);
+ return -1;
+ }
+ close(fd);
+ return 0;
+}
+
+
/* ------------------------------------------------- */
/* Posix.IO */
/* ------------------------------------------------- */
@@ -245,29 +267,29 @@
}
int pipe (int filedes[2]) {
- HANDLE read;
- HANDLE write;
+ HANDLE read_h;
+ HANDLE write_h;
/* We pass no security attributes (0), so the current policy gets
* inherited. The pipe is set to NOT stay open in child processes.
* This will be corrected using DuplicateHandle in create()
* The 4k buffersize is choosen b/c that's what linux uses.
*/
- if (!CreatePipe(&read, &write, 0, 4096)) {
+ if (!CreatePipe(&read_h, &write_h, 0, 4096)) {
errno = ENOMEM; /* fake errno: out of resources */
return -1;
}
/* This requires Win98+
* Choosing text/binary mode is defered till a later setbin/text call
*/
- filedes[0] = _open_osfhandle((long)read, _O_RDONLY);
- filedes[1] = _open_osfhandle((long)write, _O_WRONLY);
+ filedes[0] = _open_osfhandle((long)read_h, _O_RDONLY);
+ filedes[1] = _open_osfhandle((long)write_h, _O_WRONLY);
if (filedes[0] == -1 or filedes[1] == -1) {
if (filedes[0] == -1)
- CloseHandle(read);
+ CloseHandle(read_h);
else close(filedes[0]);
if (filedes[1] == -1)
- CloseHandle(write);
+ CloseHandle(write_h);
else close(filedes[1]);
errno = ENFILE;
@@ -428,8 +450,9 @@
static int curr_timer_dur = 0;
static LARGE_INTEGER timer_start_val;
+
VOID CALLBACK alarm_signalled(HWND window, UINT message,
- UINT_PTR timer_id, DWORD time)
+ UINT_PTR timer_id, DWORD timestamp)
{
printf("Timer fired\n");
}
@@ -565,19 +588,24 @@
return (*set & SIGTOMASK(signum)) ? 1 : 0;
}
+
+/* With a bit of work and a redirected signal() function, we could
+ * probably emulate these methods properly. AtM blocking is a lie.
+ */
+static sigset_t signals_blocked = 0;
+static sigset_t signals_pending = 0;
+
int sigpending (sigset_t *set) {
- die ("sigpending not implemented");
+ *set = signals_pending;
+ return 0;
}
int sigprocmask (int how, const sigset_t *set, sigset_t *oldset) {
-
- sigset_t opmask;
-
if (oldset) {
- //*oldset = opmask;
+ *oldset = signals_blocked;
}
if (set) {
- sigset_t newmask = opmask;
+ sigset_t newmask = signals_blocked;
switch (how) {
case SIG_BLOCK:
@@ -595,24 +623,25 @@
default:
return -1;
}
- //(void) set_signal_mask (newmask, opmask);
+
+ signals_blocked = newmask;
}
return 0;
}
int sigsuspend (const sigset_t *mask) {
- die ("sigsuspend not implemented");
+ die("sigsuspend is unimplemented, but could be hacked in if needed");
}
/* ------------------------------------------------- */
/* Posix.IO */
/* ------------------------------------------------- */
-void Posix_IO_setbin (Fd fd) {
+void Posix_IO_setbin (C_Fd_t fd) {
_setmode (fd, _O_BINARY);
}
-void Posix_IO_settext (Fd fd) {
+void Posix_IO_settext (C_Fd_t fd) {
_setmode (fd, _O_TEXT);
}
@@ -707,7 +736,7 @@
/* Process */
/* ------------------------------------------------- */
-Pid MLton_Process_cwait (Pid pid, Pointer status) {
+C_PId_t MLton_Process_cwait (C_PId_t pid, Pointer status) {
HANDLE h;
h = (HANDLE)pid;
@@ -740,7 +769,7 @@
}
/* ------------------------------------------------- */
-/* Socket */
+/* Syslog */
/* ------------------------------------------------- */
static const char* logident = "<unknown>";
@@ -776,8 +805,8 @@
if ((logopt & LOG_PERROR) != 0) {
if ((logopt & LOG_PID) != 0)
- fprintf("%s(%d): %s: %s\n", logident, getpid(), severity[priority], msg);
+ fprintf(stderr, "%s(%d): %s: %s\n", logident, getpid(), severity[priority], msg);
else
- fprintf("%s: %s: %s\n", logident, severity[priority], msg);
+ fprintf(stderr, "%s: %s: %s\n", logident, severity[priority], msg);
}
}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.h 2006-05-10 16:44:52 UTC (rev 4522)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.h 2006-05-10 18:09:24 UTC (rev 4523)
@@ -12,6 +12,7 @@
#include <sys/types.h>
#include <winsock2.h>
#include <ws2tcpip.h>
+#include <psapi.h>
#undef max
#define HAS_FEROUND TRUE
@@ -58,6 +59,8 @@
#define F_SETFD 2
#define F_GETFL 3
#define F_SETFL 4
+#define F_GETOWN 5
+#define F_SETOWN 6
#define F_GETLK 7
#define F_SETLK 8
#define F_RDLCK 1
@@ -66,8 +69,6 @@
#define F_SETLKW 9
#define FD_CLOEXEC 1
-#define MSG_DONTWAIT 0
-
#define SHUT_RD SD_RECEIVE
#define SHUT_WR SD_SEND
#define SHUT_RDWR SD_BOTH
@@ -180,23 +181,35 @@
#define S_IXGRP 0000010
#define S_IXOTH 0000001
+// Do not exist in a windows filesystem
+#define S_IFLNK 0
+#define S_IFSOCK 0
+#define S_ISVTX 0
+
#define O_NOCTTY 0x8000
#define O_NONBLOCK 0x4000
+// Synchronized writes? Safety of any kind? ... and windows?! hell no!
+#define O_SYNC 0
+
#define S_ISLNK(m) FALSE
#define S_ISSOCK(m) FALSE
int chown (const char *path, uid_t owner, gid_t group);
int fchmod (int filedes, mode_t mode);
+int fchdir (int filedes);
int fchown (int fd, uid_t owner, gid_t group);
long fpathconf (int filedes, int name);
int link (const char *oldpath, const char *newpath);
int lstat (const char *file_name, struct stat *buf);
int mkfifo (const char *pathname, mode_t mode);
-long pathconf (char *path, int name);
+long pathconf (const char *path, int name);
int readlink (const char *path, char *buf, size_t bufsiz);
int symlink (const char *oldpath, const char *newpath);
+int truncate (const char *path, off_t len);
+#define mkdir(f, m) mkdir(f); chmod(f, m)
+
/* ------------------------------------------------- */
/* Posix.IO */
/* ------------------------------------------------- */
@@ -329,7 +342,7 @@
#define _NSIG 32
-typedef void (*_sig_func_ptr)(void);
+typedef __p_sig_fn_t _sig_func_ptr;
struct sigaction {
int sa_flags;
@@ -503,9 +516,18 @@
/* Socket */
/* ------------------------------------------------- */
+// Unimplemented on windows:
#define MSG_DONTWAIT 0
-#define UNIX_PATH_MAX 108
+#define MSG_WAITALL 0
+#define MSG_EOR 0
+#define MSG_CTRUNC 0
+// Has a different name:
+#define MSG_TRUNC MSG_PARTIAL
+
+
+#define UNIX_PATH_MAX 108
+
typedef unsigned short sa_family_t;
struct sockaddr_un {
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/windows.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/windows.c 2006-05-10 16:44:52 UTC (rev 4522)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/windows.c 2006-05-10 18:09:24 UTC (rev 4523)
@@ -1,10 +1,11 @@
HANDLE fileDesHandle (int fd);
-static void displayMaps () {
+
+static void displayMaps (void) {
MEMORY_BASIC_INFORMATION buf;
- LPCVOID lpAddress;
- char *state = "<unset>";
- char *protect = "<unset>";
+ LPVOID lpAddress;
+ const char *state = "<unset>";
+ const char *protect = "<unset>";
for (lpAddress = 0; lpAddress < (LPCVOID)0x80000000; ) {
VirtualQuery (lpAddress, &buf, sizeof (buf));
@@ -53,14 +54,14 @@
break;
}
fprintf(stderr, "0x%8x %10u %s %s\n",
- (uint)buf.BaseAddress,
- (uint)buf.RegionSize,
+ (unsigned int)buf.BaseAddress,
+ (unsigned int)buf.RegionSize,
state, protect);
- lpAddress += buf.RegionSize;
+ lpAddress = (unsigned char*)lpAddress + buf.RegionSize;
}
}
-void GC_displayMem () {
+void GC_displayMem (void) {
MEMORYSTATUS ms;
ms.dwLength = sizeof (MEMORYSTATUS);
@@ -72,7 +73,7 @@
ms.dwAvailPageFile,
ms.dwTotalVirtual,
ms.dwAvailVirtual);
- showMaps ();
+ displayMaps ();
}
static HANDLE dupHandle (int fd) {
@@ -181,7 +182,7 @@
return result;
}
-Int Windows_Process_terminate (Pid pid, Int sig) {
+C_Errno_t(C_Int_t) Windows_Process_terminate (C_PId_t pid, C_Signal_t sig) {
HANDLE h;
h = (HANDLE)pid;
|
|
From: Wesley T. <we...@ml...> - 2006-05-10 09:44:58
|
stub syslog functionality, ftruncate and getpid exist in mingw now
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.c
U mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.h
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.c 2006-05-10 16:04:44 UTC (rev 4521)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.c 2006-05-10 16:44:52 UTC (rev 4522)
@@ -165,7 +165,6 @@
/* Posix.FileSys */
/* ------------------------------------------------- */
-#if FALSE
static void GetWin32FileName (int fd, char* fname) {
HANDLE fh, fhmap;
DWORD fileSize, fileSizeHi;
@@ -184,18 +183,16 @@
}
return;
}
-#endif
-int chown (const char *path, uid_t owner, gid_t group) {
- die ("chown not implemented");
+int fchmod (int filedes, mode_t mode) {
+ char fname[MAX_PATH + 1];
+
+ GetWin32FileName (filedes, fname);
+ return _chmod (fname, mode);
}
-int fchmod (int filedes, mode_t mode) {
+int chown (const char *path, uid_t owner, gid_t group) {
die ("chown not implemented");
-// char fname[MAX_PATH + 1];
-//
-// GetWin32FileName (filedes, fname);
-// return _chmod (fname, mode);
}
int fchown (int fd, uid_t owner, gid_t group) {
@@ -206,10 +203,6 @@
die ("fpathconf not implemented");
}
-int ftruncate (int fd, off_t length) {
- return _chsize (fd, length);
-}
-
int link (const char *oldpath, const char *newpath) {
die ("link not implemented");
}
@@ -311,9 +304,6 @@
pid_t getpgrp(void) {
die ("getpgrp not implemented");
}
-pid_t getpid (void) {
- die ("getpid not implemented");
-}
pid_t getppid (void) {
die ("getppid not implemented");
}
@@ -748,3 +738,46 @@
WSAStartup (version, &wsaData);
}
}
+
+/* ------------------------------------------------- */
+/* Socket */
+/* ------------------------------------------------- */
+
+static const char* logident = "<unknown>";
+static int logopt = LOG_PERROR;
+static int logfacility = LOG_LOCAL0;
+
+void openlog(const char* ident, int opt, int facility) {
+ logident = ident;
+ logopt = logopt;
+ logfacility = facility;
+}
+
+void closelog(void) {
+}
+
+void syslog(int priority, const char* fmt, const char* msg) {
+ static const char* severity[] = {
+ "debug",
+ "informational",
+ "notice",
+ "warning",
+ "error",
+ "CRITICAL",
+ "ALERT",
+ "EMERGENCY"
+ };
+
+ if (priority < 0) priority = LOG_DEBUG;
+ if (priority > LOG_EMERG) priority = LOG_EMERG;
+
+
+ /* !!! Use ReportEvent to log with windows */
+
+ if ((logopt & LOG_PERROR) != 0) {
+ if ((logopt & LOG_PID) != 0)
+ fprintf("%s(%d): %s: %s\n", logident, getpid(), severity[priority], msg);
+ else
+ fprintf("%s: %s: %s\n", logident, severity[priority], msg);
+ }
+}
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.h 2006-05-10 16:04:44 UTC (rev 4521)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.h 2006-05-10 16:44:52 UTC (rev 4522)
@@ -34,7 +34,7 @@
// bullshit typedefs:
typedef int id_t; // waitid() doesn't exist on windows
-typedef short nfds_t; // poll() doesn't either
+typedef unsigned int nfds_t; // we have a fake poll() with this many fds
int getpagesize (void);
int mkstemp (char *template);
@@ -154,7 +154,7 @@
short revents;
};
-int poll (struct pollfd *ufds, unsigned int nfds, int timeout);
+int poll (struct pollfd *ufds, nfds_t nfds, int timeout);
/* ------------------------------------------------- */
/* Posix.Error */
@@ -520,33 +520,41 @@
/* Syslog */
/* ------------------------------------------------- */
-#define LOG_ALERT 0
-#define LOG_AUTHPRIV 0
-#define LOG_CONS 0
-#define LOG_CRIT 0
-#define LOG_CRON 0
-#define LOG_DAEMON 0
+#define LOG_EMERG 7
+#define LOG_ALERT 6
+#define LOG_CRIT 5
+#define LOG_ERR 4
+#define LOG_WARNING 3
+#define LOG_NOTICE 2
+#define LOG_INFO 1
#define LOG_DEBUG 0
-#define LOG_EMERG 0
-#define LOG_ERR 0
-#define LOG_INFO 0
-#define LOG_KERN 0
-#define LOG_LOCAL0 0
-#define LOG_LOCAL1 0
-#define LOG_LOCAL2 0
-#define LOG_LOCAL3 0
-#define LOG_LOCAL4 0
-#define LOG_LOCAL5 0
-#define LOG_LOCAL6 0
-#define LOG_LOCAL7 0
-#define LOG_LPR 0
-#define LOG_MAIL 0
-#define LOG_NDELAY 0
-#define LOG_NEWS 0
-#define LOG_NOTICE 0
-#define LOG_PERROR 0
-#define LOG_PID 0
-#define LOG_SYSLOG 0
-#define LOG_USER 0
-#define LOG_UUCP 0
-#define LOG_WARNING 0
+
+#define LOG_PID 0x01 /* include PID in output */
+#define LOG_CONS 0x02 /* dump to console (meaningless for windows?) */
+#define LOG_ODELAY 0x04 /* delay open; meaningless---always open */
+#define LOG_NDELAY 0x08 /* don't delay; meaningless */
+#define LOG_NOWAIT 0x10 /* ignored and obsolete anyways */
+#define LOG_PERROR 0x20 /* print to standard error, honoured */
+
+#define LOG_AUTH 1
+#define LOG_CRON 2
+#define LOG_DAEMON 3
+#define LOG_KERN 4
+#define LOG_LOCAL0 5
+#define LOG_LOCAL1 6
+#define LOG_LOCAL2 7
+#define LOG_LOCAL3 8
+#define LOG_LOCAL4 9
+#define LOG_LOCAL5 10
+#define LOG_LOCAL6 11
+#define LOG_LOCAL7 12
+#define LOG_LPR 13
+#define LOG_MAIL 14
+#define LOG_NEWS 15
+#define LOG_SYSLOG 16
+#define LOG_USER 17
+#define LOG_UUCP 18
+
+void openlog(const char* ident, int logopt, int facility);
+void closelog(void);
+void syslog(int priority, const char* fmt, const char* msg);
|
|
From: Wesley T. <we...@ml...> - 2006-05-10 09:04:45
|
The data is constant, the pointer not
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Process/spawnp.c
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Process/spawnp.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Process/spawnp.c 2006-05-10 16:04:17 UTC (rev 4520)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Process/spawnp.c 2006-05-10 16:04:44 UTC (rev 4521)
@@ -5,7 +5,7 @@
C_Errno_t(C_Int_t) MLton_Process_spawnp (NullString8_t p, NullString8Array_t a) {
const char *path;
const char *asaved;
- char **args;
+ const char **args;
int an;
int res;
|
|
From: Wesley T. <we...@ml...> - 2006-05-10 09:04:18
|
The GC uses a new name for this method ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Process/spawne.c ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Process/spawne.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Process/spawne.c 2006-05-10 15:17:45 UTC (rev 4519) +++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Process/spawne.c 2006-05-10 16:04:17 UTC (rev 4520) @@ -15,9 +15,9 @@ path = (const char *) p; args = (const char **) a; env = (const char **) e; - an = GC_arrayNumElements((pointer)a) - 1; + an = GC_getArrayLength((pointer)a) - 1; asaved = args[an]; - en = GC_arrayNumElements((pointer)e) - 1; + en = GC_getArrayLength((pointer)e) - 1; esaved = env[en]; args[an] = (const char *) NULL; env[en] = (const char *) NULL; |
|
From: Wesley T. <we...@ml...> - 2006-05-10 08:17:47
|
fixed for new GC api
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Process/spawnp.c
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Process/spawnp.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Process/spawnp.c 2006-05-10 15:13:52 UTC (rev 4518)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/Process/spawnp.c 2006-05-10 15:17:45 UTC (rev 4519)
@@ -3,21 +3,21 @@
#if HAS_SPAWN
C_Errno_t(C_Int_t) MLton_Process_spawnp (NullString8_t p, NullString8Array_t a) {
- const char *file;
+ const char *path;
const char *asaved;
- const char **args;
+ char **args;
int an;
int res;
path = (const char *) p;
args = (const char **) a;
- an = GC_arrayNumElements((pointer)a) - 1;
+ an = GC_getArrayLength((pointer)a) - 1;
asaved = args[an];
args[an] = (const char *) NULL;
- result = spawnvp (SPAWN_MODE, path,
+ res = spawnvp (SPAWN_MODE, path,
(const char * const *)args);
args[an] = asaved;
- return res;
+ return (C_Errno_t(C_Int_t))res;
}
#else
|
|
From: Wesley T. <we...@ml...> - 2006-05-10 08:13:53
|
provide all types needed by basis, remove obsolete/broken prototypes
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.h
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.h 2006-05-10 15:12:57 UTC (rev 4517)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.h 2006-05-10 15:13:52 UTC (rev 4518)
@@ -29,7 +29,13 @@
typedef unsigned short gid_t;
typedef unsigned short uid_t;
+typedef long suseconds_t; // type of timeval.tv_usec in sys/time.h
+typedef short nlink_t; // type of st_nlink in sys/stat.h
+// bullshit typedefs:
+typedef int id_t; // waitid() doesn't exist on windows
+typedef short nfds_t; // poll() doesn't either
+
int getpagesize (void);
int mkstemp (char *template);
@@ -184,7 +190,6 @@
int fchmod (int filedes, mode_t mode);
int fchown (int fd, uid_t owner, gid_t group);
long fpathconf (int filedes, int name);
-int ftruncate (int fd, off_t length);
int link (const char *oldpath, const char *newpath);
int lstat (const char *file_name, struct stat *buf);
int mkfifo (const char *pathname, mode_t mode);
@@ -244,7 +249,6 @@
char *getlogin (void);
pid_t getpgid(pid_t pid);
pid_t getpgrp(void);
-pid_t getpid (void);
pid_t getppid (void);
uid_t getuid (void);
int setenv (const char *name, const char *value, int overwrite);
@@ -325,7 +329,7 @@
#define _NSIG 32
-typedef void (*_sig_func_ptr)();
+typedef void (*_sig_func_ptr)(void);
struct sigaction {
int sa_flags;
|
|
From: Wesley T. <we...@ml...> - 2006-05-10 08:13:01
|
mingw doesn't have these headers; make them platform specific ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/cenv.h U mlton/branches/on-20050822-x86_64-branch/runtime/platform/freebsd.h U mlton/branches/on-20050822-x86_64-branch/runtime/platform/hpux.h U mlton/branches/on-20050822-x86_64-branch/runtime/platform/linux.h U mlton/branches/on-20050822-x86_64-branch/runtime/platform/netbsd.h U mlton/branches/on-20050822-x86_64-branch/runtime/platform/openbsd.h U mlton/branches/on-20050822-x86_64-branch/runtime/platform/solaris.h ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/runtime/cenv.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/cenv.h 2006-05-10 15:07:56 UTC (rev 4516) +++ mlton/branches/on-20050822-x86_64-branch/runtime/cenv.h 2006-05-10 15:12:57 UTC (rev 4517) @@ -60,10 +60,7 @@ #include <unistd.h> #include <dirent.h> -#include <poll.h> -#include <termios.h> #include <utime.h> -#include <sys/resource.h> #include <sys/stat.h> #include <sys/time.h> Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/freebsd.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform/freebsd.h 2006-05-10 15:07:56 UTC (rev 4516) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/freebsd.h 2006-05-10 15:12:57 UTC (rev 4517) @@ -8,6 +8,9 @@ #include <netinet/tcp.h> #include <netinet/udp.h> #include <pwd.h> +#include <poll.h> +#include <termios.h> +#include <sys/resource.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <sys/poll.h> Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/hpux.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform/hpux.h 2006-05-10 15:07:56 UTC (rev 4516) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/hpux.h 2006-05-10 15:12:57 UTC (rev 4517) @@ -5,6 +5,9 @@ #include <inttypes.h> #include <math.h> #include <signal.h> +#include <poll.h> +#include <termios.h> +#include <sys/resource.h> #include <sys/ptrace.h> #include <sys/poll.h> #include <sys/socket.h> Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/linux.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform/linux.h 2006-05-10 15:07:56 UTC (rev 4516) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/linux.h 2006-05-10 15:12:57 UTC (rev 4517) @@ -7,6 +7,9 @@ #include <netinet/tcp.h> #include <netinet/udp.h> #include <pwd.h> +#include <poll.h> +#include <termios.h> +#include <sys/resource.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <sys/poll.h> Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/netbsd.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform/netbsd.h 2006-05-10 15:07:56 UTC (rev 4516) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/netbsd.h 2006-05-10 15:12:57 UTC (rev 4517) @@ -6,6 +6,9 @@ #include <netinet/tcp.h> #include <netinet/udp.h> #include <pwd.h> +#include <poll.h> +#include <termios.h> +#include <sys/resource.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <sys/param.h> Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/openbsd.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform/openbsd.h 2006-05-10 15:07:56 UTC (rev 4516) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/openbsd.h 2006-05-10 15:12:57 UTC (rev 4517) @@ -5,6 +5,9 @@ #include <netinet/tcp.h> #include <netinet/udp.h> #include <pwd.h> +#include <poll.h> +#include <termios.h> +#include <sys/resource.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <sys/param.h> Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/solaris.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform/solaris.h 2006-05-10 15:07:56 UTC (rev 4516) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/solaris.h 2006-05-10 15:12:57 UTC (rev 4517) @@ -5,6 +5,9 @@ #include <netinet/udp.h> #include <pwd.h> #include <strings.h> +#include <poll.h> +#include <termios.h> +#include <sys/resource.h> #include <sys/filio.h> /* For FIONBIO, FIONREAD. */ #include <sys/ioctl.h> #include <sys/mman.h> |
|
From: Wesley T. <we...@ml...> - 2006-05-10 08:07:56
|
This rule gets re-run sometimes and fails because the source file is missing. ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/Makefile ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/Makefile =================================================================== --- mlton/branches/on-20050822-x86_64-branch/Makefile 2006-05-10 14:29:59 UTC (rev 4515) +++ mlton/branches/on-20050822-x86_64-branch/Makefile 2006-05-10 15:07:56 UTC (rev 4516) @@ -282,9 +282,9 @@ $(MAKE) -C runtime $(CP) include/*.h "$(INC)/" $(CP) runtime/*.a "$(LIB)/$(TARGET)/" - mv runtime/gen/c-types.sml \ + cp runtime/gen/c-types.sml \ basis-library/config/c/$(TARGET_ARCH)-$(TARGET_OS)/c-types.sml - mv runtime/gen/basis-ffi.sml \ + cp runtime/gen/basis-ffi.sml \ basis-library/primitive/basis-ffi.sml mkdir -p "$(INC)/gc" mkdir -p "$(INC)/util" |
|
From: Wesley T. <we...@ml...> - 2006-05-10 07:30:04
|
Systematically made the following changes to all shell script I found:
1. Quote path variables
"mkdir $x/bar" won't work if $x includes shell specials ("; '&...)
This happens in both shell scripts and Makefiles
2. Generally tried to remove `cmd` usage wherever possible
This breaks any filenames in the output. eg: `ls` is particularly
bad and will mess up file names with spaces in them. Consider:
for i in `ls`; do echo $i; done
for i in *; do echo $i; done
The first will print "foo\nbar\n" for a file "foo bar".
The second will correctly print "foo bar\n"
3. Changed handling of shell arguements which are passed through
Shell scripts had often broken appart and/or removed escapes.
This problem would also affect filenames, for example:
mlton @MLton cache="/Users/wes terpstra/cache" -- ...
would break the option appart into two distinct halves:
"/Users/wes
terpstra/cache"
The problem comes from the args="xxx $args" idiom.
To preserve these values, you can use bash arrays (man bash).
4. Potentially modified the behaviour of bin/regression
A comment previously stated:
# Must use $f.[0-9].[cS], not $f.*.[cS], because the
# latter will include other files, e.g. for finalize,
# it will also include finalize.2.
My testing shows this to be false. Furthermore, the work-around:
files="$f.[0-9].[cS]"
if [ 0 -ne `ls $f.[0-9][0-9].[cS] 2>/dev/null | wc -l` ]; then
files="$files $f.[0-9][0-9].[cS]"
fi
will break on a filename with spaces or shell specials.
The problem is again assigning a list to a string variable.
A way to do this correctly would've been:
files=($f.[0-9].[cS])
which creates a bash array with these values.
However, then concatenating a second bash array for the 'if' case
is a lot of work when a simpler solution is to use $f.*.[cS]
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/Makefile
U mlton/branches/on-20050822-x86_64-branch/basis-library/Makefile
U mlton/branches/on-20050822-x86_64-branch/benchmark/Makefile
U mlton/branches/on-20050822-x86_64-branch/benchmark/tests/Makefile
U mlton/branches/on-20050822-x86_64-branch/bin/add-cross
U mlton/branches/on-20050822-x86_64-branch/bin/build-cross-gcc
U mlton/branches/on-20050822-x86_64-branch/bin/clean
U mlton/branches/on-20050822-x86_64-branch/bin/grab-wiki
U mlton/branches/on-20050822-x86_64-branch/bin/host-arch
U mlton/branches/on-20050822-x86_64-branch/bin/host-os
U mlton/branches/on-20050822-x86_64-branch/bin/make-pdf-guide
U mlton/branches/on-20050822-x86_64-branch/bin/mlton-script
U mlton/branches/on-20050822-x86_64-branch/bin/mmake
U mlton/branches/on-20050822-x86_64-branch/bin/msed
U mlton/branches/on-20050822-x86_64-branch/bin/patch-mingw
U mlton/branches/on-20050822-x86_64-branch/bin/platform
U mlton/branches/on-20050822-x86_64-branch/bin/regression
U mlton/branches/on-20050822-x86_64-branch/bin/sync-ignore
U mlton/branches/on-20050822-x86_64-branch/bin/upgrade-basis
U mlton/branches/on-20050822-x86_64-branch/mllex/Makefile
U mlton/branches/on-20050822-x86_64-branch/mlnlffigen/Makefile
U mlton/branches/on-20050822-x86_64-branch/mlprof/Makefile
U mlton/branches/on-20050822-x86_64-branch/mlton/Makefile
U mlton/branches/on-20050822-x86_64-branch/mlyacc/Makefile
U mlton/branches/on-20050822-x86_64-branch/regression/Makefile
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/Makefile 2006-05-10 13:15:15 UTC (rev 4514)
+++ mlton/branches/on-20050822-x86_64-branch/Makefile 2006-05-10 14:29:59 UTC (rev 4515)
@@ -38,7 +38,7 @@
# If we're compiling with another version of MLton, then we want to do
# another round of compilation so that we get a MLton built without
# stubs.
-ifeq (other, $(shell if [ ! -x $(BIN)/mlton ]; then echo other; fi))
+ifeq (other, $(shell if [ ! -x "$(BIN)/mlton" ]; then echo other; fi))
BOOTSTRAP_OTHER=true
else
BOOTSTRAP_OTHER=false
@@ -59,19 +59,19 @@
# because they may be better than those that were used for the first
# round of compilation. So, we clean out the front end.
ifeq (true, $(BOOTSTRAP_OTHER))
- rm -f $(COMP)/$(AOUT)$(EXE)
- $(MAKE) -C $(COMP)/front-end clean
+ rm -f "$(COMP)/$(AOUT)$(EXE)"
+ $(MAKE) -C "$(COMP)/front-end" clean
endif
$(MAKE) compiler world
@echo 'Build of MLton succeeded.'
.PHONY: basis-no-check
basis-no-check:
- mkdir -p $(LIB)/sml
- rm -rf $(LIB)/sml/basis
- $(CP) $(SRC)/basis-library/. $(LIB)/sml/basis
- find $(LIB)/sml/basis -type d -name .svn | xargs rm -rf
- find $(LIB)/sml/basis -type f -name .ignore | xargs rm -rf
+ mkdir -p "$(LIB)/sml"
+ rm -rf "$(LIB)/sml/basis"
+ $(CP) "$(SRC)/basis-library/." "$(LIB)/sml/basis"
+ find "$(LIB)/sml/basis" -type d -name .svn | xargs rm -rf
+ find "$(LIB)/sml/basis" -type f -name .ignore | xargs rm -rf
.PHONY: basis
basis:
@@ -97,15 +97,15 @@
.PHONY: compiler
compiler:
- $(MAKE) -C $(COMP)
- $(CP) $(COMP)/$(AOUT)$(EXE) $(LIB)/
+ $(MAKE) -C "$(COMP)"
+ $(CP) "$(COMP)/$(AOUT)$(EXE)" "$(LIB)/"
.PHONY: constants
constants:
@echo 'Creating constants file.'
- $(BIN)/mlton -build-constants true >tmp.c
- $(BIN)/mlton -output tmp tmp.c
- ./tmp >$(LIB)/$(TARGET)/constants
+ "$(BIN)/mlton" -build-constants true >tmp.c
+ "$(BIN)/mlton" -output tmp tmp.c
+ ./tmp >"$(LIB)/$(TARGET)/constants"
rm -f tmp tmp.c
DEBSRC = mlton-$(VERSION).orig
@@ -146,12 +146,12 @@
.PHONY: dirs
dirs:
- mkdir -p $(BIN) $(LIB)/$(TARGET) $(INC)
+ mkdir -p "$(BIN)" "$(LIB)/$(TARGET)" "$(INC)"
.PHONY: docs
docs: dirs
- $(MAKE) -C $(LEX) docs
- $(MAKE) -C $(YACC) docs
+ $(MAKE) -C "$(LEX)" docs
+ $(MAKE) -C "$(YACC)" docs
if htmldoc --version >/dev/null 2>&1; then \
bin/make-pdf-guide; \
fi
@@ -160,31 +160,31 @@
.PHONY: freebsd
freebsd:
$(MAKE) clean clean-svn version
- rm -rf $(BSDSRC)
- mkdir -p $(BSDSRC)
- ( cd $(SRC) && tar -cpf - . ) | ( cd $(BSDSRC) && tar -xpf - )
+ rm -rf "$(BSDSRC)"
+ mkdir -p "$(BSDSRC)"
+ ( cd $(SRC) && tar -cpf - . ) | ( cd "$(BSDSRC)" && tar -xpf - )
cd /tmp && tar -cpf - mlton-$(VERSION) | \
$(GZIP) >/usr/ports/distfiles/mlton-$(VERSION)-$(RELEASE).freebsd.src.tgz
# do not change "make" to "$(MAKE)" in the following line
- cd $(BSDSRC)/package/freebsd && MAINTAINER_MODE=yes make build-package
+ cd "$(BSDSRC)/package/freebsd" && MAINTAINER_MODE=yes make build-package
LIBRARIES = ckit-lib cml mlnlffi-lib mlrisc-lib mlyacc-lib smlnj-lib
.PHONY: libraries-no-check
libraries-no-check:
- mkdir -p $(LIB)/sml
- cd $(LIB)/sml && rm -rf $(LIBRARIES)
- $(MAKE) -C $(SRC)/lib/ckit-lib
- $(MAKE) -C $(SRC)/lib/mlrisc-lib
- $(MAKE) -C $(SRC)/lib/smlnj-lib
- $(CP) $(SRC)/lib/cml/. $(LIB)/sml/cml
- $(CP) $(SRC)/lib/ckit-lib/ckit/. $(LIB)/sml/ckit-lib
- $(CP) $(SRC)/lib/mlnlffi/. $(LIB)/sml/mlnlffi-lib
- $(CP) $(SRC)/lib/mlrisc-lib/MLRISC/. $(LIB)/sml/mlrisc-lib
- $(CP) $(SRC)/lib/mlyacc/. $(LIB)/sml/mlyacc-lib
- $(CP) $(SRC)/lib/smlnj-lib/smlnj-lib/. $(LIB)/sml/smlnj-lib
- find $(LIB)/sml -type d -name .svn | xargs rm -rf
- find $(LIB)/sml -type f -name .ignore | xargs rm -rf
+ mkdir -p "$(LIB)/sml"
+ cd "$(LIB)/sml" && rm -rf $(LIBRARIES)
+ $(MAKE) -C "$(SRC)/lib/ckit-lib"
+ $(MAKE) -C "$(SRC)/lib/mlrisc-lib"
+ $(MAKE) -C "$(SRC)/lib/smlnj-lib"
+ $(CP) "$(SRC)/lib/cml/." "$(LIB)/sml/cml"
+ $(CP) "$(SRC)/lib/ckit-lib/ckit/." "$(LIB)/sml/ckit-lib"
+ $(CP) "$(SRC)/lib/mlnlffi/." "$(LIB)/sml/mlnlffi-lib"
+ $(CP) "$(SRC)/lib/mlrisc-lib/MLRISC/." "$(LIB)/sml/mlrisc-lib"
+ $(CP) "$(SRC)/lib/mlyacc/." "$(LIB)/sml/mlyacc-lib"
+ $(CP) "$(SRC)/lib/smlnj-lib/smlnj-lib/." "$(LIB)/sml/smlnj-lib"
+ find "$(LIB)/sml" -type d -name .svn | xargs rm -rf
+ find "$(LIB)/sml" -type f -name .ignore | xargs rm -rf
.PHONY: libraries
libraries:
@@ -200,158 +200,158 @@
.PHONY: nj-mlton
nj-mlton:
$(MAKE) dirs runtime
- $(MAKE) -C $(COMP) nj-mlton
+ $(MAKE) -C "$(COMP)" nj-mlton
$(MAKE) script basis-no-check mlbpathmap targetmap constants libraries-no-check
@echo 'Build of MLton succeeded.'
.PHONY: nj-mlton-dual
nj-mlton-dual:
$(MAKE) dirs runtime
- $(MAKE) -C $(COMP) nj-mlton-dual
+ $(MAKE) -C "$(COMP)" nj-mlton-dual
$(MAKE) script basis-no-check mlbpathmap targetmap constants libraries-no-check
@echo 'Build of MLton succeeded.'
.PHONY: nj-mlton-quad
nj-mlton-quad:
$(MAKE) dirs runtime
- $(MAKE) -C $(COMP) nj-mlton-quad
+ $(MAKE) -C "$(COMP)" nj-mlton-quad
$(MAKE) script basis-no-check mlbpathmap targetmap constants libraries-no-check
@echo 'Build of MLton succeeded.'
.PHONY: mlbpathmap
mlbpathmap:
- touch $(MLBPATHMAP)
+ touch "$(MLBPATHMAP)"
( echo 'MLTON_ROOT $$(LIB_MLTON_DIR)/sml'; \
echo 'SML_LIB $$(LIB_MLTON_DIR)/sml'; ) \
- >>$(MLBPATHMAP).tmp
- mv $(MLBPATHMAP).tmp $(MLBPATHMAP)
+ >>"$(MLBPATHMAP).tmp"
+ mv "$(MLBPATHMAP).tmp" "$(MLBPATHMAP)"
.PHONY: traced
traced:
- $(MAKE) -C $(COMP) AOUT=$(AOUT).trace COMPILE_ARGS="-const 'Exn.keepHistory true' -const 'MLton.debug true' -drop-pass 'deepFlatten'"
- $(CP) $(COMP)/$(AOUT).trace $(LIB)/
- $(LIB)/$(AOUT).trace @MLton -- $(LIB)/world.trace
- sed 's/mlton-compile/mlton-compile.trace/' < $(MLTON) | sed 's/world.mlton/world.trace.mlton/' > $(MLTON).trace
- chmod a+x $(MLTON).trace
+ $(MAKE) -C "$(COMP)" "AOUT=$(AOUT).trace" COMPILE_ARGS="-const 'Exn.keepHistory true' -const 'MLton.debug true' -drop-pass 'deepFlatten'"
+ $(CP) "$(COMP)/$(AOUT).trace" "$(LIB)/"
+ "$(LIB)/$(AOUT).trace" @MLton -- "$(LIB)/world.trace"
+ sed 's/mlton-compile/mlton-compile.trace/' < "$(MLTON)" | sed 's/world.mlton/world.trace.mlton/' > "$(MLTON).trace"
+ chmod a+x "$(MLTON).trace"
.PHONY: debugged
debugged:
- $(MAKE) -C $(COMP) AOUT=$(AOUT).debug COMPILE_ARGS="-debug true -const 'Exn.keepHistory true' -const 'MLton.debug true' -drop-pass 'deepFlatten'"
- $(CP) $(COMP)/$(AOUT).debug $(LIB)/
- $(LIB)/$(AOUT).debug @MLton -- $(LIB)/world.debug
- sed 's/mlton-compile/mlton-compile.debug/' < $(MLTON) | sed 's/world.mlton/world.debug.mlton/' > $(MLTON).debug
- chmod a+x $(MLTON).debug
+ $(MAKE) -C "$(COMP)" "AOUT=$(AOUT).debug" COMPILE_ARGS="-debug true -const 'Exn.keepHistory true' -const 'MLton.debug true' -drop-pass 'deepFlatten'"
+ $(CP) "$(COMP)/$(AOUT).debug" "$(LIB)/"
+ "$(LIB)/$(AOUT).debug" @MLton -- "$(LIB)/world.debug"
+ sed 's/mlton-compile/mlton-compile.debug/' < "$(MLTON)" | sed 's/world.mlton/world.debug.mlton/' > "$(MLTON).debug"
+ chmod a+x "$(MLTON).debug"
.PHONY: profiled
profiled:
- $(MAKE) -C $(COMP) AOUT=$(AOUT).alloc COMPILE_ARGS="-profile alloc"
- $(CP) $(COMP)/$(AOUT).alloc $(LIB)/
- $(MAKE) -C $(COMP) AOUT=$(AOUT).count COMPILE_ARGS="-profile count"
- $(CP) $(COMP)/$(AOUT).count $(LIB)/
- $(MAKE) -C $(COMP) AOUT=$(AOUT).time COMPILE_ARGS="-profile time"
- $(CP) $(COMP)/$(AOUT).time $(LIB)/
- $(LIB)/$(AOUT).alloc @MLton -- $(LIB)/world.alloc
- $(LIB)/$(AOUT).count @MLton -- $(LIB)/world.count
- $(LIB)/$(AOUT).time @MLton -- $(LIB)/world.time
- sed 's/mlton-compile/mlton-compile.alloc/' < $(MLTON) | sed 's/world.mlton/world.alloc.mlton/' > $(MLTON).alloc
- sed 's/mlton-compile/mlton-compile.count/' < $(MLTON) | sed 's/world.mlton/world.count.mlton/' > $(MLTON).count
- sed 's/mlton-compile/mlton-compile.time/' < $(MLTON) | sed 's/world.mlton/world.time.mlton/' > $(MLTON).time
- chmod a+x $(MLTON).alloc
- chmod a+x $(MLTON).count
- chmod a+x $(MLTON).time
+ $(MAKE) -C "$(COMP)" "AOUT=$(AOUT).alloc" COMPILE_ARGS="-profile alloc"
+ $(CP) "$(COMP)/$(AOUT).alloc" "$(LIB)/"
+ $(MAKE) -C "$(COMP)" "AOUT=$(AOUT).count" COMPILE_ARGS="-profile count"
+ $(CP) "$(COMP)/$(AOUT).count" "$(LIB)/"
+ $(MAKE) -C "$(COMP)" "AOUT=$(AOUT).time" COMPILE_ARGS="-profile time"
+ $(CP) "$(COMP)/$(AOUT).time" "$(LIB)/"
+ "$(LIB)/$(AOUT).alloc" @MLton -- "$(LIB)/world.alloc"
+ "$(LIB)/$(AOUT).count" @MLton -- "$(LIB)/world.count"
+ "$(LIB)/$(AOUT).time" @MLton -- "$(LIB)/world.time"
+ sed 's/mlton-compile/mlton-compile.alloc/' < "$(MLTON)" | sed 's/world.mlton/world.alloc.mlton/' > "$(MLTON).alloc"
+ sed 's/mlton-compile/mlton-compile.count/' < "$(MLTON)" | sed 's/world.mlton/world.count.mlton/' > "$(MLTON).count"
+ sed 's/mlton-compile/mlton-compile.time/' < "$(MLTON)" | sed 's/world.mlton/world.time.mlton/' > "$(MLTON).time"
+ chmod a+x "$(MLTON).alloc"
+ chmod a+x "$(MLTON).count"
+ chmod a+x "$(MLTON).time"
TOPDIR = 'TOPDIR-unset'
SOURCEDIR = $(TOPDIR)/SOURCES/mlton-$(VERSION)
.PHONY: rpms
rpms:
$(MAKE) clean clean-svn version
- mkdir -p $(TOPDIR)
- cd $(TOPDIR) && mkdir -p BUILD RPMS/i386 SOURCES SPECS SRPMS
- rm -rf $(SOURCEDIR)
- mkdir -p $(SOURCEDIR)
- ( cd $(SRC) && tar -cpf - . ) | ( cd $(SOURCEDIR) && tar -xpf - )
- $(CP) $(SOURCEDIR)/$(SPEC) $(TOPDIR)/SPECS/mlton.spec
- ( cd $(TOPDIR)/SOURCES && tar -cpf - mlton-$(VERSION) ) \
- | $(GZIP) >$(SOURCEDIR).tgz
- rm -rf $(SOURCEDIR)
- rpm -ba --quiet --clean $(TOPDIR)/SPECS/mlton.spec
+ mkdir -p "$(TOPDIR)"
+ cd "$(TOPDIR)" && mkdir -p BUILD RPMS/i386 SOURCES SPECS SRPMS
+ rm -rf "$(SOURCEDIR)"
+ mkdir -p "$(SOURCEDIR)"
+ ( cd "$(SRC)" && tar -cpf - . ) | ( cd "$(SOURCEDIR)" && tar -xpf - )
+ $(CP) "$(SOURCEDIR)/$(SPEC)" "$(TOPDIR)/SPECS/mlton.spec"
+ ( cd "$(TOPDIR)/SOURCES" && tar -cpf - mlton-$(VERSION) ) \
+ | $(GZIP) >"$(SOURCEDIR).tgz"
+ rm -rf "$(SOURCEDIR)"
+ rpm -ba --quiet --clean "$(TOPDIR)/SPECS/mlton.spec"
.PHONY: runtime
runtime:
@echo 'Compiling MLton runtime system for $(TARGET).'
$(MAKE) -C runtime
- $(CP) include/*.h $(INC)/
- $(CP) runtime/*.a $(LIB)/$(TARGET)/
+ $(CP) include/*.h "$(INC)/"
+ $(CP) runtime/*.a "$(LIB)/$(TARGET)/"
mv runtime/gen/c-types.sml \
basis-library/config/c/$(TARGET_ARCH)-$(TARGET_OS)/c-types.sml
mv runtime/gen/basis-ffi.sml \
basis-library/primitive/basis-ffi.sml
- mkdir -p $(INC)/gc
- mkdir -p $(INC)/util
- mkdir -p $(INC)/platform
- $(CP) runtime/*.h $(INC)/
- $(CP) runtime/gc/*.h $(INC)/gc
- $(CP) runtime/util/*.h $(INC)/util
- $(CP) runtime/platform/*.h $(INC)/platform
- $(CP) bytecode/interpret.h $(INC)
+ mkdir -p "$(INC)/gc"
+ mkdir -p "$(INC)/util"
+ mkdir -p "$(INC)/platform"
+ $(CP) runtime/*.h "$(INC)/"
+ $(CP) runtime/gc/*.h "$(INC)/gc"
+ $(CP) runtime/util/*.h "$(INC)/util"
+ $(CP) runtime/platform/*.h "$(INC)/platform"
+ $(CP) bytecode/interpret.h "$(INC)"
$(MAKE) -C bytecode
- bytecode/print-opcodes >$(LIB)/opcodes
- ar r $(LIB)/$(TARGET)/libmlton.a bytecode/interpret.o
- ar r $(LIB)/$(TARGET)/libmlton-gdb.a bytecode/interpret-gdb.o
- for x in $(LIB)/$(TARGET)/*.a; do $(RANLIB) $$x; done
+ bytecode/print-opcodes >"$(LIB)/opcodes"
+ ar r "$(LIB)/$(TARGET)/libmlton.a" bytecode/interpret.o
+ ar r "$(LIB)/$(TARGET)/libmlton-gdb.a" bytecode/interpret-gdb.o
+ for x in "$(LIB)"/"$(TARGET)"/*.a; do $(RANLIB) "$$x"; done
.PHONY: script
script:
- $(CP) bin/mlton-script $(MLTON)
- chmod a+x $(MLTON)
- $(CP) $(SRC)/bin/platform $(LIB)
+ $(CP) bin/mlton-script "$(MLTON)"
+ chmod a+x "$(MLTON)"
+ $(CP) "$(SRC)/bin/platform" "$(LIB)"
.PHONY: targetmap
targetmap:
- touch $(TARGETMAP)
- ( sed '/$(TARGET)/d' <$(TARGETMAP); \
+ touch "$(TARGETMAP)"
+ ( sed '/$(TARGET)/d' <"$(TARGETMAP)"; \
echo '$(TARGET) $(TARGET_ARCH) $(TARGET_OS)' ) \
- >>$(TARGETMAP).tmp
- mv $(TARGETMAP).tmp $(TARGETMAP)
+ >>"$(TARGETMAP).tmp"
+ mv "$(TARGETMAP).tmp" "$(TARGETMAP)"
.PHONY: tools
tools:
- $(MAKE) -C $(LEX)
- $(MAKE) -C $(NLFFIGEN)
- $(MAKE) -C $(PROF)
- $(MAKE) -C $(YACC)
- $(CP) $(LEX)/$(LEX)$(EXE) \
- $(NLFFIGEN)/$(NLFFIGEN)$(EXE) \
- $(PROF)/$(PROF)$(EXE) \
- $(YACC)/$(YACC)$(EXE) \
- $(BIN)/
+ $(MAKE) -C "$(LEX)"
+ $(MAKE) -C "$(NLFFIGEN)"
+ $(MAKE) -C "$(PROF)"
+ $(MAKE) -C "$(YACC)"
+ $(CP) "$(LEX)/$(LEX)$(EXE)" \
+ "$(NLFFIGEN)/$(NLFFIGEN)$(EXE)" \
+ "$(PROF)/$(PROF)$(EXE)" \
+ "$(YACC)/$(YACC)$(EXE)" \
+ "$(BIN)/"
.PHONY: version
version:
@echo 'Instantiating version numbers.'
for f in \
package/debian/changelog \
- $(SPEC) \
+ "$(SPEC)" \
package/freebsd/Makefile \
mlton/control/control-flags.sml; \
do \
- sed "s/\(.*\)MLTONVERSION\(.*\)/\1$(VERSION)\2/" <$$f >z && \
- mv z $$f; \
+ sed "s/\(.*\)MLTONVERSION\(.*\)/\1$(VERSION)\2/" <"$$f" >z && \
+ mv z "$$f"; \
done
- sed <$(SPEC) >z "/^Release:/s;.*;Release: $(RELEASE);"
- mv z $(SPEC)
+ sed <"$(SPEC)" >z "/^Release:/s;.*;Release: $(RELEASE);"
+ mv z "$(SPEC)"
.PHONY: world-no-check
world-no-check:
@echo 'Making world.'
$(MAKE) basis-no-check
- $(LIB)/$(AOUT)$(EXE) @MLton -- $(LIB)/world
+ "$(LIB)/$(AOUT)$(EXE)" @MLton -- "$(LIB)/world"
.PHONY: world
world:
$(MAKE) world-no-check
@echo 'Type checking basis.'
- $(MLTON) -disable-ann deadCode \
+ "$(MLTON)" -disable-ann deadCode \
-stop tc \
'$$(SML_LIB)/basis/libs/all.mlb' \
>/dev/null
@@ -405,65 +405,65 @@
.PHONY: install-no-docs
install-no-docs:
- mkdir -p $(TLIB) $(TBIN) $(TMAN)
- $(CP) $(LIB)/. $(TLIB)/
- rm -f $(TLIB)/self/libmlton-gdb.a
+ mkdir -p "$(TLIB)" "$(TBIN)" "$(TMAN)"
+ $(CP) "$(LIB)/." "$(TLIB)/"
+ rm -f "$(TLIB)/self/libmlton-gdb.a"
sed "/^lib=/s;.*;lib='$(prefix)/$(ULIB)';" \
- <$(SRC)/bin/mlton-script >$(TBIN)/mlton
- chmod a+x $(TBIN)/mlton
- cd $(BIN) && $(CP) $(LEX)$(EXE) $(NLFFIGEN)$(EXE) \
- $(PROF)$(EXE) $(YACC)$(EXE) $(TBIN)/
- ( cd $(SRC)/man && tar cf - $(MAN_PAGES)) | \
- ( cd $(TMAN)/ && tar xf - )
+ <"$(SRC)/bin/mlton-script" >"$(TBIN)/mlton"
+ chmod a+x "$(TBIN)/mlton"
+ cd "$(BIN)" && $(CP) "$(LEX)$(EXE)" "$(NLFFIGEN)$(EXE)" \
+ "$(PROF)$(EXE)" "$(YACC)$(EXE)" "$(TBIN)/"
+ ( cd "$(SRC)/man" && tar cf - $(MAN_PAGES)) | \
+ ( cd "$(TMAN)/" && tar xf - )
if $(GZIP_MAN); then \
- cd $(TMAN) && $(GZIP) $(MAN_PAGES); \
+ cd "$(TMAN)" && $(GZIP) $(MAN_PAGES); \
fi
case "$(TARGET_OS)" in \
cygwin|darwin|solaris) \
;; \
*) \
- for f in $(TLIB)/$(AOUT)$(EXE) $(TBIN)/$(LEX)$(EXE) \
- $(TBIN)/$(NLFFIGEN)$(EXE) $(TBIN)/$(PROF)$(EXE) \
- $(TBIN)/$(YACC)$(EXE); do \
+ for f in "$(TLIB)/$(AOUT)$(EXE)" "$(TBIN)/$(LEX)$(EXE)" \
+ "$(TBIN)/$(NLFFIGEN)$(EXE)" "$(TBIN)/$(PROF)$(EXE)" \
+ "$(TBIN)/$(YACC)$(EXE)"; do \
strip --remove-section=.comment \
- --remove-section=.note $$f; \
+ --remove-section=.note "$$f"; \
done \
esac
.PHONY: install-docs
install-docs:
- mkdir -p $(TDOC)
+ mkdir -p "$(TDOC)"
( \
- cd $(SRC)/doc && \
- $(CP) changelog examples guide license README $(TDOC)/ \
+ cd "$(SRC)/doc" && \
+ $(CP) changelog examples guide license README "$(TDOC)/" \
)
- mv $(TDOC)/guide/mlton-guide.pdf $(TDOC)/
+ mv "$(TDOC)/guide/mlton-guide.pdf" "$(TDOC)/"
( \
- cd $(SRC)/util && \
- $(CP) cmcat cm2mlb $(TDOC)/ \
+ cd "$(SRC)/util" && \
+ $(CP) cmcat cm2mlb "$(TDOC)/" \
)
for f in callcc command-line hello-world same-fringe signals \
size taut thread1 thread2 thread-switch timeout \
; do \
- $(CP) $(SRC)/regression/$$f.sml $(TEXM)/; \
+ $(CP) "$(SRC)/regression/$$f.sml" "$(TEXM)/"; \
done
- $(GZIP) -c $(LEX)/$(LEX).ps >$(TDOC)/$(LEX).ps.gz
- $(GZIP) -c $(YACC)/$(YACC).ps >$(TDOC)/$(YACC).ps.gz
- find $(TDOC)/ -name .svn -type d | xargs rm -rf
- find $(TDOC)/ -name .ignore -type f | xargs rm -rf
- find $(TEXM)/ -name .svn -type d | xargs rm -rf
- find $(TEXM)/ -name .ignore -type f | xargs rm -rf
+ $(GZIP) -c "$(LEX)/$(LEX).ps" >"$(TDOC)/$(LEX).ps.gz"
+ $(GZIP) -c "$(YACC)/$(YACC).ps" >"$(TDOC)/$(YACC).ps.gz"
+ find "$(TDOC)/" -name .svn -type d | xargs rm -rf
+ find "$(TDOC)/" -name .ignore -type f | xargs rm -rf
+ find "$(TEXM)/" -name .svn -type d | xargs rm -rf
+ find "$(TEXM)/" -name .ignore -type f | xargs rm -rf
TDOCBASE = $(DESTDIR)$(prefix)/share/doc-base
.PHONY: post-install-debian
post-install-debian:
- cd $(TDOC)/ && rm -rf license
- $(CP) $(SRC)/debian/copyright $(SRC)/debian/README.Debian $(TDOC)/
- $(CP) $(SRC)/debian/changelog $(TDOC)/changelog.Debian
+ cd "$(TDOC)/" && rm -rf license
+ $(CP) "$(SRC)/debian/copyright" "$(SRC)/debian/README.Debian" "$(TDOC)/"
+ $(CP) "$(SRC)/debian/changelog" "$(TDOC)/changelog.Debian"
mkdir -p $(TDOCBASE)
for f in mllex mlton mlyacc; do \
- $(CP) $(SRC)/debian/$$f.doc-base $(TDOCBASE)/$$f; \
+ $(CP) "$(SRC)/debian/$$f.doc-base" "$(TDOCBASE)/$$f"; \
done
- cd $(TDOC)/ && $(GZIP) changelog changelog.Debian
- chown -R root.root $(TDOC) $(TLIB)
+ cd "$(TDOC)/" && $(GZIP) changelog changelog.Debian
+ chown -R root.root "$(TDOC)" "$(TLIB)"
Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/Makefile 2006-05-10 13:15:15 UTC (rev 4514)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/Makefile 2006-05-10 14:29:59 UTC (rev 4515)
@@ -32,7 +32,7 @@
.PHONY: type-check-def
type-check-def:
- $(MLTON) -disable-ann deadCode -stop tc -show-types true \
+ "$(MLTON)" -disable-ann deadCode -stop tc -show-types true \
libs/all.mlb; \
.PHONY: type-check-all
@@ -50,7 +50,7 @@
break; \
fi; \
echo "Type checking: $$objptrrep $$header $$seqindex $$targetarch $$targetos $$defchar $$defint $$defreal $$defword"; \
- $(MLTON) -disable-ann deadCode -stop tc -show-types true \
+ "$(MLTON)" -disable-ann deadCode -stop tc -show-types true \
-mlb-path-map "maps/$$objptrrep" \
-mlb-path-map "maps/$$header" \
-mlb-path-map "maps/$$seqindex" \
Modified: mlton/branches/on-20050822-x86_64-branch/benchmark/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/benchmark/Makefile 2006-05-10 13:15:15 UTC (rev 4514)
+++ mlton/branches/on-20050822-x86_64-branch/benchmark/Makefile 2006-05-10 14:29:59 UTC (rev 4515)
@@ -20,11 +20,11 @@
all: $(NAME)
-$(NAME): $(NAME).mlb $(shell PATH=$(BIN):$$PATH && $(MLTON) -stop f $(NAME).mlb)
+$(NAME): $(NAME).mlb $(shell PATH="$(BIN):$$PATH" && "$(MLTON)" -stop f $(NAME).mlb)
@echo 'Compiling $(NAME)'
- $(MLTON) $(FLAGS) $(NAME).mlb
+ "$(MLTON)" $(FLAGS) $(NAME).mlb
-$(NAME).sml: $(NAME).cm $(shell $(MLTON) -stop f $(NAME).cm)
+$(NAME).sml: $(NAME).cm $(shell "$(MLTON)" -stop f $(NAME).cm)
mlton -stop sml $(NAME).cm
.PHONY: clean
@@ -56,4 +56,4 @@
.PHONY: qtest
qtest: $(NAME)
- export PATH=$(PATH):$$PATH && cd tests && ../benchmark $(QBFLAGS) $(QBENCH) && $(MAKE) clean
+ export PATH="$(PATH):$$PATH" && cd tests && ../benchmark $(QBFLAGS) $(QBENCH) && $(MAKE) clean
Modified: mlton/branches/on-20050822-x86_64-branch/benchmark/tests/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/benchmark/tests/Makefile 2006-05-10 13:15:15 UTC (rev 4514)
+++ mlton/branches/on-20050822-x86_64-branch/benchmark/tests/Makefile 2006-05-10 14:29:59 UTC (rev 4515)
@@ -12,8 +12,8 @@
clean:
../../bin/clean
rm -f *.c *.s
- for f in `ls`; do \
- if [ -x $$f -a ! -d $$f ]; then \
- rm -f $$f; \
+ for f in *; do \
+ if [ -x "$$f" -a ! -d "$$f" ]; then \
+ rm -f "$$f"; \
fi; \
done
Modified: mlton/branches/on-20050822-x86_64-branch/bin/add-cross
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bin/add-cross 2006-05-10 13:15:15 UTC (rev 4514)
+++ mlton/branches/on-20050822-x86_64-branch/bin/add-cross 2006-05-10 14:29:59 UTC (rev 4515)
@@ -54,10 +54,10 @@
;;
esac
-name=`basename $0`
+name=`basename "$0"`
original=`pwd`
-dir=`dirname $0`
-src=`cd $dir/.. && pwd`
+dir=`dirname "$0"`
+src=`cd "$dir/.." && pwd`
PATH="$dir":$PATH
@@ -75,17 +75,17 @@
tmp='/tmp/mlton-add-cross'
-( cd $src && mmake dirs )
+( cd "$src" && mmake dirs )
ssh $machine "rm -rf $tmp && mkdir $tmp"
echo 'Making runtime.'
-( cd $src && tar cf - bin runtime ) |
+( cd "$src" && tar cf - bin runtime ) |
ssh $machine "cd $tmp && tar xf - && cd runtime &&
../bin/mmake COMPILE_FAST=yes TARGET_ARCH=$crossArch TARGET_OS=$crossOS clean all"
ssh $machine "cd $tmp/runtime && tar cf - *.a" |
- ( cd $lib/$crossTarget && tar xf - )
-( cd $src &&
+ ( cd "$lib/$crossTarget" && tar xf - )
+( cd "$src" &&
mmake TARGET=$crossTarget TARGET_ARCH=$crossArch TARGET_OS=$crossOS \
mlbpathmap targetmap )
@@ -109,8 +109,8 @@
exe='print-constants'
echo "Compiling and running print-constants on $machine."
-cd $original
-$src/build/bin/mlton -build-constants true |
+cd "$original"
+"$src/build/bin/mlton" -build-constants true |
ssh $machine "cd $tmp/runtime &&
cat >$exe.c &&
gcc -I. -o $exe $exe.c libmlton.a libgdtoa.a -lgmp -lm $libs"
Modified: mlton/branches/on-20050822-x86_64-branch/bin/build-cross-gcc
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bin/build-cross-gcc 2006-05-10 13:15:15 UTC (rev 4514)
+++ mlton/branches/on-20050822-x86_64-branch/bin/build-cross-gcc 2006-05-10 14:29:59 UTC (rev 4515)
@@ -28,7 +28,7 @@
}
root=`pwd`
-name=`basename $0`
+name=`basename "$0"`
usage () {
die "usage: $name {cygwin|mingw|sun}"
@@ -101,7 +101,7 @@
die "Must create $prefix/$target/{include,lib}."
fi
# The GCC tools expect limits.h to be in sys-include, not include.
- ( cd $prefix/$target &&
+ ( cd "$prefix/$target" &&
mkdir -p sys-include &&
mv include/limits.h sys-include )
;;
@@ -121,57 +121,57 @@
exists $cygwin.tar
exists $w32api.tar
echo 'Copying include files and libraries needed by cross compiler.'
- cd $root
+ cd "$root"
mkdir -p cygwin
cd cygwin
tar x <../$cygwin.tar
tar x <../$w32api.tar
- mkdir -p $prefix/$target ||
+ mkdir -p "$prefix/$target" ||
die "Cannot create $prefix/$target."
- (cd usr && tar c include lib) | (cd $prefix/$target/ && tar x)
+ (cd usr && tar c include lib) | (cd "$prefix/$target/" && tar x)
;;
mingw)
exists $mingw.tar
exists $w32api.tar
echo 'Copying include files and libraries needed by cross compiler.'
- cd $root
+ cd "$root"
mkdir -p mingw
cd mingw
tar x <../$mingw.tar
tar x <../$w32api.tar
- mkdir -p $prefix/$target ||
+ mkdir -p "$prefix/$target" ||
die "Cannot create $prefix/$target."
- (tar c include lib) | (cd $prefix/$target/ && tar x)
+ (tar c include lib) | (cd "$prefix/$target/" && tar x)
;;
*)
;;
esac
echo 'Building binutils.'
-cd $root
-if [ ! -d $binutils ]; then
+cd "$root"
+if [ ! -d "$binutils" ]; then
tar x <$binutils.tar
fi
mkdir -p build-binutils
cd build-binutils
-../$binutils/configure --prefix=$prefix --target=$target \
- >$root/configure-binutils-log 2>&1 ||
+"../$binutils/configure" "--prefix=$prefix" "--target=$target" \
+ >"$root/configure-binutils-log" 2>&1 ||
die "Configure of binutils failed."
-make all install >$root/build-binutils-log 2>&1 ||
+make all install >"$root/build-binutils-log" 2>&1 ||
die "Build of binutils failed."
echo 'Building gcc.'
-cd $root
-tar x <$gccTar
+cd "$root"
+tar x <"$gccTar"
mkdir -p build-gcc
cd build-gcc
-eval ../gcc-$gccVers/configure -v $configureGCCFlags \
+eval "../gcc-$gccVers/configure" -v $configureGCCFlags \
--enable-languages=c \
- --prefix=$prefix \
- --target=$target \
- >$root/configure-gcc-log 2>&1 ||
+ "--prefix=$prefix" \
+ "--target=$target" \
+ >"$root/configure-gcc-log" 2>&1 ||
die "Configure of gcc failed."
-eval make $makeGCCFlags all install >$root/build-gcc-log 2>&1 ||
+eval make $makeGCCFlags all install >"$root/build-gcc-log" 2>&1 ||
die "Build of gcc failed."
echo 'Success.'
Modified: mlton/branches/on-20050822-x86_64-branch/bin/clean
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bin/clean 2006-05-10 13:15:15 UTC (rev 4514)
+++ mlton/branches/on-20050822-x86_64-branch/bin/clean 2006-05-10 14:29:59 UTC (rev 4515)
@@ -2,11 +2,11 @@
set -e
-dir=`dirname $0`
-root=`cd $dir/.. && pwd`
+dir=`dirname "$0"`
+root=`cd "$dir/.." && pwd`
bin="$root/bin"
-case `$bin/host-os` in
+case `"$bin/host-os"` in
cygwin|freebsd|linux)
grepFlags='-q'
;;
@@ -18,14 +18,15 @@
ignore='.ignore'
doit () {
rm -rf '.#'* .*~ *~ *.a *.o .cm core mlmon.out svn-commit.*
- if [ -r $ignore ]; then
- for f in `cat $ignore`; do rm -rf $f; done
+ if [ -r "$ignore" ]; then
+ # xargs allows us to have quoted strings for filenames
+ xargs rm -rf < "$ignore"
fi
- for f in `ls`; do
- if [ -d $f ]; then
- cd $f
+ for f in *; do
+ if [ -d "$f" ]; then
+ cd "$f"
if [ -r Makefile ]; then
- $bin/mmake clean || doit
+ "$bin/mmake" clean || doit
else
doit
fi
Modified: mlton/branches/on-20050822-x86_64-branch/bin/grab-wiki
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bin/grab-wiki 2006-05-10 13:15:15 UTC (rev 4514)
+++ mlton/branches/on-20050822-x86_64-branch/bin/grab-wiki 2006-05-10 14:29:59 UTC (rev 4515)
@@ -2,9 +2,9 @@
set -e
-name=`basename $0`
-dir=`dirname $0`
-src=`cd $dir/.. && pwd`
+name=`basename "$0"`
+dir=`dirname "$0"`
+src=`cd "$dir/.." && pwd`
die () {
echo >&2 "$1"
@@ -39,36 +39,36 @@
drop='\(Download\|.*MoinEditorBackup\|OldPages\|Preferences\|RecentChanges\|TemporaryBugExamples\|TemporaryUpload\|WikiSandBox\)'
if $useLocal; then
- (cd $HOME/mlton/guide-in && tar.write .) | tar.read;
+ (cd "$HOME/mlton/guide-in" && tar.write .) | tar.read;
else
echo "Getting index:"
lynx -dump "$base/Index?action=titleindex" | \
- grep -v >$index -e '^$' -e "^$drop$"
+ grep -v >"$index" -e '^$' -e "^$drop$"
echo "Getting pages:"
-wget -B $base -c -nv -i $index
+wget -B "$base" -c -nv -i "$index"
echo "Getting CSS:"
for f in common screen print; do
- wget -c $base/wiki/mlton/css/$f.css
+ wget -c "$base/wiki/mlton/css/$f.css"
done
echo "Getting images:"
for f in bottom email ftp news top www; do
- wget -c $base/wiki/mlton/img/moin-$f.png
+ wget -c "$base/wiki/mlton/img/moin-$f.png"
done
fi
echo "Fixing pages:"
# Eliminate ungrabbed pages from Index.
-grep -v "$drop" Index >$tmp
-mv $tmp Index
+grep -v "$drop" Index >"$tmp"
+mv "$tmp" Index
wwwImg='<img src="moin-www.png" alt="[WWW]" height="11" width="11">'
# Write sed script to file.
-cat >$script <<EOF
+cat >"$script" <<EOF
# Delete search box.
/<form .* action = "http:\/\/www.google.com\/custom">/,+6d
# Replace highlight actions with no-op.
@@ -93,15 +93,15 @@
s;\(<a href *= *"http://mlton.org[^>]*>\);\1$wwwImg;g
EOF
-for f in $(cat $index); do
- echo $f
- head -n -19 <$f >$tmp
+for f in $(cat "$index"); do
+ echo "$f"
+ head -n -19 <"$f" >"$tmp"
(
- sed -f $script <$tmp
+ sed -f "$script" <"$tmp"
echo '</body></html>'
- ) >$f
+ ) >"$f"
done
-rm -f $tmp $index $script
+rm -f "$tmp" "$index" "$script"
cp Home index.html
Modified: mlton/branches/on-20050822-x86_64-branch/bin/host-arch
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bin/host-arch 2006-05-10 13:15:15 UTC (rev 4514)
+++ mlton/branches/on-20050822-x86_64-branch/bin/host-arch 2006-05-10 14:29:59 UTC (rev 4515)
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
set -e
-name=`basename $0`
-dir=`dirname $0`
-bin=`cd $dir && pwd`
+name=`basename "$0"`
+dir=`dirname "$0"`
+bin=`cd "$dir" && pwd`
die () {
echo >&2 "$1"
@@ -22,6 +22,6 @@
;;
esac
-eval `$bin/platform`
+eval `"$bin/platform"`
echo $HOST_ARCH
Modified: mlton/branches/on-20050822-x86_64-branch/bin/host-os
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bin/host-os 2006-05-10 13:15:15 UTC (rev 4514)
+++ mlton/branches/on-20050822-x86_64-branch/bin/host-os 2006-05-10 14:29:59 UTC (rev 4515)
@@ -1,9 +1,9 @@
#!/usr/bin/env bash
set -e
-name=`basename $0`
-dir=`dirname $0`
-bin=`cd $dir && pwd`
+name=`basename "$0"`
+dir=`dirname "$0"`
+bin=`cd "$dir" && pwd`
die () {
echo >&2 "$1"
@@ -22,6 +22,6 @@
;;
esac
-eval `$bin/platform`
+eval `"$bin/platform"`
echo $HOST_OS
Modified: mlton/branches/on-20050822-x86_64-branch/bin/make-pdf-guide
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bin/make-pdf-guide 2006-05-10 13:15:15 UTC (rev 4514)
+++ mlton/branches/on-20050822-x86_64-branch/bin/make-pdf-guide 2006-05-10 14:29:59 UTC (rev 4515)
@@ -2,9 +2,9 @@
set -e
-name=`basename $0`
-dir=`dirname $0`
-src=`cd $dir/.. && pwd`
+name=`basename "$0"`
+dir=`dirname "$0"`
+src=`cd "$dir/.." && pwd`
bin="$src/bin"
die () {
@@ -32,19 +32,20 @@
tmp='/tmp/mlton-guide'
version=`date +%Y%m%d`
-rm -rf $tmp
-mkdir $tmp
-cd $tmp
+rm -rf "$tmp"
+mkdir "$tmp"
+cd "$tmp"
-( cd $src/doc/guide && tar -cf - . ) | tar -xf -
+( cd "$src/doc/guide" && tar -cf - . ) | tar -xf -
# The grep -v takes out files that aren't wiki pages.
-ls -1 | grep -v '\.' >$pages
+# Hope that no files contain spaces or other specials -> `cat "$pages"` dies
+ls -1 | grep -v '\.' >"$pages"
echo 'Massaging HTML.'
-for f in `cat $pages`; do
-cat >$script <<EOF
+for f in `cat "$pages"`; do
+cat >"$script" <<EOF
/^<table bgcolor = lightblue/,+29d
s;\(<body .*\);\1\n<h1>$f</h1>;
s;<FONT[^>]*>;;g
@@ -53,12 +54,12 @@
s;<td colspan = 3;<td align = right;
s;<img src=\"\(http://mlton.org[^>]*\)>;<img src="moin-www.png"><a href=\"\1>image</a>;g
EOF
- $bin/msed -f $script <$f >.tmp
- mv .tmp $f
+ "$bin/msed" -f "$script" <"$f" >.tmp
+ mv .tmp "$f"
done
echo 'Generating PDF titlepage.'
-cat >$titlepage <<EOF
+cat >"$titlepage" <<EOF
<html>
<head><title>MLton Guide ($version)</title></head>
<body>
@@ -124,14 +125,14 @@
Index
EOF
-grep -v '^\(Home\|Index\)$' $pages
-) >$book
+grep -v '^\(Home\|Index\)$' "$pages"
+) >"$book"
echo 'Running htmldoc.'
-htmldoc --batch $book || true
+htmldoc --batch "$book" || true
-mv $pdf $src/doc/guide
+mv "$pdf" "$src/doc/guide"
cd
-rm -rf $tmp
+rm -rf "$tmp"
Modified: mlton/branches/on-20050822-x86_64-branch/bin/mlton-script
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bin/mlton-script 2006-05-10 13:15:15 UTC (rev 4514)
+++ mlton/branches/on-20050822-x86_64-branch/bin/mlton-script 2006-05-10 14:29:59 UTC (rev 4515)
@@ -4,9 +4,9 @@
set -e
-dir=`dirname $0`
-lib=`cd $dir/../lib && pwd`
-eval `$lib/platform`
+dir=`dirname "$0"`
+lib=`cd "$dir/../lib" && pwd`
+eval `"$lib/platform"`
gcc='gcc'
case "$HOST_OS" in
mingw)
@@ -28,12 +28,12 @@
njHeap="$lib/mlton.$HOST_ARCH-$HOST_OS"
fi
-rargs=""
+declare -a rargs
case "$1" in
@MLton)
shift
while [ "$#" -gt 0 -a "$1" != "--" ]; do
- rargs="$rargs $1"
+ rargs[${#rargs[@]}]="$1"
shift
done
if [ "$#" -gt 0 -a "$1" == "--" ]; then
@@ -49,7 +49,7 @@
# $njHeap (which exists), then use MLton, otherwise use SML/NJ.
doit () {
if [ -x "$mlton" -a -s "$world" -a ! "$njHeap" -nt "$world" ]; then
- exec "$mlton" @MLton load-world "$world" ram-slop 0.5 $rargs -- "$@"
+ exec "$mlton" @MLton load-world "$world" ram-slop 0.5 "${rargs[@]}" -- "$@"
elif [ -s "$njHeap" ]; then
exec "$nj" @SMLload="$njHeap" "$@"
fi
Modified: mlton/branches/on-20050822-x86_64-branch/bin/mmake
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bin/mmake 2006-05-10 13:15:15 UTC (rev 4514)
+++ mlton/branches/on-20050822-x86_64-branch/bin/mmake 2006-05-10 14:29:59 UTC (rev 4515)
@@ -3,7 +3,7 @@
set -e
die () {
- echo $1 >&2
+ echo "$1" >&2
exit 1
}
@@ -15,4 +15,4 @@
die 'Can'\''t find GNU make'
fi
-exec $make "$@"
+exec "$make" "$@"
Modified: mlton/branches/on-20050822-x86_64-branch/bin/msed
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bin/msed 2006-05-10 13:15:15 UTC (rev 4514)
+++ mlton/branches/on-20050822-x86_64-branch/bin/msed 2006-05-10 14:29:59 UTC (rev 4515)
@@ -3,7 +3,7 @@
set -e
die () {
- echo $1 >&2
+ echo "$1" >&2
exit 1
}
@@ -15,4 +15,4 @@
die 'Can'\''t find GNU sed'
fi
-exec $sed "$@"
+exec "$sed" "$@"
Modified: mlton/branches/on-20050822-x86_64-branch/bin/patch-mingw
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bin/patch-mingw 2006-05-10 13:15:15 UTC (rev 4514)
+++ mlton/branches/on-20050822-x86_64-branch/bin/patch-mingw 2006-05-10 14:29:59 UTC (rev 4515)
@@ -2,12 +2,12 @@
set -e
-dir=`dirname $0`
+dir=`dirname "$0"`
for f in `find "$dir" -type f | grep -v '\.svn' | grep -v '~'`; do
if head -n 1 "$f" | grep -q '#!/usr/bin/env bash'; then
echo "Processing $f"
- sed 's;#!/usr/bin/env bash;#!/usr/bin/env sh;' <$f >.tmp;
- mv .tmp $f;
+ sed 's;#!/usr/bin/env bash;#!/usr/bin/env sh;' <"$f" >.tmp;
+ mv .tmp "$f";
fi
done
Modified: mlton/branches/on-20050822-x86_64-branch/bin/platform
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bin/platform 2006-05-10 13:15:15 UTC (rev 4514)
+++ mlton/branches/on-20050822-x86_64-branch/bin/platform 2006-05-10 14:29:59 UTC (rev 4515)
@@ -2,9 +2,9 @@
set -e
-name=`basename $0`
-dir=`dirname $0`
-bin=`cd $dir && pwd`
+name=`basename "$0"`
+dir=`dirname "$0"`
+bin=`cd "$dir" && pwd`
die () {
echo >&2 "$1"
Modified: mlton/branches/on-20050822-x86_64-branch/bin/regression
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bin/regression 2006-05-10 13:15:15 UTC (rev 4514)
+++ mlton/branches/on-20050822-x86_64-branch/bin/regression 2006-05-10 14:29:59 UTC (rev 4515)
@@ -5,7 +5,7 @@
# set -e
-name=`basename $0`
+name=`basename "$0"`
usage () {
echo >&2 "usage: $name [-cross target] [-run-only target] [-short] [-skip-to reg] [mlton flags ...]"
@@ -17,6 +17,7 @@
runOnly='false'
short='false'
skipTo=''
+declare -a flags
while [ "$#" -gt 0 ]; do
case "$1" in
-cross)
@@ -54,20 +55,24 @@
shift
;;
*)
- flags="$@"
- break
+ flags[${#flags[@]}]="$1"
+ shift
;;
esac
done
-dir=`dirname $0`
-src=`cd $dir/.. && pwd`
+dir=`dirname "$0"`
+src=`cd "$dir/.." && pwd`
bin="$src/build/bin"
lib="$src/build/lib"
mlton="$bin/mlton"
-flags="-type-check true $flags"
+flags[${#flags[@]}]="-type-check"
+flags[${#flags[@]}]="true"
if $cross; then
- flags="$flags -target $crossTarget -stop g"
+ flags[${#flags[@]}]="-target"
+ flags[${#flags[@]}]="$crossTarget"
+ flags[${#flags[@]}]="-stop"
+ flags[${#flags[@]}]="-g"
fi
cont='callcc.sml callcc2.sml callcc3.sml once.sml'
flatArray='finalize.sml flat-array.sml flat-array.2.sml'
@@ -76,23 +81,23 @@
thread='thread0.sml thread1.sml thread2.sml mutex.sml prodcons.sml same-fringe.sml timeout.sml'
world='world1.sml world2.sml world3.sml world4.sml world5.sml world6.sml'
tmp=/tmp/z.regression.$$
-PATH=$bin:$src/bin/.:$PATH
+PATH="$bin:$src/bin/.:$PATH"
-eval `$lib/platform`
+eval `"$lib/platform"`
compFail () {
- echo "compilation of $f failed with $flags"
+ echo "compilation of $f failed with ${flags[*]}"
}
-$mlton -verbose 1 || echo 'no mlton present'
-echo "flags = $flags"
+"$mlton" -verbose 1 || echo 'no mlton present'
+echo "flags = ${flags[*]}"
-cd $src/regression
+cd "$src/regression"
if $fail; then
- for f in `ls fail/*.sml`; do
+ for f in fail/*.sml; do
echo "testing $f"
- ( $mlton $flags -stop tc $f >/dev/null 2>&1 &&
+ ( "$mlton" "${flags[@]}" -stop tc "$f" >/dev/null 2>&1 &&
echo "compilation of $f should have failed but did not" ) ||
true
done
@@ -109,8 +114,8 @@
;;
esac
-for f in `ls *.sml`; do
- f=`basename $f .sml`
+for f in *.sml; do
+ f=`basename "$f" .sml`
if [ "$skipTo" != "" ]; then
if [ "$skipTo" != "$f" ]; then
echo "skipping $f"
@@ -161,15 +166,14 @@
\"nonexhaustiveMatch ignore\"
\"redundantMatch ignore\"
in $f.sml
- end" >$mlb
- cmd="$mlton $flags $extraFlags -output $f $mlb"
- eval $cmd
- rm $mlb
+ end" >"$mlb"
+ "$mlton" "${flags[@]}" $extraFlags -output "$f" "$mlb"
if [ "$?" -ne '0' ] || ((! $cross) && [ ! -x "$f" ]); then
- compFail $f
+ compFail "$f"
fi
+ rm "$mlb"
else
- case $crossTarget in
+ case "$crossTarget" in
*mingw)
libs='-lws2_32 -lkernel32 -lpsapi -lnetapi32'
;;
@@ -181,27 +185,26 @@
;;
esac
libs="-lmlton -lgmp $libs -lgdtoa -lm"
- # Must use $f.[0-9].[cS], not $f.*.[cS], because the
- # latter will include other files, e.g. for finalize,
- # it will also include finalize.2.
- files="$f.[0-9].[cS]"
- if [ 0 -ne `ls $f.[0-9][0-9].[cS] 2>/dev/null | wc -l` ]; then
- files="$files $f.[0-9][0-9].[cS]"
- fi
- gcc -o $f -w -O1 \
+ # OLD COMMENT:
+ # Must use $f.[0-9].[cS], not $f.*.[cS], because the
+ # latter will include other files, e.g. for finalize,
+ # it will also include finalize.2.
+ # I think this is untrue, and have dropped it as the work-
+ # around used was unsafe for special characters.
+ gcc -o "$f" -w -O1 \
-I "../build/lib/include" \
-L"../build/lib/$crossTarget" \
-L/usr/pkg/lib \
-L/usr/local/lib \
- $files $libs
+ "$f".*.[cS] $libs
fi
- if [ ! -r $f.nonterm -a $cross = 'false' -a -x $f ]; then
+ if [ ! -r "$f".nonterm -a $cross = 'false' -a -x "$f" ]; then
nonZeroMsg='Nonzero exit status.'
if $forMinGW; then
nonZeroMsg="$nonZeroMsg"'\r'
fi
- ( ./$f || echo -e "$nonZeroMsg" ) >$tmp 2>&1
- if [ -r $f.ok ]; then
+ ( "./$f" || echo -e "$nonZeroMsg" ) >$tmp 2>&1
+ if [ -r "$f.ok" ]; then
compare="$f.$HOST_ARCH-$HOST_OS.ok"
if [ ! -r $compare ]; then
compare="$f.ok"
@@ -210,8 +213,8 @@
compare="$f.sed.ok"
/c/cygwin/bin/sed 's/$/\r/' <"$f.ok" >"$compare"
fi
- if ! diff $compare $tmp; then
- echo "difference with $flags"
+ if ! diff "$compare" "$tmp"; then
+ echo "difference with ${flags[*]}"
fi
fi
fi
@@ -220,47 +223,47 @@
exit 0
fi
mmake clean >/dev/null
-cd $src/benchmark/tests
-for f in `ls *.sml`; do
- f=`basename $f .sml`
- tmpf=/tmp/$f.$$
+cd "$src/benchmark/tests"
+for f in *.sml; do
+ f=`basename "$f" .sml`
+ tmpf="/tmp/$f.$$"
case "$f" in
fxp|hamlet)
echo "skipping $f"
;;
*)
echo "testing $f"
- echo "val _ = Main.doit 0" | cat $f.sml - > $tmpf.sml
- $mlton -output $tmpf $flags \
+ echo "val _ = Main.doit 0" | cat "$f.sml" - > "$tmpf.sml"
+ $mlton -output "$tmpf" "${flags[@]}" \
-default-ann 'nonexhaustiveMatch ignore'\
-default-ann 'redundantMatch ignore' \
- $tmpf.sml
+ "$tmpf.sml"
if [ $? -ne 0 ]; then
- compFail $f
+ compFail "$f"
fi
- rm -f $tmpf $tmpf.sml
+ rm -f "$tmpf" "$tmpf.sml"
;;
esac
done
mmake clean >/dev/null
-cd $src
+cd "$src"
for f in mllex mlyacc mlprof; do
- tmpf=/tmp/$f.$$
- cd $src/$f
+ tmpf="/tmp/$f.$$"
+ cd "$src/$f"
case "$f" in
foobar)
echo "skipping $f"
;;
*)
echo "testing $f"
- mmake -W $f >/dev/null
- $mlton $flags -output $tmpf $f.mlb
+ mmake -W "$f" >/dev/null
+ "$mlton" "${flags[@]}" -output "$tmpf" "$f.mlb"
if [ $? -ne 0 ]; then
- compFail $f
+ compFail "$f"
fi
- rm -f $tmpf
+ rm -f "$tmpf"
;;
esac
done
-rm -f $tmp
+rm -f "$tmp"
Modified: mlton/branches/on-20050822-x86_64-branch/bin/sync-ignore
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bin/sync-ignore 2006-05-10 13:15:15 UTC (rev 4514)
+++ mlton/branches/on-20050822-x86_64-branch/bin/sync-ignore 2006-05-10 14:29:59 UTC (rev 4515)
@@ -2,9 +2,9 @@
set -e
-name=`basename $0`
-dir=`dirname $0`
-root=`cd $dir/.. && pwd`
+name=`basename "$0"`
+dir=`dirname "$0"`
+root=`cd "$dir/.." && pwd`
die () {
echo >&2 "$1"
@@ -25,11 +25,11 @@
p='svn:ignore'
-for i in `find $root -type f -name .ignore`; do
- d=`dirname $i`
+for i in `find "$root" -type f -name .ignore`; do
+ d=`dirname "$i"`
tmp='/tmp/z.ign'
- svn propget $p $d | head -n -1 >$tmp
- if ! diff -q $i $tmp >/dev/null; then
- svn propset $p -F $i $d
+ svn propget "$p" "$d" | head -n -1 >"$tmp"
+ if ! diff -q "$i" "$tmp" >/dev/null; then
+ svn propset "$p" -F "$i" "$d"
fi
done
Modified: mlton/branches/on-20050822-x86_64-branch/bin/upgrade-basis
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bin/upgrade-basis 2006-05-10 13:15:15 UTC (rev 4514)
+++ mlton/branches/on-20050822-x86_64-branch/bin/upgrade-basis 2006-05-10 14:29:59 UTC (rev 4515)
@@ -7,8 +7,8 @@
exit 1
}
-bin=`dirname $0`
-name=`basename $0`
+bin=`dirname "$0"`
+name=`basename "$0"`
usage () {
die "usage: $name <PATH> <ARCH> <OS>"
@@ -27,16 +27,16 @@
tmp="$$.sml"
-echo "val () = print \"I work\"" >$tmp
-if ! mlton $tmp 1>&2; then
+echo "val () = print \"I work\"" >"$tmp"
+if ! mlton "$tmp" 1>&2; then
die "Error: cannot upgrade basis because the compiler doesn't work"
fi
feature () {
feature="$1"
sml="$2"
- echo "$feature" >$tmp
- if ! mlton -stop tc $tmp >/dev/null 2>&1; then
+ echo "$feature" >"$tmp"
+ if ! mlton -stop tc "$tmp" >/dev/null 2>&1; then
echo "$sml"
fi
}
@@ -95,7 +95,7 @@
structure Word32 = Word
structure LargeWord = Word'
-eval `$bin/platform`
+eval `"$bin/platform"`
case "$ARCH" in
alpha)
arch='Alpha'
@@ -237,5 +237,5 @@
end
EOF
-rm -f $tmp
-rm -f `basename $tmp .sml`
+rm -f "$tmp"
+rm -f `basename "$tmp" .sml`
Modified: mlton/branches/on-20050822-x86_64-branch/mllex/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/mllex/Makefile 2006-05-10 13:15:15 UTC (rev 4514)
+++ mlton/branches/on-20050822-x86_64-branch/mllex/Makefile 2006-05-10 14:29:59 UTC (rev 4515)
@@ -18,11 +18,11 @@
all: $(NAME)
-$(NAME): $(NAME).mlb $(shell PATH=$(BIN):$$PATH && $(MLTON) -stop f $(NAME).mlb)
+$(NAME): $(NAME).mlb $(shell PATH="$(BIN):$$PATH" && "$(MLTON)" -stop f $(NAME).mlb)
@echo 'Compiling $(NAME)'
- $(MLTON) $(FLAGS) $(NAME).mlb
+ "$(MLTON)" $(FLAGS) $(NAME).mlb
-$(NAME).sml: $(NAME).cm $(shell $(MLTON) -stop f $(NAME).cm)
+$(NAME).sml: $(NAME).cm $(shell "$(MLTON)" -stop f $(NAME).cm)
mlton -stop sml $(NAME).cm
html/index.html: $(TEX_FILES)
Modified: mlton/branches/on-20050822-x86_64-branch/mlnlffigen/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/mlnlffigen/Makefile 2006-05-10 13:15:15 UTC (rev 4514)
+++ mlton/branches/on-20050822-x86_64-branch/mlnlffigen/Makefile 2006-05-10 14:29:59 UTC (rev 4515)
@@ -17,7 +17,7 @@
all: $(NAME)
-$(NAME): $(NAME).mlb $(shell PATH=$(BIN):$$PATH && $(MLTON) -stop f $(NAME).mlb)
+$(NAME): $(NAME).mlb $(shell PATH="$(BIN):$$PATH" && "$(MLTON)" -stop f $(NAME).mlb)
@echo 'Compiling $(NAME)'
$(MLTON) $(FLAGS) $(NAME).mlb
Modified: mlton/branches/on-20050822-x86_64-branch/mlprof/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/mlprof/Makefile 2006-05-10 13:15:15 UTC (rev 4514)
+++ mlton/branches/on-20050822-x86_64-branch/mlprof/Makefile 2006-05-10 14:29:59 UTC (rev 4515)
@@ -18,11 +18,11 @@
all: $(NAME)
-$(NAME): $(NAME).mlb $(shell PATH=$(BIN):$$PATH && $(MLTON) -stop f $(NAME).mlb)
+$(NAME): $(NAME).mlb $(shell PATH="$(BIN):$$PATH" && "$(MLTON)" -stop f $(NAME).mlb)
@echo 'Compiling $(NAME)'
$(MLTON) $(FLAGS) $(NAME).mlb
-$(NAME).sml: $(NAME).cm $(shell $(MLTON) -stop f $(NAME).cm)
+$(NAME).sml: $(NAME).cm $(shell "$(MLTON)" -stop f $(NAME).cm)
mlton -stop sml $(NAME).cm
.PHONY: clean
Modified: mlton/branches/on-20050822-x86_64-branch/mlton/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/mlton/Makefile 2006-05-10 13:15:15 UTC (rev 4514)
+++ mlton/branches/on-20050822-x86_64-branch/mlton/Makefile 2006-05-10 14:29:59 UTC (rev 4515)
@@ -9,8 +9,8 @@
SRC = $(shell cd .. && pwd)
BUILD = $(SRC)/build
BIN = $(BUILD)/bin
-HOST_ARCH = $(shell $(SRC)/bin/host-arch)
-HOST_OS = $(shell $(SRC)/bin/host-os)
+HOST_ARCH = $(shell "$(SRC)/bin/host-arch")
+HOST_OS = $(shell "$(SRC)/bin/host-os")
LIB = $(BUILD)/lib
MLTON = mlton
TARGET = self
@@ -20,7 +20,7 @@
FLAGS = @MLton ram-slop 0.7 gc-summary $(RUNTIME_ARGS) --
-ifeq (self, $(shell if [ -x $(BIN)/mlton ]; then echo self; fi))
+ifeq (self, $(shell if [ -x "$(BIN)/mlton" ]; then echo self; fi))
# We're compiling MLton with itself, so don't use any stubs.
FILE = mlton.mlb
FLAGS += -default-ann 'sequenceNonUnit warn'
@@ -42,15 +42,15 @@
endif
endif
-ifeq (new,$(shell PATH=$(BIN):$$PATH; mlton -target self >/dev/null 2>&1 && echo new))
+ifeq (new,$(shell PATH="$(BIN):$$PATH"; mlton -target self >/dev/null 2>&1 && echo new))
FLAGS += -target $(TARGET)
else
FLAGS += -host $(TARGET)
endif
-ifeq (new,$(shell PATH=$(BIN):$$PATH; mlton -verbose 1 >/dev/null 2>&1 && echo new))
- FLAGS += -verbose 2 -output $(AOUT)
+ifeq (new,$(shell PATH="$(BIN):$$PATH"; mlton -verbose 1 >/dev/null 2>&1 && echo new))
+ FLAGS += -verbose 2 -output "$(AOUT)"
else
- FLAGS += -v -o $(AOUT)
+ FLAGS += -v -o "$(AOUT)"
endif
FLAGS += $(COMPILE_ARGS)
@@ -86,7 +86,7 @@
#! Pass $(PATH) to upgrade-basis because it is run via #!/usr/bin/env
# bash, which resets the path.
$(UP):
- $(SRC)/bin/upgrade-basis "$(PATH)" "$(HOST_ARCH)" "$(HOST_OS)" >$(UP)
+ "$(SRC)/bin/upgrade-basis" "$(PATH)" "$(HOST_ARCH)" "$(HOST_OS)" >$(UP)
mlton.sml: $(SOURCES)
rm -f mlton.sml && mlton -stop sml mlton.cm && chmod -w mlton.sml
@@ -117,7 +117,7 @@
echo 'Control.polyEqWarn := false;'; \
echo 'CM.make "sources.cm";'; \
echo 'Main.exportNJ ("$(LIB)/mlton");' \
- ) | $(SML)
+ ) | "$(SML)"
.PHONY: nj-mlton-dual
nj-mlton-dual: $(SOURCES)
@@ -130,7 +130,7 @@
echo 'val _ = CM.Server.start {cmd = (CommandLine.name (), ["@CMslave"]), name = "server2", pathtrans = NONE, pref = 0};';\
echo 'CM.make "sources.cm";'; \
echo 'Main.exportNJ ("$(LIB)/mlton");' \
- ) | $(SML)
+ ) | "$(SML)"
.PHONY: nj-mlton-quad
nj-mlton-quad: $(SOURCES)
@@ -145,7 +145,7 @@
echo 'val _ = CM.Server.start {cmd = (CommandLine.name (), ["@CMslave"]), name = "server4", pathtrans = NONE, pref = 0};';\
echo 'CM.make "sources.cm";'; \
echo 'Main.exportNJ ("$(LIB)/mlton");' \
- ) | $(SML)
+ ) | "$(SML)"
.PHONY: nj-whole
nj-whole: $(SOURCES)
@@ -163,7 +163,7 @@
echo 'val _ = Main.exportNJ ("$(SRC)/basis-library", "$(LIB)/mlton")'; \
echo 'end'; \
) >mlton.whole.sml
- $(SML) <mlton.whole.sml
+ "$(SML)" <mlton.whole.sml
.PHONY: warn
warn:
Modified: mlton/branches/on-20050822-x86_64-branch/mlyacc/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/mlyacc/Makefile 2006-05-10 13:15:15 UTC (rev 4514)
+++ mlton/branches/on-20050822-x86_64-branch/mlyacc/Makefile 2006-05-10 14:29:59 UTC (rev 4515)
@@ -18,11 +18,11 @@
all: $(NAME)
-$(NAME): $(NAME).mlb $(shell PATH=$(BIN):$$PATH && $(MLTON) -stop f $(NAME).mlb)
+$(NAME): $(NAME).mlb $(shell PATH="$(BIN):$$PATH" && "$(MLTON)" -stop f $(NAME).mlb)
@echo 'Compiling $(NAME)'
- $(MLTON) $(FLAGS) $(NAME).mlb
+ "$(MLTON)" $(FLAGS) $(NAME).mlb
-$(NAME).sml: $(NAME).cm $(shell $(MLTON) -stop f $(NAME).cm)
+$(NAME).sml: $(NAME).cm $(shell "$(MLTON)" -stop f $(NAME).cm)
mlton -stop sml $(NAME).cm
src/yacc.lex.sml: src/yacc.lex
Modified: mlton/branches/on-20050822-x86_64-branch/regression/Makefile
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/regression/Makefile 2006-05-10 13:15:15 UTC (rev 4514)
+++ mlton/branches/on-20050822-x86_64-branch/regression/Makefile 2006-05-10 14:29:59 UTC (rev 4515)
@@ -12,9 +12,9 @@
clean:
../bin/clean
rm -f *.[csS]
- for f in `ls`; do \
- if [ -x $$f -a ! -d $$f ]; then \
- rm -f $$f; \
+ for f in *; do \
+ if [ -x "$$f" -a ! -d "$$f" ]; then \
+ rm -f "$$f"; \
fi; \
done
@@ -22,5 +22,3 @@
.PHONY: abnormal
abnormal:
ls -1 | egrep -v '\.ok$$|\.sml$$'
-
-
|
|
From: Wesley T. <we...@ml...> - 2006-05-10 06:15:20
|
this directory must exist for macos powerpc builds ---------------------------------------------------------------------- A mlton/branches/on-20050822-x86_64-branch/basis-library/config/c/powerpc-darwin/ ---------------------------------------------------------------------- |