constant file with names...

Anoq of the Sun anoq@hardcoreprocessing.com
Fri, 01 Feb 2002 02:41:00 +0100


This is a multi-part message in MIME format.
--------------C82EA135E611229345CAF131
Content-Type: text/plain; charset=iso-8859-7
Content-Transfer-Encoding: 7bit

Hello again!


I have now implemented the sanity-check for
the constants file that we talked about earlier.
I hope that Assert.assert will complain loud enough
if such a check fails :)

I have attached the constants files for Linux
and Win32.

The flags which differ between the platforms might
give problems.

Especially things like the Posix_FileSys_O_* flags.
If the compiler uses these when generating files
during compilation then when the cross-compiler
is built this needs to be the Linux-values so that
the crosscompiler will write out it's crosscompiled
applications to files on Linux correctly - but
the crosscompiler needs to generate applications
which uses the Win32-values when those applications
are running. And if the compiler itself and the
SML Basis library uses the same TextIO module -
then I think that might give a problem :)

And this should also show that there is a difference
in the semantics of those constants when compiling
the compiler itself to Win32 and when compiling
other applications to Win32.

So I think 2 distinctions are needed for this bootstrapping:
1) Host vs. Target
2) Comiling the compiler itself vs. compiling an app.

But probably the distinction: "Host", "Target" and "Source"
that I already added support for in the bin/mlton
script is better. I think it's what gcc uses for it's
crosscompiler bootstrapping.

Hmm... maybe it's time to do some futamura projection excercises ;)


Cheers
-- 
http://www.HardcoreProcessing.com
--------------C82EA135E611229345CAF131
Content-Type: text/plain; charset=iso-8859-7;
 name="mlton.const_named_Win32"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="mlton.const_named_Win32"

Posix_Signal_numSignals=32
Posix_Signal_vtalrm=26
Posix_Signal_prof=27
Posix_Signal_alrm=13
Posix_FileSys_F_OK=0
Posix_FileSys_X_OK=1
Posix_FileSys_W_OK=2
Posix_FileSys_R_OK=4
Posix_FileSys_o_rdwr=2
Posix_FileSys_o_wronly=1
Posix_FileSys_o_rdonly=0
Posix_FileSys_O_text=4000
Posix_FileSys_O_trunc=200
Posix_FileSys_O_excl=400
Posix_FileSys_O_creat=100
Posix_FileSys_O_append=8
Posix_FileSys_S_iwoth=2
Posix_FileSys_S_iroth=4
Posix_FileSys_S_irwxo=7
Posix_FileSys_S_iwgrp=10
Posix_FileSys_S_irgrp=20
Posix_FileSys_S_irwxg=38
Posix_FileSys_S_iwusr=80
Posix_FileSys_S_irusr=100
Posix_FileSys_S_irwxu=1c0
Posix_Error_xdev=18
Posix_Error_toobig=7
Posix_Error_srch=3
Posix_Error_spipe=29
Posix_Error_rofs=30
Posix_Error_range=34
Posix_Error_pipe=32
Posix_Error_perm=1
Posix_Error_nxio=6
Posix_Error_notty=25
Posix_Error_notsup=0
Posix_Error_notempty=41
Posix_Error_notdir=20
Posix_Error_nosys=40
Posix_Error_nospc=28
Posix_Error_nomem=12
Posix_Error_nolck=39
Posix_Error_noexec=8
Posix_Error_noent=2
Posix_Error_nodev=19
Posix_Error_nfile=23
Posix_Error_nametoolong=38
Posix_Error_msgsize=10040
Posix_Error_mlink=31
Posix_Error_mfile=24
Posix_Error_loop=10062
Posix_Error_isdir=21
Posix_Error_io=5
Posix_Error_inval=22
Posix_Error_intr=4
Posix_Error_inprogress=10036
Posix_Error_fbig=27
Posix_Error_fault=14
Posix_Error_exist=17
Posix_Error_dom=33
Posix_Error_deadlk=36
Posix_Error_child=10
Posix_Error_canceled=0
Posix_Error_busy=16
Posix_Error_badmsg=77
Posix_Error_badf=9
Posix_Error_again=11
Posix_Error_acces=13
Real_Class_zero=3
Real_Class_subnormal=5
Real_Class_normal=4
Real_Class_nanSignalling=1
Real_Class_nanQuiet=0
Real_Class_inf=2
Itimer_virtual=1
Itimer_real=0
Itimer_prof=2
Array_maxLen=1073741823
MLton_safe=true
MLton_isLittleEndian=true
MLton_detectOverflow=true
MLton_debug=false

--------------C82EA135E611229345CAF131
Content-Type: text/plain; charset=iso-8859-7;
 name="mlton.const_named_Linux"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="mlton.const_named_Linux"

Posix_Signal_numSignals=64
Posix_Signal_vtalrm=26
Posix_Signal_prof=27
Posix_Signal_alrm=14
Posix_FileSys_F_OK=0
Posix_FileSys_X_OK=1
Posix_FileSys_W_OK=2
Posix_FileSys_R_OK=4
Posix_FileSys_o_rdwr=2
Posix_FileSys_o_wronly=1
Posix_FileSys_o_rdonly=0
Posix_FileSys_O_text=0
Posix_FileSys_O_trunc=200
Posix_FileSys_O_excl=80
Posix_FileSys_O_creat=40
Posix_FileSys_O_append=400
Posix_FileSys_S_iwoth=2
Posix_FileSys_S_iroth=4
Posix_FileSys_S_irwxo=7
Posix_FileSys_S_iwgrp=10
Posix_FileSys_S_irgrp=20
Posix_FileSys_S_irwxg=38
Posix_FileSys_S_iwusr=80
Posix_FileSys_S_irusr=100
Posix_FileSys_S_irwxu=1c0
Posix_Error_xdev=18
Posix_Error_toobig=7
Posix_Error_srch=3
Posix_Error_spipe=29
Posix_Error_rofs=30
Posix_Error_range=34
Posix_Error_pipe=32
Posix_Error_perm=1
Posix_Error_nxio=6
Posix_Error_notty=25
Posix_Error_notsup=95
Posix_Error_notempty=39
Posix_Error_notdir=20
Posix_Error_nosys=38
Posix_Error_nospc=28
Posix_Error_nomem=12
Posix_Error_nolck=37
Posix_Error_noexec=8
Posix_Error_noent=2
Posix_Error_nodev=19
Posix_Error_nfile=23
Posix_Error_nametoolong=36
Posix_Error_msgsize=90
Posix_Error_mlink=31
Posix_Error_mfile=24
Posix_Error_loop=40
Posix_Error_isdir=21
Posix_Error_io=5
Posix_Error_inval=22
Posix_Error_intr=4
Posix_Error_inprogress=115
Posix_Error_fbig=27
Posix_Error_fault=14
Posix_Error_exist=17
Posix_Error_dom=33
Posix_Error_deadlk=35
Posix_Error_child=10
Posix_Error_canceled=125
Posix_Error_busy=16
Posix_Error_badmsg=74
Posix_Error_badf=9
Posix_Error_again=11
Posix_Error_acces=13
Real_Class_zero=3
Real_Class_subnormal=5
Real_Class_normal=4
Real_Class_nanSignalling=1
Real_Class_nanQuiet=0
Real_Class_inf=2
Itimer_virtual=1
Itimer_real=0
Itimer_prof=2
Array_maxLen=1073741823
MLton_safe=true
MLton_isLittleEndian=true
MLton_detectOverflow=true
MLton_debug=false

--------------C82EA135E611229345CAF131--