From uamoore at birch.elego.de Mon Dec 11 14:40:57 2006 From: uamoore at birch.elego.de (Ulrike Amoore) Date: Mon, 11 Dec 2006 14:40:57 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612111340.kBBDevPH008949@birch.elego.de> CVSROOT: /usr/cvs Changes by: uamoore at birch. 06/12/11 14:40:57 Modified files: cm3/www/: about-cm3.html Log message: link actualized From uamoore at birch.elego.de Thu Dec 14 09:23:31 2006 From: uamoore at birch.elego.de (Ulrike Amoore) Date: Thu, 14 Dec 2006 9:23:31 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612140823.kBE8NV1m026847@birch.elego.de> CVSROOT: /usr/cvs Changes by: uamoore at birch. 06/12/14 09:23:31 Added files: cm3/www/: ANNOUNCE_5_4_0 Log message: Release-Announcement 5.4.0 From uamoore at birch.elego.de Wed Dec 13 11:13:43 2006 From: uamoore at birch.elego.de (Ulrike Amoore) Date: Wed, 13 Dec 2006 11:13:43 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612131013.kBDADhwG024648@birch.elego.de> CVSROOT: /usr/cvs Changes by: uamoore at birch. 06/12/13 11:13:43 Modified files: cm3/www/: index.html Log message: link to http://www.research.compaq.com/SRC/m3defn/html/intro.html#idx.0 hidden, as it is not working From jkrell at birch.elego.de Fri Dec 29 21:54:11 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Fri, 29 Dec 2006 21:54:11 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612292054.kBTKsBVA019685@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/29 21:54:11 Modified files: cm3/m3-sys/cm3/src/config/: FreeBSD2 FreeBSD3 FreeBSD4 I386_DARWIN IBMR2 LINUXELF LINUXLIBC6 NetBSD2_i386 PPC_DARWIN PPC_LINUX SPARC Log message: remove Windows comment from non-Windows files From jkrell at birch.elego.de Sat Dec 30 02:07:23 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 2:07:23 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300107.kBU17N8K008720@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 02:07:23 Modified files: cm3/m3-libs/m3core/src/win32/: WinBase.i3 Log message: add missing TLS_OUT_OF_INDEXES = FFFFFFFF to WinBase.i3, instead of checking for negative numbers, to be usd shortly From jkrell at birch.elego.de Sat Dec 30 02:18:06 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 2:18:06 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300118.kBU1I6e5008873@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 02:18:06 Modified files: cm3/m3-libs/m3core/src/thread/WIN32/: ThreadWin32.m3 Log message: important: fix infinite recursion in Win32 startup correct check for TlsAlloc failure (TLS_OUT_OF_INDEXES instead of < 0) reduce critical sections slightly (esp. to avoid calling out while in a critical section, including to DuplicateHandle, CreateThread, VirtualQuery) From jkrell at birch.elego.de Sat Dec 30 02:33:51 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 2:33:51 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300133.kBU1XpJa009041@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 02:33:51 Added files: cm3/scripts/win/: backup-pkgs.cmd clearenv.cmd do-cm3-base.cmd do-cm3-core.cmd do-cm3-min.cmd do-cm3-std.cmd do-pkg.cmd find-packages.cmd install-cm3-compiler.cmd pkgcmds.cmd pkginfo.cmd pkgmap.cmd sysinfo.cmd upgrade.cmd Log message: new and revised Windows .cmd programs, some are slight revisions of earlier, some are new ports of more *.sh programs backup-pkgs.cmd -- new, part of upgrade.cmd, works well clearenv.cmd -- trivial def-std-pkgs.cmd -- works well do-cm3-base.cmd -- works well do-cm3-core.cmd -- works well do-cm3-min.cmd -- works well do-cm3-std.cmd -- works well do-pkg.cmd -- works well find-packages.cmd -- part of do-*, works well install-cm3-compiler.cmd -- new, works well make-bin-dist-min.cmd -- new, work in progress, unfinished, does not work pkgcmds.cmd -- part of do-*, works well pkginfo.cmd -- part of do-*, works well pkgmap.cmd -- part of do-*, works well sysinfo.cmd -- part of do-*, works well (TBD support for Digital SRC Modula-3 and PM3) upgrade.cmd -- new, works well This all needs to be ported to Modula-3 and/or Quake. The Digital distribution used Quake well here. From jkrell at birch.elego.de Sat Dec 30 02:57:49 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 2:57:49 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300157.kBU1vo6f009431@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 02:57:49 Added files: cm3/scripts/win/lib/: advapi32.txt comctl32.txt comdlg32.txt gdi32.txt glu32.txt kernel32.txt make-lib-1.cmd make-lib-2.cmd make-lib.cmd netapi32.txt odbc32.txt odbccp32.txt opengl32.txt user32.txt winspool.txt wsock32.txt Log message: new infrastructure for making Windows import .libs pass 1 (make-lib-1.cmd): Text files are generated from existing import .libs (including the output of this process) using a mix of cmd, Perl, and the Visual C++ compiler and linker (esp. link /dump). A few odd/useless functions are hard-coded-ly removed. A few functions missing in old .libs are hard-coded-ly added. A variety of versions of Visual C++ from 2.0 through 8.0 were tested, necessitating code changes as link /dump has changed significantly. (Link /dump is equivalent to dumpbin but saves a process, see link /help). Temp space is good in uniqueness and cleanup via Perl libs. Checkin text files. pass 2 (make-lib-2.cmd): Using just cmd, compiler/linker, produce C and .def files from pass 1 and build .dlls (ignored) and their associated import .libs. Import .libs are copied to %INSTALLROOT%\lib. %INSTALLROOT% defaults to \cm3. Temp space is lame due to cmd -- uses the current working directory. From jkrell at birch.elego.de Sat Dec 30 03:51:43 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 3:51:43 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300251.kBU2phDm010665@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 03:51:43 Modified files: cm3/m3-libs/m3gc-enhanced/src/: m3makefile Log message: lame but ok Win32 build break workaround -- write out the empty file to both the Unix and Win32 naming style From jkrell at birch.elego.de Sat Dec 30 04:02:29 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 4:02:29 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300302.kBU32UHF010858@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 04:02:29 Modified files: cm3/m3-libs/m3gc-simple/src/: m3makefile Log message: lame but ok Win32 build break workaround -- write out the empty file to both the Unix and Win32 naming style From jkrell at birch.elego.de Sat Dec 30 04:04:04 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 4:04:04 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300304.kBU344LB010904@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 04:04:04 Modified files: cm3/m3-libs/m3gc-simple/src/: m3makefile Log message: try again, must not be needed but for consistency -- lame but ok Win32 build break workaround -- write out the empty file to both the Unix and Win32 naming style From jkrell at birch.elego.de Sat Dec 30 04:05:58 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 4:05:58 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300305.kBU35wB6010962@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 04:05:57 Added files: cm3/scripts/win/c-runtime/: Microsoft.VC80.CRT.manifest msvcr80.cmd msvcr80.dll use_msvcr80.manifest Log message: support for msvcr80.dll, the dynamically linked Microsoft C runtime version 8.0 Roughly, .exes using msvcr80.dll need foo.exe.manifest, in the directory with them, and for systems that don't have the redist or development tools installed, also Microsoft.VC80.CRT.manifest and msvcr80.dll. The .manifest files are only for Windows XP and newer. Win9x/WinNT4/Win2000 ignore them.) msvcr80.cmd enumerates all .exes in the cm3 install, which is defined by finding cm3.exe in %PATH%, and using the directory above its directory. We attempt to use hard links to preserve disk space, using "fsutil hardlink create new-link existing-file". This works on at least XP and up on NTFS. If this fails, copying is used. Fsutil requires being an administrator, which is just bogus, since creating hard links does not. (For example with Perl's link or kernel32!CreateHardLinkW directly, or via some other APIs prior to Windows 2000.) Windows Vista cmd includes a mklink command. Hard links cannot span volumes. Therefore the files for cm3.exe itself are handled first and made the source for subsequent links. That way, if the source code and install are on different drives, diskspace should still be preserved. That case was not however tested. NOTE that hard links directly into the source tree are made, which violates usual soure tree / install tree separation. The files change very very rarely however. There is a redist and a Microsoft Installer Merge Module (.msm) in the "regular" versions, but not in the free download Express Editions. This is at least useful for bootstrapping. There are advantages and disadvantages here. The linker can/does produce the .manifest files via merging fragments from #pragmas. cm3 -ship needs to copy them along with .exes, and it will shortly. Manifests can also be embedded in resources in files, which works in more scenarios, and removes the need to copy/hardlink the extra files. .dlls in particular need the manifest in resources. Another option would be to use libcmt.lib, but that is bad in terms of size, performance, and updating (the centrally installed copy is favored over the .exe's directory if they match in version or if it is an import security-only fix). Another option would be export the C runtime from m3core.dll, via libcmt.lib or msvcr80.dll, and have it deal with a manifest if necessary. This has nice "hiding" and "bottlenecking" properties, no other Modula-3 would be dependent on the C runtime, just m3core.dll, even the startup coe could be imported/exported, but it is unusual, would not interoperate well for example with code that needs additional functions in the C runtime, and related to the first, is kind of odd for the case of handling multiple C runtime versions -- you'd have to union the exports and hope they don't grow in newer versions faster than your ability to handle them. Forwarders would be nice if Win9x support can be dropped, but again still there is the race to keep up. The comments outweigh the code.. From jkrell at birch.elego.de Sat Dec 30 04:27:08 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 4:27:08 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300327.kBU3R9Sw011312@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 04:27:08 Modified files: cm3/scripts/: .cvsignore do-cm3-std.bat make-bin-dist-min.sh v526_all.CM3P Removed files: cm3/scripts/: do-cm3-base.cmd do-cm3-core.cmd do-cm3-std.cmd find-packages.cmd pkgcmds.cmd pkginfo.cmd pkgmap.cmd sysinfo.cmd Log message: Windows files moved to "win" directory From jkrell at birch.elego.de Sat Dec 30 04:30:17 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 4:30:17 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300330.kBU3UI0O011410@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 04:30:17 Added files: cm3/scripts/win/: def-std-pkgs.cmd Log message: add forgotten file From jkrell at birch.elego.de Sat Dec 30 05:02:27 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 5:02:27 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300402.kBU42SST012762@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 05:02:27 Modified files: cm3/scripts/win/lib/: advapi32.txt comctl32.txt comdlg32.txt gdi32.txt glu32.txt kernel32.txt netapi32.txt odbc32.txt odbccp32.txt opengl32.txt user32.txt winspool.txt wsock32.txt Log message: reflect real origin of the data From jkrell at birch.elego.de Sat Dec 30 07:17:16 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 7:17:16 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300617.kBU6HG9F016863@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 07:17:15 Modified files: cm3/m3-sys/cm3/src/config/: NT386 Log message: For better and worse, rely on %PATH% and %LIB% environment variables instead of configured full paths. From jkrell at birch.elego.de Sat Dec 30 07:18:57 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 7:18:57 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300618.kBU6IvJO016915@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 07:18:57 Modified files: cm3/m3-sys/cm3/src/config/: NT386 Log message: Do not hide commands. From jkrell at birch.elego.de Sat Dec 30 07:19:29 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 7:19:29 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300619.kBU6JTdw016944@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 07:19:29 Modified files: cm3/m3-sys/cm3/src/config/: NT386 Log message: Lowercase the one instance of uppercase 'LINK'. From jkrell at birch.elego.de Sat Dec 30 07:22:32 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 7:22:32 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300622.kBU6MWem017067@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 07:22:32 Modified files: cm3/m3-sys/cm3/src/config/: NT386 Log message: Unix is bad. Use Microsoft style command line switches to Microsoft tools (not mklib). From jkrell at birch.elego.de Sat Dec 30 07:23:27 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 7:23:27 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300623.kBU6NRZl017105@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 07:23:27 Modified files: cm3/m3-sys/cm3/src/config/: NT386 Log message: Add one missing horizontal whitespace. From jkrell at birch.elego.de Sat Dec 30 07:25:47 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 7:25:47 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300625.kBU6PltO017205@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 07:25:47 Modified files: cm3/m3-sys/cm3/src/config/: NT386 Log message: Move slashes around with no real effect to unify with the other copy of this file, the one that is more likely actually alive. Eventually the files will be almost identical. From jkrell at birch.elego.de Sat Dec 30 08:07:29 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 8:07:29 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300707.kBU77TUV018007@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 08:07:29 Modified files: cm3/m3-sys/cm3/src/config/: NT386 Log message: Update compiler and linker flags, prep for changes around .pdb and .manifest files, cleanup some comments, etc. Many of the previously specified flags are odd and appear to come from an old Windows SDK win32.mak. That is not a particularly common way to build things, not a good example to follow. It is neither the Windows DDK that resembles the Windows (NT) build enviroment, nor it is any version of the Visual C++ IDE. link /debug means produce a .pdb. Use that. link /incremental:no is still pretty fast and avoids some warnings I vaguely recall. It produces somewhat smaller/faster binaries. It might be nice to expose this at a higher level to give users a choice of faster linking. Even the first link is faster without /incremental:no I recall. compiler: Debug information does not inhibit optimization and though optimized code is somewhat difficult to debug, you are still much better off with symbols than without. Therefore always produce debug information. link /debugtype:cv is surely the default, remove it. link /pdb:none is nice -- it puts the debug info in the .exe, and comments indicate that Windbg required it, but current linkers do not support this option, current Windbg does not require it, no Visual C++ GUI debugger ever required it. Remove it. link /align:0x1000 produces warnings I recall and surely is not necessary. Section alignment defaults to 4K == page size. (except Itanium? 8K?) File alignment defaults to either 4k or 512 depending. 4k is better for Win9x perf. all NT files use 512 which is smaller and fine for NT perf. Whatever this switch does, it is rarely used and not needed here, remove it. link /debug:mapped -- related to debug information in the .exe, remove it. link /debug:partial -- I don't know what this did, but debugging is hard enough, let's get whatever "full" information there is. /Z7 vs. /Zi With /Zi, the compiler puts type information in a .pdb whose default name depends on compiler -- vc50.pdb, vc80.pdb, etc. but which can be renamed like to foo_compiler.pdb with the /Fd switch. The type information is shared across source/object files. It is smaller/faster. With /Z7, type information is duplicated in every .obj. This is bigger and slower. Older linkers by default produce foo.pdb that refereneces vc*.pdb. This is why older debuggers often prompt for that file. Older linkers have an option /pdbtype that can be /pdbtype:septtypes or /pdbtype:consolidate. 5.0 has this for example. The default is septtypes. Consolidate produces a standalone .pdb. Newer linkers default to /pdbtype:consolidate and don't have an option to use the old default. The ideal is to use /Zi and /Fd and with older linkers /pdbtype:consolidate. But we don't have configuration that checks the linker version. For now use /Z7 which always works and produces one .pdb per link output. /Z7 also provides for standalone .libs. Despite being "old", /Z7 is still widely used (see the Windows DDK). There is very little C compilation in the system anyway so doesn't matter much. cl /_DLL is implied by cl /MD cl /_MT is implied by cl /MT or cl /MT /D_DLL informs the C runtime headers that the dynamic C runtime will be linked to. /D_MT informs the C runtime headers that a thread safe C runtime will be linked to. /D_DLL implies /D_MT at least in principle. There are no longer any thread-unsafe C runtimes and /MT is the default. Unify INITIAL_REACTOR_EDITOR and commented out INITIAL_REACTOR_BROWSER with the other copy of this file. I assume this is ok but might result in unexpected prompts. Prep for using the Visual C++ 8.0 dynamic runtime which requires a little more work. There is a new configuration option UseDynamicCRuntime which can be TRUE or FALSE but which for now is FALSE. TRUE is working on my machine but requires either a change to cm3 to copy along .manifest files or running scripts\win\msvcr80.cmd which is new. Cleanup some comments, whitespace, remove dead commented out code. We are dealing with files, not junk. Comment on the dumb use of a process to rename a file. Prep for cm3 change that will copy along .pdb files (and .manifests). .map files are junk, don't produce them. cl /DWIN32 is needed for old Windows headers (Visual C++ 2.0) newer headers use _WIN32 and current compilers #define it by default. cl /D_X86_ probably is defined by the compiler but I didn't check yet. Using /Z7 lets us remove the deletion of vc40.pdb (or whatever the .pdb gets named). From jkrell at birch.elego.de Sat Dec 30 08:11:34 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 8:11:34 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300711.kBU7BYkT018126@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 08:11:34 Modified files: cm3/m3-sys/cm3/src/config/: NT386 Log message: fix grammar in comment From jkrell at birch.elego.de Sat Dec 30 08:16:49 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 8:16:49 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300716.kBU7GnuB018182@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 08:16:49 Modified files: cm3/m3-sys/cminstall/src/config/: NT386 Log message: unification with C:\dev2\cm3\m3-sys\cm3\src\config\NT386, see history there roughly: depend on environment variables %LIB% and %PATH% instead of configuring full paths redo compiler and linker flags to work, work with many versions of Visual C++, always produce debugging information cleanup some comments prep for C runtime 8.0 support and cm3 copying of .pdb and .manifest files From jkrell at birch.elego.de Sat Dec 30 08:30:29 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 8:30:29 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300730.kBU7UTOU018360@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 08:30:29 Modified files: cm3/m3-sys/cm3/src/config/: NT386 cm3/m3-sys/cminstall/src/config/: NT386 Log message: unify/cleanup/put-back-commented-out-code the two NT386 configuration files These two should match? The dead one deleted? And they should only differ against a running system in configurable ways to use the dynamic C runtime or not where the cm3 root is (which really should just be computed by cm3 itself to be the directory its directory is in) what editor to run, which is really a reactor thing, and one of the defaults notepad does not work with all the Unix newlines in the system.. just make it an environment variable anyway? => Thus none of the configuration is actually interesting! Install keys appear to be really dead now. They were for lisencing the Modula-3 system you could pay for. The old version of make_lib is simple and probably just works, except for not supporting building .dll. But then again, cm3 ought to write out a .def file to feed to the linker? And Visual C++ lib can be used to build the static .lib and import .lib. It depends on if we want more dependence on the "system tools" or not. From jkrell at birch.elego.de Sat Dec 30 08:53:33 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 8:53:33 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300753.kBU7rXB9018702@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 08:53:33 Modified files: cm3/m3-sys/cm3/src/config/: ALPHA_OSF COPYRIGHT-CMASS FreeBSD2 FreeBSD3 FreeBSD4 HPPA I386_DARWIN IBMR2 IRIX5 LINUXELF LINUXLIBC6 NT386 NetBSD2_i386 PPC_DARWIN PPC_LINUX SOLgnu SOLsun SPARC Added files: cm3/m3-sys/cm3/src/config/: Tombstone.txt Log message: tombstone dead files/directory From jkrell at birch.elego.de Sat Dec 30 09:02:29 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 9:02:29 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300802.kBU82TdQ018879@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 09:02:29 Modified files: cm3/m3-libs/arithmetic/src/: m3overrides cm3/m3-libs/commandrw/src/: m3overrides cm3/m3-libs/dosunixrw/src/: m3overrides cm3/m3-libs/fftw/src/: m3overrides cm3/m3-libs/lapack/src/: m3overrides cm3/m3-libs/plplot/src/: m3overrides cm3/m3-libs/unittest/src/: m3overrides cm3/m3-tools/pp/src/: m3overrides cm3/m3-ui/ui/src/: m3overrides cm3/m3-ui/vbtkit/src/: m3overrides Log message: Most m3overrides do not use SL (SLash -- \ for Windows or / for Unix). These few do. Fewer variables are better. Removing these uses lets us not define SL in scripts\win\sysinfo.cmd. It is still used in some m3makefiles and those uses need to be reviewed. From jkrell at birch.elego.de Sat Dec 30 09:21:10 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 9:21:10 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300821.kBU8LAW5019108@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 09:21:10 Modified files: cm3/m3-sys/m3quake/src/: QMachine.m3 Log message: When copying a .dll, .exe, or .lib, also copy along the .pdb and .manifest, whatever exists. The .pdbs are VERY nice to have next to the .dll/.exe for debugging. we only get callstacks and line numbers currently, no type info (except in C++ code), but that's still useful. The manifests are sometimes necessary to be able to run, such as when using msvcr80.dll on Windows XP/2003/Vista. Note that probably the following suffices: .exe => .pdb, .manifest .dll => .pdb .lib => nothing .dll manifests are probably in resources (need to investigate more -- using Modula-3 .dll from non Modula-3 .exe esp.) .lib have debugging info in them unless we use /Zi instead of /Z7 (At least with the C++ compiler. The Modula-3 compiler surely does not write out compilation .pdb files, nor does mklib handle them.) This code ought to be limited to Windows targets (aka "NT386" aka "Win32", but neither is accurate, NT386 doesn't cover Win9x, PowerPC, Mips, Alpha, Alpha64, Itanium, AMD64 Win32 doesn't cover Alpha64, Itanium, AMD64) From jkrell at birch.elego.de Sat Dec 30 12:36:41 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 12:36:41 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612301136.kBUBafBX020894@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 12:36:41 Modified files: cm3/scripts/win/: backup-pkgs.cmd clearenv.cmd def-std-pkgs.cmd do-cm3-base.cmd do-cm3-core.cmd do-cm3-min.cmd do-cm3-std.cmd do-pkg.cmd find-packages.cmd install-cm3-compiler.cmd pkgcmds.cmd pkginfo.cmd pkgmap.cmd sysinfo.cmd upgrade.cmd Log message: switch to Windows line endings at least on Windows-host files From jkrell at birch.elego.de Sat Dec 30 12:38:45 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 12:38:45 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612301138.kBUBcjLL020924@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 12:38:45 Modified files: cm3/scripts/win/c-runtime/: Microsoft.VC80.CRT.manifest msvcr80.cmd cm3/scripts/win/lib/: make-lib-1.cmd make-lib-2.cmd make-lib.cmd Log message: convert line endings to Windows format, in new files, that are used on Windows hosts From jkrell at birch.elego.de Sat Dec 30 17:11:29 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 17:11:29 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612301611.kBUGBTfe023252@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 17:11:29 Modified files: cm3/m3-sys/m3quake/src/: QMachine.m3 cm3/scripts/win/: pkginfo.cmd sysinfo.cmd Log message: config\NT386: % % The kernel32.lib installed by 5.2.6 is missing InterlockedCompareExchange % that is needed by msvcrt.lib 8.0 so delete it and fall back to whatever comes % with the compiler/linker. % delete_file(INSTALL_ROOT & "\\lib\\kernel32.lib") % % The user32.lib installed by 5.2.6 causes the Visual C++ 4.0 linker to % have an "internal error" so delete it and fall back to whatever comes % with the compiler/linker. % % % Just delete all of INSTALL_ROOT\lib and don't add it to %LIB%. % % % Handle shipping .manifest (and .pdb files) in quake/cm3.cfg. % This should sufficiently reduce the pain of bootstrapping such as to % eliminate any need for libcmt.lib and to be able to undo the change in m3quake.lib. % Remove the flexibility from cm3.cfg % % .map files are pretty worthless, remove creating them. (Make an option?) % You can load up a .dll/.exe in windbg using /z for image and then ln for list nearest % to map an address to a symbol. % Remove the dead configuration sections from INSTALL_ROOT: install key, web browser, text editor. % Booting will essentially look like copying in cm3.cfg and modifying just the INSTALL_ROOT. % The C++ compilation command lines are all fairly short so don't use response files. % (Still use response files for linking.) scripts\win\sysinfo.cmd: also delete the .libs here, though the config file is what is more guaranteeably runs scripts\win\pkginfo.cmd: Fix looking for ROOT in PKGS to escape the slashes, odd that it works before. (Still need to rewrite this all in Quake) qmachine.m3: go back a version -- removing the code to copy .pdbs and .manifests scripts\win\c-runtime can be largely gutted now but left alone for now From jkrell at birch.elego.de Sat Dec 30 17:16:43 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 17:16:43 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612301616.kBUGGh3n023308@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 17:16:43 Modified files: cm3/m3-sys/cminstall/src/config/: NT386 Log message: the correct version of config\NT386 this time also removed whitespace from ends of lines config\NT386: % % The kernel32.lib installed by 5.2.6 is missing InterlockedCompareExchange % that is needed by msvcrt.lib 8.0 so delete it and fall back to whatever comes % with the compiler/linker. % delete_file(INSTALL_ROOT & "\\lib\\kernel32.lib") % % The user32.lib installed by 5.2.6 causes the Visual C++ 4.0 linker to % have an "internal error" so delete it and fall back to whatever comes % with the compiler/linker. % % % Just delete all of INSTALL_ROOT\lib and don't add it to %LIB%. % % % Handle shipping .manifest (and .pdb files) in quake/cm3.cfg. % This should sufficiently reduce the pain of bootstrapping such as to % eliminate any need for libcmt.lib and to be able to undo the change in m3quake.lib. % Remove the flexibility from cm3.cfg % % .map files are pretty worthless, remove creating them. (Make an option?) % You can load up a .dll/.exe in windbg using /z for image and then ln for list nearest % to map an address to a symbol. % Remove the dead configuration sections from INSTALL_ROOT: install key, web browser, text editor. % Booting will essentially look like copying in cm3.cfg and modifying just the INSTALL_ROOT. % The C++ compilation command lines are all fairly short so don't use response files. % (Still use response files for linking.) scripts\win\sysinfo.cmd: also delete the .libs here, though the config file is what is more guaranteeably runs scripts\win\pkginfo.cmd: Fix looking for ROOT in PKGS to escape the slashes, odd that it works before. (Still need to rewrite this all in Quake) qmachine.m3: go back a version -- removing the code to copy .pdbs and .manifests scripts\win\c-runtime can be largely gutted now but left alone for now From jkrell at birch.elego.de Sun Dec 31 15:38:05 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sun, 31 Dec 2006 15:38:05 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612311438.kBVEc5SD028289@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/31 15:38:05 Modified files: cm3/m3-sys/cminstall/src/config/: NT386 cm3/scripts/win/: def-std-pkgs.cmd do-cm3-base.cmd do-cm3-core.cmd do-cm3-min.cmd sysinfo.cmd Log message: Work building the Windows import libs into the "overall build" instead of being a manual step on the side. (Where "overall build" isn't very well defined actually -- it is either cd'ing around to the right places and running cm3 or running scripts\win\do*.) While at it, convert the cmd to Quake, though that wasn't necessary, the m3makefile could just as well have run the older make-lib-2. Note that the Quake suffers from cm3.cfg doing too much for folks, not enough flexibility? The package name is probably too ambiguous -- it might be nice if package names were hierarchical so this was m3-win\import-libs instead of just import-libs cleanup SYSTEM_LIBS and SYSTEM_LIBORDER abstract out rename_file (currently an expensive exec) abstract out file_exists tweak compilation flags a little more use /Ox for optimized esp. optimize for size instead of speed size results in memory, which is then speed use /Oi for debug to get a minimal amount of inlining (intrinsics) commets in compile_c more verbose error output -- point to the log file important -- move exists/exporting of manifests for .exes till after linking, so that it works! cosmetic -- always deal with manifests ahead of pdbs, since manifests are about correctness and letting the code run/work whereas pdbs are "just nice to have" for debugging tweak computation of .manifest file names to reuse a tiny little bit.. comment out dead variables USE_ROOT and GNU_PLATFORM put "missing" newlines in one line if .. end fix comments about the .libs in sysinfo.cmd, and stop deleting them From jkrell at birch.elego.de Sun Dec 31 15:43:39 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sun, 31 Dec 2006 15:43:39 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612311443.kBVEhdLU028366@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/31 15:43:39 Modified files: cm3/scripts/win/lib/: advapi32.txt comctl32.txt comdlg32.txt gdi32.txt glu32.txt kernel32.txt make-lib-1.cmd make-lib-2.cmd make-lib.cmd netapi32.txt odbc32.txt odbccp32.txt opengl32.txt user32.txt winspool.txt wsock32.txt Added files: cm3/m3-win/import-libs/src/: advapi32.quake comctl32.quake comdlg32.quake gdi32.quake glu32.quake kernel32.quake m3makefile make-lib-1.cmd make-lib-2.cmd make-lib.cmd netapi32.quake odbc32.quake odbccp32.quake opengl32.quake user32.quake winspool.quake wsock32.quake Log message: previous was in wrong source tree and therefore forgot critical files and some minor diffs Work building the Windows import libs into the "overall build" instead of being a manual step on the side. (Where "overall build" isn't very well defined actually -- it is either cd'ing around to the right places and running cm3 or running scripts\win\do*.) While at it, convert the cmd to Quake, though that wasn't necessary, the m3makefile could just as well have run the older make-lib-2. Note that the Quake suffers from cm3.cfg doing too much for folks, not enough flexibility? The package name is probably too ambiguous -- it might be nice if package names were hierarchical so this was m3-win\import-libs instead of just import-libs tombstone scripts\win\lib From jkrell at birch.elego.de Sun Dec 31 15:59:35 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sun, 31 Dec 2006 15:59:35 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612311459.kBVExZKP028607@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/31 15:59:35 Modified files: cm3/scripts/win/c-runtime/: msvcr80.cmd use_msvcr80.manifest Log message: The 8.0 linker is outputing .manifest files and cm3.cfg/Quake are copying them, so that part can be deleted here. What is left is for copying around Microsoft.VC80.CRT.manifest / msvcr80.dll into .exe directories, for systems without the tools / redist installed. This is not needed once you install CLR 2.0, or Visual Studio 8.0, or Vista etc. From uamoore at birch.elego.de Mon Dec 11 14:40:57 2006 From: uamoore at birch.elego.de (Ulrike Amoore) Date: Mon, 11 Dec 2006 14:40:57 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612111340.kBBDevPH008949@birch.elego.de> CVSROOT: /usr/cvs Changes by: uamoore at birch. 06/12/11 14:40:57 Modified files: cm3/www/: about-cm3.html Log message: link actualized From uamoore at birch.elego.de Thu Dec 14 09:23:31 2006 From: uamoore at birch.elego.de (Ulrike Amoore) Date: Thu, 14 Dec 2006 9:23:31 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612140823.kBE8NV1m026847@birch.elego.de> CVSROOT: /usr/cvs Changes by: uamoore at birch. 06/12/14 09:23:31 Added files: cm3/www/: ANNOUNCE_5_4_0 Log message: Release-Announcement 5.4.0 From uamoore at birch.elego.de Wed Dec 13 11:13:43 2006 From: uamoore at birch.elego.de (Ulrike Amoore) Date: Wed, 13 Dec 2006 11:13:43 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612131013.kBDADhwG024648@birch.elego.de> CVSROOT: /usr/cvs Changes by: uamoore at birch. 06/12/13 11:13:43 Modified files: cm3/www/: index.html Log message: link to http://www.research.compaq.com/SRC/m3defn/html/intro.html#idx.0 hidden, as it is not working From jkrell at birch.elego.de Fri Dec 29 21:54:11 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Fri, 29 Dec 2006 21:54:11 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612292054.kBTKsBVA019685@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/29 21:54:11 Modified files: cm3/m3-sys/cm3/src/config/: FreeBSD2 FreeBSD3 FreeBSD4 I386_DARWIN IBMR2 LINUXELF LINUXLIBC6 NetBSD2_i386 PPC_DARWIN PPC_LINUX SPARC Log message: remove Windows comment from non-Windows files From jkrell at birch.elego.de Sat Dec 30 02:07:23 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 2:07:23 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300107.kBU17N8K008720@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 02:07:23 Modified files: cm3/m3-libs/m3core/src/win32/: WinBase.i3 Log message: add missing TLS_OUT_OF_INDEXES = FFFFFFFF to WinBase.i3, instead of checking for negative numbers, to be usd shortly From jkrell at birch.elego.de Sat Dec 30 02:18:06 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 2:18:06 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300118.kBU1I6e5008873@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 02:18:06 Modified files: cm3/m3-libs/m3core/src/thread/WIN32/: ThreadWin32.m3 Log message: important: fix infinite recursion in Win32 startup correct check for TlsAlloc failure (TLS_OUT_OF_INDEXES instead of < 0) reduce critical sections slightly (esp. to avoid calling out while in a critical section, including to DuplicateHandle, CreateThread, VirtualQuery) From jkrell at birch.elego.de Sat Dec 30 02:33:51 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 2:33:51 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300133.kBU1XpJa009041@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 02:33:51 Added files: cm3/scripts/win/: backup-pkgs.cmd clearenv.cmd do-cm3-base.cmd do-cm3-core.cmd do-cm3-min.cmd do-cm3-std.cmd do-pkg.cmd find-packages.cmd install-cm3-compiler.cmd pkgcmds.cmd pkginfo.cmd pkgmap.cmd sysinfo.cmd upgrade.cmd Log message: new and revised Windows .cmd programs, some are slight revisions of earlier, some are new ports of more *.sh programs backup-pkgs.cmd -- new, part of upgrade.cmd, works well clearenv.cmd -- trivial def-std-pkgs.cmd -- works well do-cm3-base.cmd -- works well do-cm3-core.cmd -- works well do-cm3-min.cmd -- works well do-cm3-std.cmd -- works well do-pkg.cmd -- works well find-packages.cmd -- part of do-*, works well install-cm3-compiler.cmd -- new, works well make-bin-dist-min.cmd -- new, work in progress, unfinished, does not work pkgcmds.cmd -- part of do-*, works well pkginfo.cmd -- part of do-*, works well pkgmap.cmd -- part of do-*, works well sysinfo.cmd -- part of do-*, works well (TBD support for Digital SRC Modula-3 and PM3) upgrade.cmd -- new, works well This all needs to be ported to Modula-3 and/or Quake. The Digital distribution used Quake well here. From jkrell at birch.elego.de Sat Dec 30 02:57:49 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 2:57:49 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300157.kBU1vo6f009431@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 02:57:49 Added files: cm3/scripts/win/lib/: advapi32.txt comctl32.txt comdlg32.txt gdi32.txt glu32.txt kernel32.txt make-lib-1.cmd make-lib-2.cmd make-lib.cmd netapi32.txt odbc32.txt odbccp32.txt opengl32.txt user32.txt winspool.txt wsock32.txt Log message: new infrastructure for making Windows import .libs pass 1 (make-lib-1.cmd): Text files are generated from existing import .libs (including the output of this process) using a mix of cmd, Perl, and the Visual C++ compiler and linker (esp. link /dump). A few odd/useless functions are hard-coded-ly removed. A few functions missing in old .libs are hard-coded-ly added. A variety of versions of Visual C++ from 2.0 through 8.0 were tested, necessitating code changes as link /dump has changed significantly. (Link /dump is equivalent to dumpbin but saves a process, see link /help). Temp space is good in uniqueness and cleanup via Perl libs. Checkin text files. pass 2 (make-lib-2.cmd): Using just cmd, compiler/linker, produce C and .def files from pass 1 and build .dlls (ignored) and their associated import .libs. Import .libs are copied to %INSTALLROOT%\lib. %INSTALLROOT% defaults to \cm3. Temp space is lame due to cmd -- uses the current working directory. From jkrell at birch.elego.de Sat Dec 30 03:51:43 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 3:51:43 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300251.kBU2phDm010665@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 03:51:43 Modified files: cm3/m3-libs/m3gc-enhanced/src/: m3makefile Log message: lame but ok Win32 build break workaround -- write out the empty file to both the Unix and Win32 naming style From jkrell at birch.elego.de Sat Dec 30 04:02:29 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 4:02:29 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300302.kBU32UHF010858@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 04:02:29 Modified files: cm3/m3-libs/m3gc-simple/src/: m3makefile Log message: lame but ok Win32 build break workaround -- write out the empty file to both the Unix and Win32 naming style From jkrell at birch.elego.de Sat Dec 30 04:04:04 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 4:04:04 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300304.kBU344LB010904@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 04:04:04 Modified files: cm3/m3-libs/m3gc-simple/src/: m3makefile Log message: try again, must not be needed but for consistency -- lame but ok Win32 build break workaround -- write out the empty file to both the Unix and Win32 naming style From jkrell at birch.elego.de Sat Dec 30 04:05:58 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 4:05:58 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300305.kBU35wB6010962@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 04:05:57 Added files: cm3/scripts/win/c-runtime/: Microsoft.VC80.CRT.manifest msvcr80.cmd msvcr80.dll use_msvcr80.manifest Log message: support for msvcr80.dll, the dynamically linked Microsoft C runtime version 8.0 Roughly, .exes using msvcr80.dll need foo.exe.manifest, in the directory with them, and for systems that don't have the redist or development tools installed, also Microsoft.VC80.CRT.manifest and msvcr80.dll. The .manifest files are only for Windows XP and newer. Win9x/WinNT4/Win2000 ignore them.) msvcr80.cmd enumerates all .exes in the cm3 install, which is defined by finding cm3.exe in %PATH%, and using the directory above its directory. We attempt to use hard links to preserve disk space, using "fsutil hardlink create new-link existing-file". This works on at least XP and up on NTFS. If this fails, copying is used. Fsutil requires being an administrator, which is just bogus, since creating hard links does not. (For example with Perl's link or kernel32!CreateHardLinkW directly, or via some other APIs prior to Windows 2000.) Windows Vista cmd includes a mklink command. Hard links cannot span volumes. Therefore the files for cm3.exe itself are handled first and made the source for subsequent links. That way, if the source code and install are on different drives, diskspace should still be preserved. That case was not however tested. NOTE that hard links directly into the source tree are made, which violates usual soure tree / install tree separation. The files change very very rarely however. There is a redist and a Microsoft Installer Merge Module (.msm) in the "regular" versions, but not in the free download Express Editions. This is at least useful for bootstrapping. There are advantages and disadvantages here. The linker can/does produce the .manifest files via merging fragments from #pragmas. cm3 -ship needs to copy them along with .exes, and it will shortly. Manifests can also be embedded in resources in files, which works in more scenarios, and removes the need to copy/hardlink the extra files. .dlls in particular need the manifest in resources. Another option would be to use libcmt.lib, but that is bad in terms of size, performance, and updating (the centrally installed copy is favored over the .exe's directory if they match in version or if it is an import security-only fix). Another option would be export the C runtime from m3core.dll, via libcmt.lib or msvcr80.dll, and have it deal with a manifest if necessary. This has nice "hiding" and "bottlenecking" properties, no other Modula-3 would be dependent on the C runtime, just m3core.dll, even the startup coe could be imported/exported, but it is unusual, would not interoperate well for example with code that needs additional functions in the C runtime, and related to the first, is kind of odd for the case of handling multiple C runtime versions -- you'd have to union the exports and hope they don't grow in newer versions faster than your ability to handle them. Forwarders would be nice if Win9x support can be dropped, but again still there is the race to keep up. The comments outweigh the code.. From jkrell at birch.elego.de Sat Dec 30 04:27:08 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 4:27:08 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300327.kBU3R9Sw011312@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 04:27:08 Modified files: cm3/scripts/: .cvsignore do-cm3-std.bat make-bin-dist-min.sh v526_all.CM3P Removed files: cm3/scripts/: do-cm3-base.cmd do-cm3-core.cmd do-cm3-std.cmd find-packages.cmd pkgcmds.cmd pkginfo.cmd pkgmap.cmd sysinfo.cmd Log message: Windows files moved to "win" directory From jkrell at birch.elego.de Sat Dec 30 04:30:17 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 4:30:17 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300330.kBU3UI0O011410@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 04:30:17 Added files: cm3/scripts/win/: def-std-pkgs.cmd Log message: add forgotten file From jkrell at birch.elego.de Sat Dec 30 05:02:27 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 5:02:27 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300402.kBU42SST012762@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 05:02:27 Modified files: cm3/scripts/win/lib/: advapi32.txt comctl32.txt comdlg32.txt gdi32.txt glu32.txt kernel32.txt netapi32.txt odbc32.txt odbccp32.txt opengl32.txt user32.txt winspool.txt wsock32.txt Log message: reflect real origin of the data From jkrell at birch.elego.de Sat Dec 30 07:17:16 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 7:17:16 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300617.kBU6HG9F016863@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 07:17:15 Modified files: cm3/m3-sys/cm3/src/config/: NT386 Log message: For better and worse, rely on %PATH% and %LIB% environment variables instead of configured full paths. From jkrell at birch.elego.de Sat Dec 30 07:18:57 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 7:18:57 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300618.kBU6IvJO016915@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 07:18:57 Modified files: cm3/m3-sys/cm3/src/config/: NT386 Log message: Do not hide commands. From jkrell at birch.elego.de Sat Dec 30 07:19:29 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 7:19:29 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300619.kBU6JTdw016944@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 07:19:29 Modified files: cm3/m3-sys/cm3/src/config/: NT386 Log message: Lowercase the one instance of uppercase 'LINK'. From jkrell at birch.elego.de Sat Dec 30 07:22:32 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 7:22:32 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300622.kBU6MWem017067@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 07:22:32 Modified files: cm3/m3-sys/cm3/src/config/: NT386 Log message: Unix is bad. Use Microsoft style command line switches to Microsoft tools (not mklib). From jkrell at birch.elego.de Sat Dec 30 07:23:27 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 7:23:27 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300623.kBU6NRZl017105@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 07:23:27 Modified files: cm3/m3-sys/cm3/src/config/: NT386 Log message: Add one missing horizontal whitespace. From jkrell at birch.elego.de Sat Dec 30 07:25:47 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 7:25:47 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300625.kBU6PltO017205@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 07:25:47 Modified files: cm3/m3-sys/cm3/src/config/: NT386 Log message: Move slashes around with no real effect to unify with the other copy of this file, the one that is more likely actually alive. Eventually the files will be almost identical. From jkrell at birch.elego.de Sat Dec 30 08:07:29 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 8:07:29 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300707.kBU77TUV018007@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 08:07:29 Modified files: cm3/m3-sys/cm3/src/config/: NT386 Log message: Update compiler and linker flags, prep for changes around .pdb and .manifest files, cleanup some comments, etc. Many of the previously specified flags are odd and appear to come from an old Windows SDK win32.mak. That is not a particularly common way to build things, not a good example to follow. It is neither the Windows DDK that resembles the Windows (NT) build enviroment, nor it is any version of the Visual C++ IDE. link /debug means produce a .pdb. Use that. link /incremental:no is still pretty fast and avoids some warnings I vaguely recall. It produces somewhat smaller/faster binaries. It might be nice to expose this at a higher level to give users a choice of faster linking. Even the first link is faster without /incremental:no I recall. compiler: Debug information does not inhibit optimization and though optimized code is somewhat difficult to debug, you are still much better off with symbols than without. Therefore always produce debug information. link /debugtype:cv is surely the default, remove it. link /pdb:none is nice -- it puts the debug info in the .exe, and comments indicate that Windbg required it, but current linkers do not support this option, current Windbg does not require it, no Visual C++ GUI debugger ever required it. Remove it. link /align:0x1000 produces warnings I recall and surely is not necessary. Section alignment defaults to 4K == page size. (except Itanium? 8K?) File alignment defaults to either 4k or 512 depending. 4k is better for Win9x perf. all NT files use 512 which is smaller and fine for NT perf. Whatever this switch does, it is rarely used and not needed here, remove it. link /debug:mapped -- related to debug information in the .exe, remove it. link /debug:partial -- I don't know what this did, but debugging is hard enough, let's get whatever "full" information there is. /Z7 vs. /Zi With /Zi, the compiler puts type information in a .pdb whose default name depends on compiler -- vc50.pdb, vc80.pdb, etc. but which can be renamed like to foo_compiler.pdb with the /Fd switch. The type information is shared across source/object files. It is smaller/faster. With /Z7, type information is duplicated in every .obj. This is bigger and slower. Older linkers by default produce foo.pdb that refereneces vc*.pdb. This is why older debuggers often prompt for that file. Older linkers have an option /pdbtype that can be /pdbtype:septtypes or /pdbtype:consolidate. 5.0 has this for example. The default is septtypes. Consolidate produces a standalone .pdb. Newer linkers default to /pdbtype:consolidate and don't have an option to use the old default. The ideal is to use /Zi and /Fd and with older linkers /pdbtype:consolidate. But we don't have configuration that checks the linker version. For now use /Z7 which always works and produces one .pdb per link output. /Z7 also provides for standalone .libs. Despite being "old", /Z7 is still widely used (see the Windows DDK). There is very little C compilation in the system anyway so doesn't matter much. cl /_DLL is implied by cl /MD cl /_MT is implied by cl /MT or cl /MT /D_DLL informs the C runtime headers that the dynamic C runtime will be linked to. /D_MT informs the C runtime headers that a thread safe C runtime will be linked to. /D_DLL implies /D_MT at least in principle. There are no longer any thread-unsafe C runtimes and /MT is the default. Unify INITIAL_REACTOR_EDITOR and commented out INITIAL_REACTOR_BROWSER with the other copy of this file. I assume this is ok but might result in unexpected prompts. Prep for using the Visual C++ 8.0 dynamic runtime which requires a little more work. There is a new configuration option UseDynamicCRuntime which can be TRUE or FALSE but which for now is FALSE. TRUE is working on my machine but requires either a change to cm3 to copy along .manifest files or running scripts\win\msvcr80.cmd which is new. Cleanup some comments, whitespace, remove dead commented out code. We are dealing with files, not junk. Comment on the dumb use of a process to rename a file. Prep for cm3 change that will copy along .pdb files (and .manifests). .map files are junk, don't produce them. cl /DWIN32 is needed for old Windows headers (Visual C++ 2.0) newer headers use _WIN32 and current compilers #define it by default. cl /D_X86_ probably is defined by the compiler but I didn't check yet. Using /Z7 lets us remove the deletion of vc40.pdb (or whatever the .pdb gets named). From jkrell at birch.elego.de Sat Dec 30 08:11:34 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 8:11:34 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300711.kBU7BYkT018126@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 08:11:34 Modified files: cm3/m3-sys/cm3/src/config/: NT386 Log message: fix grammar in comment From jkrell at birch.elego.de Sat Dec 30 08:16:49 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 8:16:49 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300716.kBU7GnuB018182@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 08:16:49 Modified files: cm3/m3-sys/cminstall/src/config/: NT386 Log message: unification with C:\dev2\cm3\m3-sys\cm3\src\config\NT386, see history there roughly: depend on environment variables %LIB% and %PATH% instead of configuring full paths redo compiler and linker flags to work, work with many versions of Visual C++, always produce debugging information cleanup some comments prep for C runtime 8.0 support and cm3 copying of .pdb and .manifest files From jkrell at birch.elego.de Sat Dec 30 08:30:29 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 8:30:29 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300730.kBU7UTOU018360@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 08:30:29 Modified files: cm3/m3-sys/cm3/src/config/: NT386 cm3/m3-sys/cminstall/src/config/: NT386 Log message: unify/cleanup/put-back-commented-out-code the two NT386 configuration files These two should match? The dead one deleted? And they should only differ against a running system in configurable ways to use the dynamic C runtime or not where the cm3 root is (which really should just be computed by cm3 itself to be the directory its directory is in) what editor to run, which is really a reactor thing, and one of the defaults notepad does not work with all the Unix newlines in the system.. just make it an environment variable anyway? => Thus none of the configuration is actually interesting! Install keys appear to be really dead now. They were for lisencing the Modula-3 system you could pay for. The old version of make_lib is simple and probably just works, except for not supporting building .dll. But then again, cm3 ought to write out a .def file to feed to the linker? And Visual C++ lib can be used to build the static .lib and import .lib. It depends on if we want more dependence on the "system tools" or not. From jkrell at birch.elego.de Sat Dec 30 08:53:33 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 8:53:33 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300753.kBU7rXB9018702@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 08:53:33 Modified files: cm3/m3-sys/cm3/src/config/: ALPHA_OSF COPYRIGHT-CMASS FreeBSD2 FreeBSD3 FreeBSD4 HPPA I386_DARWIN IBMR2 IRIX5 LINUXELF LINUXLIBC6 NT386 NetBSD2_i386 PPC_DARWIN PPC_LINUX SOLgnu SOLsun SPARC Added files: cm3/m3-sys/cm3/src/config/: Tombstone.txt Log message: tombstone dead files/directory From jkrell at birch.elego.de Sat Dec 30 09:02:29 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 9:02:29 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300802.kBU82TdQ018879@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 09:02:29 Modified files: cm3/m3-libs/arithmetic/src/: m3overrides cm3/m3-libs/commandrw/src/: m3overrides cm3/m3-libs/dosunixrw/src/: m3overrides cm3/m3-libs/fftw/src/: m3overrides cm3/m3-libs/lapack/src/: m3overrides cm3/m3-libs/plplot/src/: m3overrides cm3/m3-libs/unittest/src/: m3overrides cm3/m3-tools/pp/src/: m3overrides cm3/m3-ui/ui/src/: m3overrides cm3/m3-ui/vbtkit/src/: m3overrides Log message: Most m3overrides do not use SL (SLash -- \ for Windows or / for Unix). These few do. Fewer variables are better. Removing these uses lets us not define SL in scripts\win\sysinfo.cmd. It is still used in some m3makefiles and those uses need to be reviewed. From jkrell at birch.elego.de Sat Dec 30 09:21:10 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 9:21:10 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300821.kBU8LAW5019108@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 09:21:10 Modified files: cm3/m3-sys/m3quake/src/: QMachine.m3 Log message: When copying a .dll, .exe, or .lib, also copy along the .pdb and .manifest, whatever exists. The .pdbs are VERY nice to have next to the .dll/.exe for debugging. we only get callstacks and line numbers currently, no type info (except in C++ code), but that's still useful. The manifests are sometimes necessary to be able to run, such as when using msvcr80.dll on Windows XP/2003/Vista. Note that probably the following suffices: .exe => .pdb, .manifest .dll => .pdb .lib => nothing .dll manifests are probably in resources (need to investigate more -- using Modula-3 .dll from non Modula-3 .exe esp.) .lib have debugging info in them unless we use /Zi instead of /Z7 (At least with the C++ compiler. The Modula-3 compiler surely does not write out compilation .pdb files, nor does mklib handle them.) This code ought to be limited to Windows targets (aka "NT386" aka "Win32", but neither is accurate, NT386 doesn't cover Win9x, PowerPC, Mips, Alpha, Alpha64, Itanium, AMD64 Win32 doesn't cover Alpha64, Itanium, AMD64) From jkrell at birch.elego.de Sat Dec 30 12:36:41 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 12:36:41 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612301136.kBUBafBX020894@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 12:36:41 Modified files: cm3/scripts/win/: backup-pkgs.cmd clearenv.cmd def-std-pkgs.cmd do-cm3-base.cmd do-cm3-core.cmd do-cm3-min.cmd do-cm3-std.cmd do-pkg.cmd find-packages.cmd install-cm3-compiler.cmd pkgcmds.cmd pkginfo.cmd pkgmap.cmd sysinfo.cmd upgrade.cmd Log message: switch to Windows line endings at least on Windows-host files From jkrell at birch.elego.de Sat Dec 30 12:38:45 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 12:38:45 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612301138.kBUBcjLL020924@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 12:38:45 Modified files: cm3/scripts/win/c-runtime/: Microsoft.VC80.CRT.manifest msvcr80.cmd cm3/scripts/win/lib/: make-lib-1.cmd make-lib-2.cmd make-lib.cmd Log message: convert line endings to Windows format, in new files, that are used on Windows hosts From jkrell at birch.elego.de Sat Dec 30 17:11:29 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 17:11:29 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612301611.kBUGBTfe023252@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 17:11:29 Modified files: cm3/m3-sys/m3quake/src/: QMachine.m3 cm3/scripts/win/: pkginfo.cmd sysinfo.cmd Log message: config\NT386: % % The kernel32.lib installed by 5.2.6 is missing InterlockedCompareExchange % that is needed by msvcrt.lib 8.0 so delete it and fall back to whatever comes % with the compiler/linker. % delete_file(INSTALL_ROOT & "\\lib\\kernel32.lib") % % The user32.lib installed by 5.2.6 causes the Visual C++ 4.0 linker to % have an "internal error" so delete it and fall back to whatever comes % with the compiler/linker. % % % Just delete all of INSTALL_ROOT\lib and don't add it to %LIB%. % % % Handle shipping .manifest (and .pdb files) in quake/cm3.cfg. % This should sufficiently reduce the pain of bootstrapping such as to % eliminate any need for libcmt.lib and to be able to undo the change in m3quake.lib. % Remove the flexibility from cm3.cfg % % .map files are pretty worthless, remove creating them. (Make an option?) % You can load up a .dll/.exe in windbg using /z for image and then ln for list nearest % to map an address to a symbol. % Remove the dead configuration sections from INSTALL_ROOT: install key, web browser, text editor. % Booting will essentially look like copying in cm3.cfg and modifying just the INSTALL_ROOT. % The C++ compilation command lines are all fairly short so don't use response files. % (Still use response files for linking.) scripts\win\sysinfo.cmd: also delete the .libs here, though the config file is what is more guaranteeably runs scripts\win\pkginfo.cmd: Fix looking for ROOT in PKGS to escape the slashes, odd that it works before. (Still need to rewrite this all in Quake) qmachine.m3: go back a version -- removing the code to copy .pdbs and .manifests scripts\win\c-runtime can be largely gutted now but left alone for now From jkrell at birch.elego.de Sat Dec 30 17:16:43 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 17:16:43 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612301616.kBUGGh3n023308@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 17:16:43 Modified files: cm3/m3-sys/cminstall/src/config/: NT386 Log message: the correct version of config\NT386 this time also removed whitespace from ends of lines config\NT386: % % The kernel32.lib installed by 5.2.6 is missing InterlockedCompareExchange % that is needed by msvcrt.lib 8.0 so delete it and fall back to whatever comes % with the compiler/linker. % delete_file(INSTALL_ROOT & "\\lib\\kernel32.lib") % % The user32.lib installed by 5.2.6 causes the Visual C++ 4.0 linker to % have an "internal error" so delete it and fall back to whatever comes % with the compiler/linker. % % % Just delete all of INSTALL_ROOT\lib and don't add it to %LIB%. % % % Handle shipping .manifest (and .pdb files) in quake/cm3.cfg. % This should sufficiently reduce the pain of bootstrapping such as to % eliminate any need for libcmt.lib and to be able to undo the change in m3quake.lib. % Remove the flexibility from cm3.cfg % % .map files are pretty worthless, remove creating them. (Make an option?) % You can load up a .dll/.exe in windbg using /z for image and then ln for list nearest % to map an address to a symbol. % Remove the dead configuration sections from INSTALL_ROOT: install key, web browser, text editor. % Booting will essentially look like copying in cm3.cfg and modifying just the INSTALL_ROOT. % The C++ compilation command lines are all fairly short so don't use response files. % (Still use response files for linking.) scripts\win\sysinfo.cmd: also delete the .libs here, though the config file is what is more guaranteeably runs scripts\win\pkginfo.cmd: Fix looking for ROOT in PKGS to escape the slashes, odd that it works before. (Still need to rewrite this all in Quake) qmachine.m3: go back a version -- removing the code to copy .pdbs and .manifests scripts\win\c-runtime can be largely gutted now but left alone for now From jkrell at birch.elego.de Sun Dec 31 15:38:05 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sun, 31 Dec 2006 15:38:05 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612311438.kBVEc5SD028289@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/31 15:38:05 Modified files: cm3/m3-sys/cminstall/src/config/: NT386 cm3/scripts/win/: def-std-pkgs.cmd do-cm3-base.cmd do-cm3-core.cmd do-cm3-min.cmd sysinfo.cmd Log message: Work building the Windows import libs into the "overall build" instead of being a manual step on the side. (Where "overall build" isn't very well defined actually -- it is either cd'ing around to the right places and running cm3 or running scripts\win\do*.) While at it, convert the cmd to Quake, though that wasn't necessary, the m3makefile could just as well have run the older make-lib-2. Note that the Quake suffers from cm3.cfg doing too much for folks, not enough flexibility? The package name is probably too ambiguous -- it might be nice if package names were hierarchical so this was m3-win\import-libs instead of just import-libs cleanup SYSTEM_LIBS and SYSTEM_LIBORDER abstract out rename_file (currently an expensive exec) abstract out file_exists tweak compilation flags a little more use /Ox for optimized esp. optimize for size instead of speed size results in memory, which is then speed use /Oi for debug to get a minimal amount of inlining (intrinsics) commets in compile_c more verbose error output -- point to the log file important -- move exists/exporting of manifests for .exes till after linking, so that it works! cosmetic -- always deal with manifests ahead of pdbs, since manifests are about correctness and letting the code run/work whereas pdbs are "just nice to have" for debugging tweak computation of .manifest file names to reuse a tiny little bit.. comment out dead variables USE_ROOT and GNU_PLATFORM put "missing" newlines in one line if .. end fix comments about the .libs in sysinfo.cmd, and stop deleting them From jkrell at birch.elego.de Sun Dec 31 15:43:39 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sun, 31 Dec 2006 15:43:39 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612311443.kBVEhdLU028366@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/31 15:43:39 Modified files: cm3/scripts/win/lib/: advapi32.txt comctl32.txt comdlg32.txt gdi32.txt glu32.txt kernel32.txt make-lib-1.cmd make-lib-2.cmd make-lib.cmd netapi32.txt odbc32.txt odbccp32.txt opengl32.txt user32.txt winspool.txt wsock32.txt Added files: cm3/m3-win/import-libs/src/: advapi32.quake comctl32.quake comdlg32.quake gdi32.quake glu32.quake kernel32.quake m3makefile make-lib-1.cmd make-lib-2.cmd make-lib.cmd netapi32.quake odbc32.quake odbccp32.quake opengl32.quake user32.quake winspool.quake wsock32.quake Log message: previous was in wrong source tree and therefore forgot critical files and some minor diffs Work building the Windows import libs into the "overall build" instead of being a manual step on the side. (Where "overall build" isn't very well defined actually -- it is either cd'ing around to the right places and running cm3 or running scripts\win\do*.) While at it, convert the cmd to Quake, though that wasn't necessary, the m3makefile could just as well have run the older make-lib-2. Note that the Quake suffers from cm3.cfg doing too much for folks, not enough flexibility? The package name is probably too ambiguous -- it might be nice if package names were hierarchical so this was m3-win\import-libs instead of just import-libs tombstone scripts\win\lib From jkrell at birch.elego.de Sun Dec 31 15:59:35 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sun, 31 Dec 2006 15:59:35 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612311459.kBVExZKP028607@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/31 15:59:35 Modified files: cm3/scripts/win/c-runtime/: msvcr80.cmd use_msvcr80.manifest Log message: The 8.0 linker is outputing .manifest files and cm3.cfg/Quake are copying them, so that part can be deleted here. What is left is for copying around Microsoft.VC80.CRT.manifest / msvcr80.dll into .exe directories, for systems without the tools / redist installed. This is not needed once you install CLR 2.0, or Visual Studio 8.0, or Vista etc. From uamoore at birch.elego.de Mon Dec 11 14:40:57 2006 From: uamoore at birch.elego.de (Ulrike Amoore) Date: Mon, 11 Dec 2006 14:40:57 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612111340.kBBDevPH008949@birch.elego.de> CVSROOT: /usr/cvs Changes by: uamoore at birch. 06/12/11 14:40:57 Modified files: cm3/www/: about-cm3.html Log message: link actualized From uamoore at birch.elego.de Thu Dec 14 09:23:31 2006 From: uamoore at birch.elego.de (Ulrike Amoore) Date: Thu, 14 Dec 2006 9:23:31 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612140823.kBE8NV1m026847@birch.elego.de> CVSROOT: /usr/cvs Changes by: uamoore at birch. 06/12/14 09:23:31 Added files: cm3/www/: ANNOUNCE_5_4_0 Log message: Release-Announcement 5.4.0 From uamoore at birch.elego.de Wed Dec 13 11:13:43 2006 From: uamoore at birch.elego.de (Ulrike Amoore) Date: Wed, 13 Dec 2006 11:13:43 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612131013.kBDADhwG024648@birch.elego.de> CVSROOT: /usr/cvs Changes by: uamoore at birch. 06/12/13 11:13:43 Modified files: cm3/www/: index.html Log message: link to http://www.research.compaq.com/SRC/m3defn/html/intro.html#idx.0 hidden, as it is not working From jkrell at birch.elego.de Fri Dec 29 21:54:11 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Fri, 29 Dec 2006 21:54:11 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612292054.kBTKsBVA019685@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/29 21:54:11 Modified files: cm3/m3-sys/cm3/src/config/: FreeBSD2 FreeBSD3 FreeBSD4 I386_DARWIN IBMR2 LINUXELF LINUXLIBC6 NetBSD2_i386 PPC_DARWIN PPC_LINUX SPARC Log message: remove Windows comment from non-Windows files From jkrell at birch.elego.de Sat Dec 30 02:07:23 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 2:07:23 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300107.kBU17N8K008720@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 02:07:23 Modified files: cm3/m3-libs/m3core/src/win32/: WinBase.i3 Log message: add missing TLS_OUT_OF_INDEXES = FFFFFFFF to WinBase.i3, instead of checking for negative numbers, to be usd shortly From jkrell at birch.elego.de Sat Dec 30 02:18:06 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 2:18:06 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300118.kBU1I6e5008873@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 02:18:06 Modified files: cm3/m3-libs/m3core/src/thread/WIN32/: ThreadWin32.m3 Log message: important: fix infinite recursion in Win32 startup correct check for TlsAlloc failure (TLS_OUT_OF_INDEXES instead of < 0) reduce critical sections slightly (esp. to avoid calling out while in a critical section, including to DuplicateHandle, CreateThread, VirtualQuery) From jkrell at birch.elego.de Sat Dec 30 02:33:51 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 2:33:51 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300133.kBU1XpJa009041@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 02:33:51 Added files: cm3/scripts/win/: backup-pkgs.cmd clearenv.cmd do-cm3-base.cmd do-cm3-core.cmd do-cm3-min.cmd do-cm3-std.cmd do-pkg.cmd find-packages.cmd install-cm3-compiler.cmd pkgcmds.cmd pkginfo.cmd pkgmap.cmd sysinfo.cmd upgrade.cmd Log message: new and revised Windows .cmd programs, some are slight revisions of earlier, some are new ports of more *.sh programs backup-pkgs.cmd -- new, part of upgrade.cmd, works well clearenv.cmd -- trivial def-std-pkgs.cmd -- works well do-cm3-base.cmd -- works well do-cm3-core.cmd -- works well do-cm3-min.cmd -- works well do-cm3-std.cmd -- works well do-pkg.cmd -- works well find-packages.cmd -- part of do-*, works well install-cm3-compiler.cmd -- new, works well make-bin-dist-min.cmd -- new, work in progress, unfinished, does not work pkgcmds.cmd -- part of do-*, works well pkginfo.cmd -- part of do-*, works well pkgmap.cmd -- part of do-*, works well sysinfo.cmd -- part of do-*, works well (TBD support for Digital SRC Modula-3 and PM3) upgrade.cmd -- new, works well This all needs to be ported to Modula-3 and/or Quake. The Digital distribution used Quake well here. From jkrell at birch.elego.de Sat Dec 30 02:57:49 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 2:57:49 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300157.kBU1vo6f009431@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 02:57:49 Added files: cm3/scripts/win/lib/: advapi32.txt comctl32.txt comdlg32.txt gdi32.txt glu32.txt kernel32.txt make-lib-1.cmd make-lib-2.cmd make-lib.cmd netapi32.txt odbc32.txt odbccp32.txt opengl32.txt user32.txt winspool.txt wsock32.txt Log message: new infrastructure for making Windows import .libs pass 1 (make-lib-1.cmd): Text files are generated from existing import .libs (including the output of this process) using a mix of cmd, Perl, and the Visual C++ compiler and linker (esp. link /dump). A few odd/useless functions are hard-coded-ly removed. A few functions missing in old .libs are hard-coded-ly added. A variety of versions of Visual C++ from 2.0 through 8.0 were tested, necessitating code changes as link /dump has changed significantly. (Link /dump is equivalent to dumpbin but saves a process, see link /help). Temp space is good in uniqueness and cleanup via Perl libs. Checkin text files. pass 2 (make-lib-2.cmd): Using just cmd, compiler/linker, produce C and .def files from pass 1 and build .dlls (ignored) and their associated import .libs. Import .libs are copied to %INSTALLROOT%\lib. %INSTALLROOT% defaults to \cm3. Temp space is lame due to cmd -- uses the current working directory. From jkrell at birch.elego.de Sat Dec 30 03:51:43 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 3:51:43 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300251.kBU2phDm010665@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 03:51:43 Modified files: cm3/m3-libs/m3gc-enhanced/src/: m3makefile Log message: lame but ok Win32 build break workaround -- write out the empty file to both the Unix and Win32 naming style From jkrell at birch.elego.de Sat Dec 30 04:02:29 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 4:02:29 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300302.kBU32UHF010858@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 04:02:29 Modified files: cm3/m3-libs/m3gc-simple/src/: m3makefile Log message: lame but ok Win32 build break workaround -- write out the empty file to both the Unix and Win32 naming style From jkrell at birch.elego.de Sat Dec 30 04:04:04 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 4:04:04 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300304.kBU344LB010904@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 04:04:04 Modified files: cm3/m3-libs/m3gc-simple/src/: m3makefile Log message: try again, must not be needed but for consistency -- lame but ok Win32 build break workaround -- write out the empty file to both the Unix and Win32 naming style From jkrell at birch.elego.de Sat Dec 30 04:05:58 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 4:05:58 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300305.kBU35wB6010962@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 04:05:57 Added files: cm3/scripts/win/c-runtime/: Microsoft.VC80.CRT.manifest msvcr80.cmd msvcr80.dll use_msvcr80.manifest Log message: support for msvcr80.dll, the dynamically linked Microsoft C runtime version 8.0 Roughly, .exes using msvcr80.dll need foo.exe.manifest, in the directory with them, and for systems that don't have the redist or development tools installed, also Microsoft.VC80.CRT.manifest and msvcr80.dll. The .manifest files are only for Windows XP and newer. Win9x/WinNT4/Win2000 ignore them.) msvcr80.cmd enumerates all .exes in the cm3 install, which is defined by finding cm3.exe in %PATH%, and using the directory above its directory. We attempt to use hard links to preserve disk space, using "fsutil hardlink create new-link existing-file". This works on at least XP and up on NTFS. If this fails, copying is used. Fsutil requires being an administrator, which is just bogus, since creating hard links does not. (For example with Perl's link or kernel32!CreateHardLinkW directly, or via some other APIs prior to Windows 2000.) Windows Vista cmd includes a mklink command. Hard links cannot span volumes. Therefore the files for cm3.exe itself are handled first and made the source for subsequent links. That way, if the source code and install are on different drives, diskspace should still be preserved. That case was not however tested. NOTE that hard links directly into the source tree are made, which violates usual soure tree / install tree separation. The files change very very rarely however. There is a redist and a Microsoft Installer Merge Module (.msm) in the "regular" versions, but not in the free download Express Editions. This is at least useful for bootstrapping. There are advantages and disadvantages here. The linker can/does produce the .manifest files via merging fragments from #pragmas. cm3 -ship needs to copy them along with .exes, and it will shortly. Manifests can also be embedded in resources in files, which works in more scenarios, and removes the need to copy/hardlink the extra files. .dlls in particular need the manifest in resources. Another option would be to use libcmt.lib, but that is bad in terms of size, performance, and updating (the centrally installed copy is favored over the .exe's directory if they match in version or if it is an import security-only fix). Another option would be export the C runtime from m3core.dll, via libcmt.lib or msvcr80.dll, and have it deal with a manifest if necessary. This has nice "hiding" and "bottlenecking" properties, no other Modula-3 would be dependent on the C runtime, just m3core.dll, even the startup coe could be imported/exported, but it is unusual, would not interoperate well for example with code that needs additional functions in the C runtime, and related to the first, is kind of odd for the case of handling multiple C runtime versions -- you'd have to union the exports and hope they don't grow in newer versions faster than your ability to handle them. Forwarders would be nice if Win9x support can be dropped, but again still there is the race to keep up. The comments outweigh the code.. From jkrell at birch.elego.de Sat Dec 30 04:27:08 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 4:27:08 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300327.kBU3R9Sw011312@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 04:27:08 Modified files: cm3/scripts/: .cvsignore do-cm3-std.bat make-bin-dist-min.sh v526_all.CM3P Removed files: cm3/scripts/: do-cm3-base.cmd do-cm3-core.cmd do-cm3-std.cmd find-packages.cmd pkgcmds.cmd pkginfo.cmd pkgmap.cmd sysinfo.cmd Log message: Windows files moved to "win" directory From jkrell at birch.elego.de Sat Dec 30 04:30:17 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 4:30:17 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300330.kBU3UI0O011410@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 04:30:17 Added files: cm3/scripts/win/: def-std-pkgs.cmd Log message: add forgotten file From jkrell at birch.elego.de Sat Dec 30 05:02:27 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 5:02:27 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300402.kBU42SST012762@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 05:02:27 Modified files: cm3/scripts/win/lib/: advapi32.txt comctl32.txt comdlg32.txt gdi32.txt glu32.txt kernel32.txt netapi32.txt odbc32.txt odbccp32.txt opengl32.txt user32.txt winspool.txt wsock32.txt Log message: reflect real origin of the data From jkrell at birch.elego.de Sat Dec 30 07:17:16 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 7:17:16 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300617.kBU6HG9F016863@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 07:17:15 Modified files: cm3/m3-sys/cm3/src/config/: NT386 Log message: For better and worse, rely on %PATH% and %LIB% environment variables instead of configured full paths. From jkrell at birch.elego.de Sat Dec 30 07:18:57 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 7:18:57 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300618.kBU6IvJO016915@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 07:18:57 Modified files: cm3/m3-sys/cm3/src/config/: NT386 Log message: Do not hide commands. From jkrell at birch.elego.de Sat Dec 30 07:19:29 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 7:19:29 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300619.kBU6JTdw016944@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 07:19:29 Modified files: cm3/m3-sys/cm3/src/config/: NT386 Log message: Lowercase the one instance of uppercase 'LINK'. From jkrell at birch.elego.de Sat Dec 30 07:22:32 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 7:22:32 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300622.kBU6MWem017067@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 07:22:32 Modified files: cm3/m3-sys/cm3/src/config/: NT386 Log message: Unix is bad. Use Microsoft style command line switches to Microsoft tools (not mklib). From jkrell at birch.elego.de Sat Dec 30 07:23:27 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 7:23:27 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300623.kBU6NRZl017105@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 07:23:27 Modified files: cm3/m3-sys/cm3/src/config/: NT386 Log message: Add one missing horizontal whitespace. From jkrell at birch.elego.de Sat Dec 30 07:25:47 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 7:25:47 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300625.kBU6PltO017205@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 07:25:47 Modified files: cm3/m3-sys/cm3/src/config/: NT386 Log message: Move slashes around with no real effect to unify with the other copy of this file, the one that is more likely actually alive. Eventually the files will be almost identical. From jkrell at birch.elego.de Sat Dec 30 08:07:29 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 8:07:29 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300707.kBU77TUV018007@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 08:07:29 Modified files: cm3/m3-sys/cm3/src/config/: NT386 Log message: Update compiler and linker flags, prep for changes around .pdb and .manifest files, cleanup some comments, etc. Many of the previously specified flags are odd and appear to come from an old Windows SDK win32.mak. That is not a particularly common way to build things, not a good example to follow. It is neither the Windows DDK that resembles the Windows (NT) build enviroment, nor it is any version of the Visual C++ IDE. link /debug means produce a .pdb. Use that. link /incremental:no is still pretty fast and avoids some warnings I vaguely recall. It produces somewhat smaller/faster binaries. It might be nice to expose this at a higher level to give users a choice of faster linking. Even the first link is faster without /incremental:no I recall. compiler: Debug information does not inhibit optimization and though optimized code is somewhat difficult to debug, you are still much better off with symbols than without. Therefore always produce debug information. link /debugtype:cv is surely the default, remove it. link /pdb:none is nice -- it puts the debug info in the .exe, and comments indicate that Windbg required it, but current linkers do not support this option, current Windbg does not require it, no Visual C++ GUI debugger ever required it. Remove it. link /align:0x1000 produces warnings I recall and surely is not necessary. Section alignment defaults to 4K == page size. (except Itanium? 8K?) File alignment defaults to either 4k or 512 depending. 4k is better for Win9x perf. all NT files use 512 which is smaller and fine for NT perf. Whatever this switch does, it is rarely used and not needed here, remove it. link /debug:mapped -- related to debug information in the .exe, remove it. link /debug:partial -- I don't know what this did, but debugging is hard enough, let's get whatever "full" information there is. /Z7 vs. /Zi With /Zi, the compiler puts type information in a .pdb whose default name depends on compiler -- vc50.pdb, vc80.pdb, etc. but which can be renamed like to foo_compiler.pdb with the /Fd switch. The type information is shared across source/object files. It is smaller/faster. With /Z7, type information is duplicated in every .obj. This is bigger and slower. Older linkers by default produce foo.pdb that refereneces vc*.pdb. This is why older debuggers often prompt for that file. Older linkers have an option /pdbtype that can be /pdbtype:septtypes or /pdbtype:consolidate. 5.0 has this for example. The default is septtypes. Consolidate produces a standalone .pdb. Newer linkers default to /pdbtype:consolidate and don't have an option to use the old default. The ideal is to use /Zi and /Fd and with older linkers /pdbtype:consolidate. But we don't have configuration that checks the linker version. For now use /Z7 which always works and produces one .pdb per link output. /Z7 also provides for standalone .libs. Despite being "old", /Z7 is still widely used (see the Windows DDK). There is very little C compilation in the system anyway so doesn't matter much. cl /_DLL is implied by cl /MD cl /_MT is implied by cl /MT or cl /MT /D_DLL informs the C runtime headers that the dynamic C runtime will be linked to. /D_MT informs the C runtime headers that a thread safe C runtime will be linked to. /D_DLL implies /D_MT at least in principle. There are no longer any thread-unsafe C runtimes and /MT is the default. Unify INITIAL_REACTOR_EDITOR and commented out INITIAL_REACTOR_BROWSER with the other copy of this file. I assume this is ok but might result in unexpected prompts. Prep for using the Visual C++ 8.0 dynamic runtime which requires a little more work. There is a new configuration option UseDynamicCRuntime which can be TRUE or FALSE but which for now is FALSE. TRUE is working on my machine but requires either a change to cm3 to copy along .manifest files or running scripts\win\msvcr80.cmd which is new. Cleanup some comments, whitespace, remove dead commented out code. We are dealing with files, not junk. Comment on the dumb use of a process to rename a file. Prep for cm3 change that will copy along .pdb files (and .manifests). .map files are junk, don't produce them. cl /DWIN32 is needed for old Windows headers (Visual C++ 2.0) newer headers use _WIN32 and current compilers #define it by default. cl /D_X86_ probably is defined by the compiler but I didn't check yet. Using /Z7 lets us remove the deletion of vc40.pdb (or whatever the .pdb gets named). From jkrell at birch.elego.de Sat Dec 30 08:11:34 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 8:11:34 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300711.kBU7BYkT018126@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 08:11:34 Modified files: cm3/m3-sys/cm3/src/config/: NT386 Log message: fix grammar in comment From jkrell at birch.elego.de Sat Dec 30 08:16:49 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 8:16:49 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300716.kBU7GnuB018182@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 08:16:49 Modified files: cm3/m3-sys/cminstall/src/config/: NT386 Log message: unification with C:\dev2\cm3\m3-sys\cm3\src\config\NT386, see history there roughly: depend on environment variables %LIB% and %PATH% instead of configuring full paths redo compiler and linker flags to work, work with many versions of Visual C++, always produce debugging information cleanup some comments prep for C runtime 8.0 support and cm3 copying of .pdb and .manifest files From jkrell at birch.elego.de Sat Dec 30 08:30:29 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 8:30:29 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300730.kBU7UTOU018360@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 08:30:29 Modified files: cm3/m3-sys/cm3/src/config/: NT386 cm3/m3-sys/cminstall/src/config/: NT386 Log message: unify/cleanup/put-back-commented-out-code the two NT386 configuration files These two should match? The dead one deleted? And they should only differ against a running system in configurable ways to use the dynamic C runtime or not where the cm3 root is (which really should just be computed by cm3 itself to be the directory its directory is in) what editor to run, which is really a reactor thing, and one of the defaults notepad does not work with all the Unix newlines in the system.. just make it an environment variable anyway? => Thus none of the configuration is actually interesting! Install keys appear to be really dead now. They were for lisencing the Modula-3 system you could pay for. The old version of make_lib is simple and probably just works, except for not supporting building .dll. But then again, cm3 ought to write out a .def file to feed to the linker? And Visual C++ lib can be used to build the static .lib and import .lib. It depends on if we want more dependence on the "system tools" or not. From jkrell at birch.elego.de Sat Dec 30 08:53:33 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 8:53:33 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300753.kBU7rXB9018702@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 08:53:33 Modified files: cm3/m3-sys/cm3/src/config/: ALPHA_OSF COPYRIGHT-CMASS FreeBSD2 FreeBSD3 FreeBSD4 HPPA I386_DARWIN IBMR2 IRIX5 LINUXELF LINUXLIBC6 NT386 NetBSD2_i386 PPC_DARWIN PPC_LINUX SOLgnu SOLsun SPARC Added files: cm3/m3-sys/cm3/src/config/: Tombstone.txt Log message: tombstone dead files/directory From jkrell at birch.elego.de Sat Dec 30 09:02:29 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 9:02:29 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300802.kBU82TdQ018879@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 09:02:29 Modified files: cm3/m3-libs/arithmetic/src/: m3overrides cm3/m3-libs/commandrw/src/: m3overrides cm3/m3-libs/dosunixrw/src/: m3overrides cm3/m3-libs/fftw/src/: m3overrides cm3/m3-libs/lapack/src/: m3overrides cm3/m3-libs/plplot/src/: m3overrides cm3/m3-libs/unittest/src/: m3overrides cm3/m3-tools/pp/src/: m3overrides cm3/m3-ui/ui/src/: m3overrides cm3/m3-ui/vbtkit/src/: m3overrides Log message: Most m3overrides do not use SL (SLash -- \ for Windows or / for Unix). These few do. Fewer variables are better. Removing these uses lets us not define SL in scripts\win\sysinfo.cmd. It is still used in some m3makefiles and those uses need to be reviewed. From jkrell at birch.elego.de Sat Dec 30 09:21:10 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 9:21:10 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612300821.kBU8LAW5019108@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 09:21:10 Modified files: cm3/m3-sys/m3quake/src/: QMachine.m3 Log message: When copying a .dll, .exe, or .lib, also copy along the .pdb and .manifest, whatever exists. The .pdbs are VERY nice to have next to the .dll/.exe for debugging. we only get callstacks and line numbers currently, no type info (except in C++ code), but that's still useful. The manifests are sometimes necessary to be able to run, such as when using msvcr80.dll on Windows XP/2003/Vista. Note that probably the following suffices: .exe => .pdb, .manifest .dll => .pdb .lib => nothing .dll manifests are probably in resources (need to investigate more -- using Modula-3 .dll from non Modula-3 .exe esp.) .lib have debugging info in them unless we use /Zi instead of /Z7 (At least with the C++ compiler. The Modula-3 compiler surely does not write out compilation .pdb files, nor does mklib handle them.) This code ought to be limited to Windows targets (aka "NT386" aka "Win32", but neither is accurate, NT386 doesn't cover Win9x, PowerPC, Mips, Alpha, Alpha64, Itanium, AMD64 Win32 doesn't cover Alpha64, Itanium, AMD64) From jkrell at birch.elego.de Sat Dec 30 12:36:41 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 12:36:41 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612301136.kBUBafBX020894@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 12:36:41 Modified files: cm3/scripts/win/: backup-pkgs.cmd clearenv.cmd def-std-pkgs.cmd do-cm3-base.cmd do-cm3-core.cmd do-cm3-min.cmd do-cm3-std.cmd do-pkg.cmd find-packages.cmd install-cm3-compiler.cmd pkgcmds.cmd pkginfo.cmd pkgmap.cmd sysinfo.cmd upgrade.cmd Log message: switch to Windows line endings at least on Windows-host files From jkrell at birch.elego.de Sat Dec 30 12:38:45 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 12:38:45 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612301138.kBUBcjLL020924@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 12:38:45 Modified files: cm3/scripts/win/c-runtime/: Microsoft.VC80.CRT.manifest msvcr80.cmd cm3/scripts/win/lib/: make-lib-1.cmd make-lib-2.cmd make-lib.cmd Log message: convert line endings to Windows format, in new files, that are used on Windows hosts From jkrell at birch.elego.de Sat Dec 30 17:11:29 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 17:11:29 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612301611.kBUGBTfe023252@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 17:11:29 Modified files: cm3/m3-sys/m3quake/src/: QMachine.m3 cm3/scripts/win/: pkginfo.cmd sysinfo.cmd Log message: config\NT386: % % The kernel32.lib installed by 5.2.6 is missing InterlockedCompareExchange % that is needed by msvcrt.lib 8.0 so delete it and fall back to whatever comes % with the compiler/linker. % delete_file(INSTALL_ROOT & "\\lib\\kernel32.lib") % % The user32.lib installed by 5.2.6 causes the Visual C++ 4.0 linker to % have an "internal error" so delete it and fall back to whatever comes % with the compiler/linker. % % % Just delete all of INSTALL_ROOT\lib and don't add it to %LIB%. % % % Handle shipping .manifest (and .pdb files) in quake/cm3.cfg. % This should sufficiently reduce the pain of bootstrapping such as to % eliminate any need for libcmt.lib and to be able to undo the change in m3quake.lib. % Remove the flexibility from cm3.cfg % % .map files are pretty worthless, remove creating them. (Make an option?) % You can load up a .dll/.exe in windbg using /z for image and then ln for list nearest % to map an address to a symbol. % Remove the dead configuration sections from INSTALL_ROOT: install key, web browser, text editor. % Booting will essentially look like copying in cm3.cfg and modifying just the INSTALL_ROOT. % The C++ compilation command lines are all fairly short so don't use response files. % (Still use response files for linking.) scripts\win\sysinfo.cmd: also delete the .libs here, though the config file is what is more guaranteeably runs scripts\win\pkginfo.cmd: Fix looking for ROOT in PKGS to escape the slashes, odd that it works before. (Still need to rewrite this all in Quake) qmachine.m3: go back a version -- removing the code to copy .pdbs and .manifests scripts\win\c-runtime can be largely gutted now but left alone for now From jkrell at birch.elego.de Sat Dec 30 17:16:43 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sat, 30 Dec 2006 17:16:43 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612301616.kBUGGh3n023308@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/30 17:16:43 Modified files: cm3/m3-sys/cminstall/src/config/: NT386 Log message: the correct version of config\NT386 this time also removed whitespace from ends of lines config\NT386: % % The kernel32.lib installed by 5.2.6 is missing InterlockedCompareExchange % that is needed by msvcrt.lib 8.0 so delete it and fall back to whatever comes % with the compiler/linker. % delete_file(INSTALL_ROOT & "\\lib\\kernel32.lib") % % The user32.lib installed by 5.2.6 causes the Visual C++ 4.0 linker to % have an "internal error" so delete it and fall back to whatever comes % with the compiler/linker. % % % Just delete all of INSTALL_ROOT\lib and don't add it to %LIB%. % % % Handle shipping .manifest (and .pdb files) in quake/cm3.cfg. % This should sufficiently reduce the pain of bootstrapping such as to % eliminate any need for libcmt.lib and to be able to undo the change in m3quake.lib. % Remove the flexibility from cm3.cfg % % .map files are pretty worthless, remove creating them. (Make an option?) % You can load up a .dll/.exe in windbg using /z for image and then ln for list nearest % to map an address to a symbol. % Remove the dead configuration sections from INSTALL_ROOT: install key, web browser, text editor. % Booting will essentially look like copying in cm3.cfg and modifying just the INSTALL_ROOT. % The C++ compilation command lines are all fairly short so don't use response files. % (Still use response files for linking.) scripts\win\sysinfo.cmd: also delete the .libs here, though the config file is what is more guaranteeably runs scripts\win\pkginfo.cmd: Fix looking for ROOT in PKGS to escape the slashes, odd that it works before. (Still need to rewrite this all in Quake) qmachine.m3: go back a version -- removing the code to copy .pdbs and .manifests scripts\win\c-runtime can be largely gutted now but left alone for now From jkrell at birch.elego.de Sun Dec 31 15:38:05 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sun, 31 Dec 2006 15:38:05 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612311438.kBVEc5SD028289@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/31 15:38:05 Modified files: cm3/m3-sys/cminstall/src/config/: NT386 cm3/scripts/win/: def-std-pkgs.cmd do-cm3-base.cmd do-cm3-core.cmd do-cm3-min.cmd sysinfo.cmd Log message: Work building the Windows import libs into the "overall build" instead of being a manual step on the side. (Where "overall build" isn't very well defined actually -- it is either cd'ing around to the right places and running cm3 or running scripts\win\do*.) While at it, convert the cmd to Quake, though that wasn't necessary, the m3makefile could just as well have run the older make-lib-2. Note that the Quake suffers from cm3.cfg doing too much for folks, not enough flexibility? The package name is probably too ambiguous -- it might be nice if package names were hierarchical so this was m3-win\import-libs instead of just import-libs cleanup SYSTEM_LIBS and SYSTEM_LIBORDER abstract out rename_file (currently an expensive exec) abstract out file_exists tweak compilation flags a little more use /Ox for optimized esp. optimize for size instead of speed size results in memory, which is then speed use /Oi for debug to get a minimal amount of inlining (intrinsics) commets in compile_c more verbose error output -- point to the log file important -- move exists/exporting of manifests for .exes till after linking, so that it works! cosmetic -- always deal with manifests ahead of pdbs, since manifests are about correctness and letting the code run/work whereas pdbs are "just nice to have" for debugging tweak computation of .manifest file names to reuse a tiny little bit.. comment out dead variables USE_ROOT and GNU_PLATFORM put "missing" newlines in one line if .. end fix comments about the .libs in sysinfo.cmd, and stop deleting them From jkrell at birch.elego.de Sun Dec 31 15:43:39 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sun, 31 Dec 2006 15:43:39 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612311443.kBVEhdLU028366@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/31 15:43:39 Modified files: cm3/scripts/win/lib/: advapi32.txt comctl32.txt comdlg32.txt gdi32.txt glu32.txt kernel32.txt make-lib-1.cmd make-lib-2.cmd make-lib.cmd netapi32.txt odbc32.txt odbccp32.txt opengl32.txt user32.txt winspool.txt wsock32.txt Added files: cm3/m3-win/import-libs/src/: advapi32.quake comctl32.quake comdlg32.quake gdi32.quake glu32.quake kernel32.quake m3makefile make-lib-1.cmd make-lib-2.cmd make-lib.cmd netapi32.quake odbc32.quake odbccp32.quake opengl32.quake user32.quake winspool.quake wsock32.quake Log message: previous was in wrong source tree and therefore forgot critical files and some minor diffs Work building the Windows import libs into the "overall build" instead of being a manual step on the side. (Where "overall build" isn't very well defined actually -- it is either cd'ing around to the right places and running cm3 or running scripts\win\do*.) While at it, convert the cmd to Quake, though that wasn't necessary, the m3makefile could just as well have run the older make-lib-2. Note that the Quake suffers from cm3.cfg doing too much for folks, not enough flexibility? The package name is probably too ambiguous -- it might be nice if package names were hierarchical so this was m3-win\import-libs instead of just import-libs tombstone scripts\win\lib From jkrell at birch.elego.de Sun Dec 31 15:59:35 2006 From: jkrell at birch.elego.de (Jay Krell) Date: Sun, 31 Dec 2006 15:59:35 () Subject: [M3commit] CVS Update: cm3 Message-ID: <200612311459.kBVExZKP028607@birch.elego.de> CVSROOT: /usr/cvs Changes by: jkrell at birch. 06/12/31 15:59:35 Modified files: cm3/scripts/win/c-runtime/: msvcr80.cmd use_msvcr80.manifest Log message: The 8.0 linker is outputing .manifest files and cm3.cfg/Quake are copying them, so that part can be deleted here. What is left is for copying around Microsoft.VC80.CRT.manifest / msvcr80.dll into .exe directories, for systems without the tools / redist installed. This is not needed once you install CLR 2.0, or Visual Studio 8.0, or Vista etc.