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
|
Oct
|
Nov
|
Dec
|
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/ ---------------------------------------------------------------------- |
From: Stephen W. <sw...@ml...> - 2006-05-09 19:49:06
|
Quelled gcc warning "right shift count >= width of type". ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.c ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.c 2006-05-10 02:29:29 UTC (rev 4512) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.c 2006-05-10 02:49:06 UTC (rev 4513) @@ -65,7 +65,13 @@ } for (unsigned int i = 0; i < LIMBS_PER_OBJPTR; i++) { space[i] = (mp_limb_t)arg; - arg = arg >> (CHAR_BIT * sizeof(mp_limb_t)); + // The conditional below is to quell a gcc warning: + // right shift count >= width of type + // When 1 == LIMBS_PEROBJPTR, the for loop will not continue, so the + // shift doesn't matter. + arg = arg >> (1 == LIMBS_PER_OBJPTR ? + 0 : + CHAR_BIT * sizeof(mp_limb_t)); } } } else { |
From: Matthew F. <fl...@ml...> - 2006-05-09 19:29:30
|
Moved conditional define of O_DYSNC and O_RSYNC to platform-independent code ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.h ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.h 2006-05-10 02:04:28 UTC (rev 4511) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.h 2006-05-10 02:29:29 UTC (rev 4512) @@ -33,14 +33,6 @@ #define MLton_Platform_OS_host "darwin" -// MacOS doesn't support these... yet. -#ifndef O_RSYNC -#define O_RSYNC O_SYNC -#endif -#ifndef O_DSYNC -#define O_DSYNC O_SYNC -#endif - // MacOS only defines this if POSIX_C_SOURCE is defined. // However, defining that breaks half the osx system headers. // They couldn't possibly change the number at this point anyways. |
From: Matthew F. <fl...@ml...> - 2006-05-09 19:04:28
|
Finished first round of FreeBSD port. (Much overlap with the Darwin port.) The runtime now compiles. ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/platform/freebsd.c ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/freebsd.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform/freebsd.c 2006-05-10 02:02:27 UTC (rev 4510) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/freebsd.c 2006-05-10 02:04:28 UTC (rev 4511) @@ -23,11 +23,12 @@ sa->sa_sigaction = (void (*)(int, siginfo_t*, void*))catcher; } -W32 GC_totalRam (GC_state s) { - int mem, len; +size_t GC_totalRam (void) { + unsigned int mem; + size_t len; len = sizeof (int); if (-1 == sysctlbyname ("hw.physmem", &mem, &len, NULL, 0)) diee ("sysctl failed"); - return mem; + return (size_t)mem; } |
From: Matthew F. <fl...@ml...> - 2006-05-09 19:02:29
|
Defined all of the SIG and tty constants with #ifndef in the platform-independent code, so that each platform doesn't have to define the missing ones. Also defined O_BINARY, O_DSYNC, O_RSYNC, and O_TEXT with #ifndef in the platform-independent code. ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/Posix/FileSys/FileSys-consts.c U mlton/branches/on-20050822-x86_64-branch/runtime/Posix/Signal-consts.c U mlton/branches/on-20050822-x86_64-branch/runtime/Posix/TTY-consts.c ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Posix/FileSys/FileSys-consts.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/Posix/FileSys/FileSys-consts.c 2006-05-10 01:28:35 UTC (rev 4509) +++ mlton/branches/on-20050822-x86_64-branch/runtime/Posix/FileSys/FileSys-consts.c 2006-05-10 02:02:27 UTC (rev 4510) @@ -9,23 +9,27 @@ const C_Int_t Posix_FileSys_O_RDWR = O_RDWR; const C_Int_t Posix_FileSys_O_WRONLY = O_WRONLY; +const C_Int_t Posix_FileSys_O_APPEND = O_APPEND; #ifndef O_BINARY #define O_BINARY 0 #endif - -#ifndef O_TEXT -#define O_TEXT 0 -#endif - -const C_Int_t Posix_FileSys_O_APPEND = O_APPEND; const C_Int_t Posix_FileSys_O_BINARY = O_BINARY; const C_Int_t Posix_FileSys_O_CREAT = O_CREAT; +#ifndef O_DSYNC +#define O_DSYNC 0 +#endif const C_Int_t Posix_FileSys_O_DSYNC = O_DSYNC; const C_Int_t Posix_FileSys_O_EXCL = O_EXCL; const C_Int_t Posix_FileSys_O_NOCTTY = O_NOCTTY; const C_Int_t Posix_FileSys_O_NONBLOCK = O_NONBLOCK; +#ifndef O_RSYNC +#define O_RSYNC 0 +#endif const C_Int_t Posix_FileSys_O_RSYNC = O_RSYNC; const C_Int_t Posix_FileSys_O_SYNC = O_SYNC; +#ifndef O_TEXT +#define O_TEXT 0 +#endif const C_Int_t Posix_FileSys_O_TEXT = O_TEXT; const C_Int_t Posix_FileSys_O_TRUNC = O_TRUNC; Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Posix/Signal-consts.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/Posix/Signal-consts.c 2006-05-10 01:28:35 UTC (rev 4509) +++ mlton/branches/on-20050822-x86_64-branch/runtime/Posix/Signal-consts.c 2006-05-10 02:02:27 UTC (rev 4510) @@ -12,31 +12,115 @@ const C_Int_t Posix_Signal_SIG_SETMASK = SIG_SETMASK; const C_Int_t Posix_Signal_SIG_UNBLOCK = SIG_UNBLOCK; +#ifndef SIGABRT +#define SIGABRT -1 +#endif const C_Signal_t Posix_Signal_SIGABRT = SIGABRT; +#ifndef SIGALRM +#define SIGALRM -1 +#endif const C_Signal_t Posix_Signal_SIGALRM = SIGALRM; +#ifndef SIGBUS +#define SIGBUS -1 +#endif const C_Signal_t Posix_Signal_SIGBUS = SIGBUS; +#ifndef SIGCHLD +#define SIGCHLD -1 +#endif const C_Signal_t Posix_Signal_SIGCHLD = SIGCHLD; +#ifndef SIGCONT +#define SIGCONT -1 +#endif const C_Signal_t Posix_Signal_SIGCONT = SIGCONT; +#ifndef SIGFPE +#define SIGFPE -1 +#endif const C_Signal_t Posix_Signal_SIGFPE = SIGFPE; +#ifndef SIGHUP +#define SIGHUP -1 +#endif const C_Signal_t Posix_Signal_SIGHUP = SIGHUP; +#ifndef SIGILL +#define SIGILL -1 +#endif const C_Signal_t Posix_Signal_SIGILL = SIGILL; +#ifndef SIGINT +#define SIGINT -1 +#endif const C_Signal_t Posix_Signal_SIGINT = SIGINT; +#ifndef SIGKILL +#define SIGKILL -1 +#endif const C_Signal_t Posix_Signal_SIGKILL = SIGKILL; +#ifndef SIGPIPE +#define SIGPIPE -1 +#endif const C_Signal_t Posix_Signal_SIGPIPE = SIGPIPE; +#ifndef SIGQUIT +#define SIGQUIT -1 +#endif const C_Signal_t Posix_Signal_SIGQUIT = SIGQUIT; +#ifndef SIGSEGV +#define SIGSEGV -1 +#endif const C_Signal_t Posix_Signal_SIGSEGV = SIGSEGV; +#ifndef SIGSTOP +#define SIGSTOP -1 +#endif const C_Signal_t Posix_Signal_SIGSTOP = SIGSTOP; +#ifndef SIGTERM +#define SIGTERM -1 +#endif const C_Signal_t Posix_Signal_SIGTERM = SIGTERM; +#ifndef SIGTSTP +#define SIGTSTP -1 +#endif const C_Signal_t Posix_Signal_SIGTSTP = SIGTSTP; +#ifndef SIGTTIN +#define SIGTTIN -1 +#endif const C_Signal_t Posix_Signal_SIGTTIN = SIGTTIN; +#ifndef SIGTTOU +#define SIGTTOU -1 +#endif const C_Signal_t Posix_Signal_SIGTTOU = SIGTTOU; +#ifndef SIGUSR1 +#define SIGUSR1 -1 +#endif const C_Signal_t Posix_Signal_SIGUSR1 = SIGUSR1; +#ifndef SIGUSR2 +#define SIGUSR2 -1 +#endif const C_Signal_t Posix_Signal_SIGUSR2 = SIGUSR2; +#ifndef SIGPOLL +#define SIGPOLL -1 +#endif const C_Signal_t Posix_Signal_SIGPOLL = SIGPOLL; +#ifndef SIGPROF +#define SIGPROF -1 +#endif const C_Signal_t Posix_Signal_SIGPROF = SIGPROF; +#ifndef SIGSYS +#define SIGSYS -1 +#endif const C_Signal_t Posix_Signal_SIGSYS = SIGSYS; +#ifndef SIGTRAP +#define SIGTRAP -1 +#endif const C_Signal_t Posix_Signal_SIGTRAP = SIGTRAP; +#ifndef SIGURG +#define SIGURG -1 +#endif const C_Signal_t Posix_Signal_SIGURG = SIGURG; +#ifndef SIGVTALRM +#define SIGVTALRM -1 +#endif const C_Signal_t Posix_Signal_SIGVTALRM = SIGVTALRM; +#ifndef SIGXCPU +#define SIGXCPU -1 +#endif const C_Signal_t Posix_Signal_SIGXCPU = SIGXCPU; +#ifndef SIGXFSZ +#define SIGXFSZ -1 +#endif const C_Signal_t Posix_Signal_SIGXFSZ = SIGXFSZ; Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Posix/TTY-consts.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/Posix/TTY-consts.c 2006-05-10 01:28:35 UTC (rev 4509) +++ mlton/branches/on-20050822-x86_64-branch/runtime/Posix/TTY-consts.c 2006-05-10 02:02:27 UTC (rev 4510) @@ -2,108 +2,399 @@ const C_Int_t Posix_TTY_V_NCCS = NCCS; +#ifndef VEOF +#define VEOF -1 +#endif const C_Int_t Posix_TTY_V_VEOF = VEOF; +#ifndef VEOL +#define VEOL -1 +#endif const C_Int_t Posix_TTY_V_VEOL = VEOL; +#ifndef VERASE +#define VERASE -1 +#endif const C_Int_t Posix_TTY_V_VERASE = VERASE; +#ifndef VINTR +#define VINTR -1 +#endif const C_Int_t Posix_TTY_V_VINTR = VINTR; +#ifndef VKILL +#define VKILL -1 +#endif const C_Int_t Posix_TTY_V_VKILL = VKILL; +#ifndef VMIN +#define VMIN -1 +#endif const C_Int_t Posix_TTY_V_VMIN = VMIN; +#ifndef VQUIT +#define VQUIT -1 +#endif const C_Int_t Posix_TTY_V_VQUIT = VQUIT; +#ifndef VSTART +#define VSTART -1 +#endif const C_Int_t Posix_TTY_V_VSTART = VSTART; +#ifndef VSTOP +#define VSTOP -1 +#endif const C_Int_t Posix_TTY_V_VSTOP = VSTOP; +#ifndef VSUSP +#define VSUSP -1 +#endif const C_Int_t Posix_TTY_V_VSUSP = VSUSP; +#ifndef VTIME +#define VTIME -1 +#endif const C_Int_t Posix_TTY_V_VTIME = VTIME; +#ifndef BRKINT +#define BRKINT -1 +#endif const C_TCFlag_t Posix_TTY_I_BRKINT = BRKINT; +#ifndef ICRNL +#define ICRNL -1 +#endif const C_TCFlag_t Posix_TTY_I_ICRNL = ICRNL; +#ifndef IGNBRK +#define IGNBRK -1 +#endif const C_TCFlag_t Posix_TTY_I_IGNBRK = IGNBRK; +#ifndef IGNCR +#define IGNCR -1 +#endif const C_TCFlag_t Posix_TTY_I_IGNCR = IGNCR; +#ifndef IGNPAR +#define IGNPAR -1 +#endif const C_TCFlag_t Posix_TTY_I_IGNPAR = IGNPAR; +#ifndef INLCR +#define INLCR -1 +#endif const C_TCFlag_t Posix_TTY_I_INLCR = INLCR; +#ifndef INPCK +#define INPCK -1 +#endif const C_TCFlag_t Posix_TTY_I_INPCK = INPCK; +#ifndef ISTRIP +#define ISTRIP -1 +#endif const C_TCFlag_t Posix_TTY_I_ISTRIP = ISTRIP; +#ifndef IXANY +#define IXANY -1 +#endif const C_TCFlag_t Posix_TTY_I_IXANY = IXANY; +#ifndef IXOFF +#define IXOFF -1 +#endif const C_TCFlag_t Posix_TTY_I_IXOFF = IXOFF; +#ifndef IXON +#define IXON -1 +#endif const C_TCFlag_t Posix_TTY_I_IXON = IXON; +#ifndef PARMRK +#define PARMRK -1 +#endif const C_TCFlag_t Posix_TTY_I_PARMRK = PARMRK; +#ifndef OPOST +#define OPOST -1 +#endif const C_TCFlag_t Posix_TTY_O_OPOST = OPOST; +#ifndef ONLCR +#define ONLCR -1 +#endif const C_TCFlag_t Posix_TTY_O_ONLCR = ONLCR; +#ifndef OCRNL +#define OCRNL -1 +#endif const C_TCFlag_t Posix_TTY_O_OCRNL = OCRNL; +#ifndef ONOCR +#define ONOCR -1 +#endif const C_TCFlag_t Posix_TTY_O_ONOCR = ONOCR; +#ifndef ONLRET +#define ONLRET -1 +#endif const C_TCFlag_t Posix_TTY_O_ONLRET = ONLRET; +#ifndef OFILL +#define OFILL -1 +#endif const C_TCFlag_t Posix_TTY_O_OFILL = OFILL; +#ifndef NLDLY +#define NLDLY -1 +#endif const C_TCFlag_t Posix_TTY_O_NLDLY = NLDLY; +#ifndef NL0 +#define NL0 -1 +#endif const C_TCFlag_t Posix_TTY_O_NL0 = NL0; +#ifndef NL1 +#define NL1 -1 +#endif const C_TCFlag_t Posix_TTY_O_NL1 = NL1; +#ifndef CRDLY +#define CRDLY -1 +#endif const C_TCFlag_t Posix_TTY_O_CRDLY = CRDLY; +#ifndef CR0 +#define CR0 -1 +#endif const C_TCFlag_t Posix_TTY_O_CR0 = CR0; +#ifndef CR1 +#define CR1 -1 +#endif const C_TCFlag_t Posix_TTY_O_CR1 = CR1; +#ifndef CR2 +#define CR2 -1 +#endif const C_TCFlag_t Posix_TTY_O_CR2 = CR2; +#ifndef CR3 +#define CR3 -1 +#endif const C_TCFlag_t Posix_TTY_O_CR3 = CR3; +#ifndef TABDLY +#define TABDLY -1 +#endif const C_TCFlag_t Posix_TTY_O_TABDLY = TABDLY; +#ifndef TAB0 +#define TAB0 -1 +#endif const C_TCFlag_t Posix_TTY_O_TAB0 = TAB0; +#ifndef TAB1 +#define TAB1 -1 +#endif const C_TCFlag_t Posix_TTY_O_TAB1 = TAB1; +#ifndef TAB2 +#define TAB2 -1 +#endif const C_TCFlag_t Posix_TTY_O_TAB2 = TAB2; +#ifndef TAB3 +#define TAB3 -1 +#endif const C_TCFlag_t Posix_TTY_O_TAB3 = TAB3; +#ifndef BSDLY +#define BSDLY -1 +#endif const C_TCFlag_t Posix_TTY_O_BSDLY = BSDLY; +#ifndef BS0 +#define BS0 -1 +#endif const C_TCFlag_t Posix_TTY_O_BS0 = BS0; +#ifndef BS1 +#define BS1 -1 +#endif const C_TCFlag_t Posix_TTY_O_BS1 = BS1; +#ifndef VTDLY +#define VTDLY -1 +#endif const C_TCFlag_t Posix_TTY_O_VTDLY = VTDLY; +#ifndef VT0 +#define VT0 -1 +#endif const C_TCFlag_t Posix_TTY_O_VT0 = VT0; +#ifndef VT1 +#define VT1 -1 +#endif const C_TCFlag_t Posix_TTY_O_VT1 = VT1; +#ifndef FFDLY +#define FFDLY -1 +#endif const C_TCFlag_t Posix_TTY_O_FFDLY = FFDLY; +#ifndef FF0 +#define FF0 -1 +#endif const C_TCFlag_t Posix_TTY_O_FF0 = FF0; +#ifndef FF1 +#define FF1 -1 +#endif const C_TCFlag_t Posix_TTY_O_FF1 = FF1; +#ifndef CSIZE +#define CSIZE -1 +#endif const C_TCFlag_t Posix_TTY_C_CSIZE = CSIZE; +#ifndef CS5 +#define CS5 -1 +#endif const C_TCFlag_t Posix_TTY_C_CS5 = CS5; +#ifndef CS6 +#define CS6 -1 +#endif const C_TCFlag_t Posix_TTY_C_CS6 = CS6; +#ifndef CS7 +#define CS7 -1 +#endif const C_TCFlag_t Posix_TTY_C_CS7 = CS7; +#ifndef CS8 +#define CS8 -1 +#endif const C_TCFlag_t Posix_TTY_C_CS8 = CS8; +#ifndef CSTOPB +#define CSTOPB -1 +#endif const C_TCFlag_t Posix_TTY_C_CSTOPB = CSTOPB; +#ifndef CREAD +#define CREAD -1 +#endif const C_TCFlag_t Posix_TTY_C_CREAD = CREAD; +#ifndef PARENB +#define PARENB -1 +#endif const C_TCFlag_t Posix_TTY_C_PARENB = PARENB; +#ifndef PARODD +#define PARODD -1 +#endif const C_TCFlag_t Posix_TTY_C_PARODD = PARODD; +#ifndef HUPCL +#define HUPCL -1 +#endif const C_TCFlag_t Posix_TTY_C_HUPCL = HUPCL; +#ifndef CLOCAL +#define CLOCAL -1 +#endif const C_TCFlag_t Posix_TTY_C_CLOCAL = CLOCAL; +#ifndef ECHO +#define ECHO -1 +#endif const C_TCFlag_t Posix_TTY_L_ECHO = ECHO; +#ifndef ECHOE +#define ECHOE -1 +#endif const C_TCFlag_t Posix_TTY_L_ECHOE = ECHOE; +#ifndef ECHOK +#define ECHOK -1 +#endif const C_TCFlag_t Posix_TTY_L_ECHOK = ECHOK; +#ifndef ECHONL +#define ECHONL -1 +#endif const C_TCFlag_t Posix_TTY_L_ECHONL = ECHONL; +#ifndef ICANON +#define ICANON -1 +#endif const C_TCFlag_t Posix_TTY_L_ICANON = ICANON; +#ifndef IEXTEN +#define IEXTEN -1 +#endif const C_TCFlag_t Posix_TTY_L_IEXTEN = IEXTEN; +#ifndef ISIG +#define ISIG -1 +#endif const C_TCFlag_t Posix_TTY_L_ISIG = ISIG; +#ifndef NOFLSH +#define NOFLSH -1 +#endif const C_TCFlag_t Posix_TTY_L_NOFLSH = NOFLSH; +#ifndef TOSTOP +#define TOSTOP -1 +#endif const C_TCFlag_t Posix_TTY_L_TOSTOP = TOSTOP; +#ifndef B0 +#define B0 -1 +#endif const C_Speed_t Posix_TTY_B0 = B0; +#ifndef B50 +#define B50 -1 +#endif const C_Speed_t Posix_TTY_B50 = B50; +#ifndef B75 +#define B75 -1 +#endif const C_Speed_t Posix_TTY_B75 = B75; +#ifndef B110 +#define B110 -1 +#endif const C_Speed_t Posix_TTY_B110 = B110; +#ifndef B134 +#define B134 -1 +#endif const C_Speed_t Posix_TTY_B134 = B134; +#ifndef B150 +#define B150 -1 +#endif const C_Speed_t Posix_TTY_B150 = B150; +#ifndef B200 +#define B200 -1 +#endif const C_Speed_t Posix_TTY_B200 = B200; +#ifndef B300 +#define B300 -1 +#endif const C_Speed_t Posix_TTY_B300 = B300; +#ifndef B600 +#define B600 -1 +#endif const C_Speed_t Posix_TTY_B600 = B600; +#ifndef B1200 +#define B1200 -1 +#endif const C_Speed_t Posix_TTY_B1200 = B1200; +#ifndef B1800 +#define B1800 -1 +#endif const C_Speed_t Posix_TTY_B1800 = B1800; +#ifndef B2400 +#define B2400 -1 +#endif const C_Speed_t Posix_TTY_B2400 = B2400; +#ifndef B4800 +#define B4800 -1 +#endif const C_Speed_t Posix_TTY_B4800 = B4800; +#ifndef B9600 +#define B9600 -1 +#endif const C_Speed_t Posix_TTY_B9600 = B9600; +#ifndef B19200 +#define B19200 -1 +#endif const C_Speed_t Posix_TTY_B19200 = B19200; +#ifndef B38400 +#define B38400 -1 +#endif const C_Speed_t Posix_TTY_B38400 = B38400; +#ifndef TCSADRAIN +#define TCSADRAIN -1 +#endif const C_Int_t Posix_TTY_TC_TCSADRAIN = TCSADRAIN; +#ifndef TCSAFLUSH +#define TCSAFLUSH -1 +#endif const C_Int_t Posix_TTY_TC_TCSAFLUSH = TCSAFLUSH; +#ifndef TCSANOW +#define TCSANOW -1 +#endif const C_Int_t Posix_TTY_TC_TCSANOW = TCSANOW; +#ifndef TCIOFF +#define TCIOFF -1 +#endif const C_Int_t Posix_TTY_TC_TCIOFF = TCIOFF; +#ifndef TCION +#define TCION -1 +#endif const C_Int_t Posix_TTY_TC_TCION = TCION; +#ifndef TCOOFF +#define TCOOFF -1 +#endif const C_Int_t Posix_TTY_TC_TCOOFF = TCOOFF; +#ifndef TCOON +#define TCOON -1 +#endif const C_Int_t Posix_TTY_TC_TCOON = TCOON; +#ifndef TCIFLUSH +#define TCIFLUSH -1 +#endif const C_Int_t Posix_TTY_TC_TCIFLUSH = TCIFLUSH; +#ifndef TCIOFLUSH +#define TCIOFLUSH -1 +#endif const C_Int_t Posix_TTY_TC_TCIOFLUSH = TCIOFLUSH; +#ifndef TCOFLUSH +#define TCOFLUSH -1 +#endif const C_Int_t Posix_TTY_TC_TCOFLUSH = TCOFLUSH; |
From: Matthew F. <fl...@ml...> - 2006-05-09 18:28:36
|
Wesley's patches for powerpc-darwin ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/sysconf-consts.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/objptr.c U mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.c U mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.h U mlton/branches/on-20050822-x86_64-branch/runtime/platform/getText.c U mlton/branches/on-20050822-x86_64-branch/runtime/platform.h U mlton/branches/on-20050822-x86_64-branch/runtime/util/Makefile ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/sysconf-consts.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/sysconf-consts.c 2006-05-10 01:19:57 UTC (rev 4508) +++ mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/sysconf-consts.c 2006-05-10 01:28:35 UTC (rev 4509) @@ -489,7 +489,7 @@ #define _SC_XOPEN_SHM -1 #endif const C_Int_t Posix_ProcEnv_SC_XOPEN_SHM = _SC_XOPEN_SHM; -#ifndef __SC_XOPEN_STREAMS +#ifndef _SC_XOPEN_STREAMS #define _SC_XOPEN_STREAMS -1 #endif #ifndef _SC_XOPEN_STREAMS Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/objptr.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/objptr.c 2006-05-10 01:19:57 UTC (rev 4508) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/objptr.c 2006-05-10 01:28:35 UTC (rev 4509) @@ -23,7 +23,7 @@ uintptr_t P_; pointer P; - if GC_MODEL_USEBASE { + if (GC_MODEL_USEBASE) { B_ = (uintptr_t)B; } else { B_ = 0; @@ -44,7 +44,7 @@ uintptr_t O_; objptr O; - if GC_MODEL_USEBASE { + if (GC_MODEL_USEBASE) { B_ = (uintptr_t)B; } else { B_ = 0; Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.c 2006-05-10 01:19:57 UTC (rev 4508) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.c 2006-05-10 01:28:35 UTC (rev 4509) @@ -8,21 +8,20 @@ #include "mmap-protect.c" #include "use-mmap.c" -void *getTextEnd () { - return (void*)(get_etext ()); +const void *GC_getTextEnd (void) { + return (const void*)(long)(get_etext ()); } -void *getTextStart () { - unsigned long address; - void *module; - struct mach_header *mh; +const void *GC_getTextStart (void) { + void *address; + const struct mach_header *mh; - _dyld_lookup_and_bind ("_main", &address, &module); + _dyld_lookup_and_bind ("_main", &address, 0); mh = _dyld_get_image_header_containing_address (address); return mh; } -void GC_displayMem () { +void GC_displayMem (void) { /* FIXME: this won't actually work. */ static char buffer[256]; @@ -41,7 +40,7 @@ sa->sa_sigaction = (void (*)(int, siginfo_t*, void*))catcher; } -W32 GC_totalRam (GC_state s) { +size_t GC_totalRam (void) { int mem; size_t len; Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.h 2006-05-10 01:19:57 UTC (rev 4508) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/darwin.h 2006-05-10 01:28:35 UTC (rev 4509) @@ -32,3 +32,18 @@ #define HAS_TIME_PROFILING TRUE #define MLton_Platform_OS_host "darwin" + +// MacOS doesn't support these... yet. +#ifndef O_RSYNC +#define O_RSYNC O_SYNC +#endif +#ifndef O_DSYNC +#define O_DSYNC O_SYNC +#endif + +// MacOS only defines this if POSIX_C_SOURCE is defined. +// However, defining that breaks half the osx system headers. +// They couldn't possibly change the number at this point anyways. +#ifndef SIGPOLL +#define SIGPOLL 7 +#endif Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/getText.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform/getText.c 2006-05-10 01:19:57 UTC (rev 4508) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/getText.c 2006-05-10 01:28:35 UTC (rev 4509) @@ -2,9 +2,9 @@ extern char _start; extern char etext; -void *GC_getTextStart (void) { +const void *GC_getTextStart (void) { return &_start; } -void *GC_getTextEnd (void) { +const void *GC_getTextEnd (void) { return &etext; } Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform.h 2006-05-10 01:19:57 UTC (rev 4508) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform.h 2006-05-10 01:28:35 UTC (rev 4509) @@ -156,8 +156,8 @@ /* Text Segment */ /* ------------------------------------------------- */ -void *GC_getTextEnd (void); -void *GC_getTextStart (void); +const void *GC_getTextEnd (void); +const void *GC_getTextStart (void); /* ------------------------------------------------- */ /* SigProf Handler */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/util/Makefile =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/util/Makefile 2006-05-10 01:19:57 UTC (rev 4508) +++ mlton/branches/on-20050822-x86_64-branch/runtime/util/Makefile 2006-05-10 01:28:35 UTC (rev 4509) @@ -71,10 +71,10 @@ DEBUGFLAGS = $(CFLAGS) -Wunused -gstabs+ -g2 CFILES = \ - $(shell find -type f | grep '\.c$$') + $(shell find . -type f | grep '\.c$$') HFILES = \ - $(shell find -type f | grep '\.h$$') + $(shell find . -type f | grep '\.h$$') all: libgc.o libgc-gdb.o |