diff options
| author | Richard Brooksby | 2012-09-02 16:44:34 +0100 |
|---|---|---|
| committer | Richard Brooksby | 2012-09-02 16:44:34 +0100 |
| commit | 8631e4a2f7f2c5a3bf70cddde303cf44cb272fbe (patch) | |
| tree | 161faf8b9b40a76dff7500ff04d6f83912b4a1f6 /mps/code | |
| parent | 74c3b4b877ed085092f7dfc25067b397b60c2143 (diff) | |
| download | emacs-8631e4a2f7f2c5a3bf70cddde303cf44cb272fbe.tar.gz emacs-8631e4a2f7f2c5a3bf70cddde303cf44cb272fbe.zip | |
Removing windows dll export symbols and script to generate them, as we're not longer building dlls.
Copied from Perforce
Change: 179175
ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code')
| -rwxr-xr-x | mps/code/expgen.sh | 203 | ||||
| -rw-r--r-- | mps/code/w3gen.def | 158 |
2 files changed, 0 insertions, 361 deletions
diff --git a/mps/code/expgen.sh b/mps/code/expgen.sh deleted file mode 100755 index 78fd5a29c0d..00000000000 --- a/mps/code/expgen.sh +++ /dev/null | |||
| @@ -1,203 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # $Header$ | ||
| 3 | # | ||
| 4 | # Copyright (C) 2004-2005 Ravenbrook Limited. See end of file for license. | ||
| 5 | # | ||
| 6 | # expgen.sh | ||
| 7 | # | ||
| 8 | # Export Generator | ||
| 9 | # | ||
| 10 | # This is a script to generate the a list of exports that is required | ||
| 11 | # for Windows DLL creation. | ||
| 12 | # | ||
| 13 | # It processed the mps header files and produces a .DEF file that is | ||
| 14 | # suitable for use with the linker when producing a DLL file on Windows. | ||
| 15 | # | ||
| 16 | # When run, this script produces the following output files: | ||
| 17 | # expgen - a plain text list of functions declared in the header files. | ||
| 18 | # w3gen.def - a .def file suitable for use in the linker stage when | ||
| 19 | # building a Windows .DLL. | ||
| 20 | # | ||
| 21 | # Procedure for rebuilding a new w3gen.def | ||
| 22 | # | ||
| 23 | # This procedure should be carried out when the contents of w3gen.def | ||
| 24 | # would change. This is a bit tricky to say exactly when, but certainly | ||
| 25 | # when: | ||
| 26 | # a) new functions are declared in public header files. | ||
| 27 | # b) different header files are released to a client. | ||
| 28 | # | ||
| 29 | # Procedure: | ||
| 30 | # | ||
| 31 | # 0) Note: This procedure worked with gcc 3.3 "gcc (GCC) 3.3 20030304 | ||
| 32 | # (Apple Computer, Inc. build 1495)", running on Mac OS X 10.3. | ||
| 33 | # However, at 2005-10-12, with gcc 4.0 "gcc version 4.0.0 (Apple | ||
| 34 | # Computer, Inc. build 5026)", running on Mac OS X 10.4.2, it did not | ||
| 35 | # work. Invoking "gcc -fdump-translation-unit spong.h" did not produce | ||
| 36 | # a "spong.h.tu" file. | ||
| 37 | # | ||
| 38 | # 1) Ensure that the sources for w3gen.def are submitted. w3gen.def | ||
| 39 | # must be built from versioned sources. | ||
| 40 | # The sources are: | ||
| 41 | # expgen.sh | ||
| 42 | # w3build.bat | ||
| 43 | # all the headers that get included. | ||
| 44 | # For safety's sake better to ensure that no files are open: | ||
| 45 | # p4 opened ... | ||
| 46 | # should say '... - file(s) not opened on this client.' | ||
| 47 | # | ||
| 48 | # 2) Open w3gen.def for edit (making it writable) | ||
| 49 | # p4 open w3gen.def | ||
| 50 | # | ||
| 51 | # 3) Run this script. | ||
| 52 | # sh expgen.sh | ||
| 53 | # There should be no output when successful. | ||
| 54 | # | ||
| 55 | # 4) Eyeball the diff. | ||
| 56 | # p4 diff ... | ||
| 57 | # Check the that resulting diff is sane. For most changes it should | ||
| 58 | # just consist of a new symbol being included (plus some Header related | ||
| 59 | # junk). | ||
| 60 | # | ||
| 61 | # 5) Submit the change. | ||
| 62 | # p4 submit ... | ||
| 63 | # | ||
| 64 | # | ||
| 65 | # Design | ||
| 66 | # | ||
| 67 | # The script works by using the -fdump-translation-unit option of gcc. | ||
| 68 | # This produces a more easily parseable rendering of the header files. | ||
| 69 | # A fairly simple awk script is used to process the output. | ||
| 70 | # | ||
| 71 | # | ||
| 72 | # Dependencies | ||
| 73 | # | ||
| 74 | # This script currently depends fairly heavily on being run in a | ||
| 75 | # Unix-like environment with access to the GNU compiler. | ||
| 76 | # | ||
| 77 | # It's also fairly sensitive to changes in the undocumented format | ||
| 78 | # produced by gcc -fdump-translation-unit. Hopefully it is fairly easy | ||
| 79 | # to adapt to changes in this output. | ||
| 80 | # | ||
| 81 | # Assumes it can freely write to the files "fun", "name-s". | ||
| 82 | # | ||
| 83 | # | ||
| 84 | # Awk crash course | ||
| 85 | # | ||
| 86 | # Awk processes files line-by-line, thus the entire script is executed | ||
| 87 | # for each line of the input file (more complex awk scripts can control | ||
| 88 | # this using "next" and "getline" and so on). | ||
| 89 | # | ||
| 90 | # In awk $exp identifies a field within the line. $1 is the first | ||
| 91 | # field, $2 is the second and so on. $0 is the whole line. By default | ||
| 92 | # fields are separated by whitespace. | ||
| 93 | # | ||
| 94 | # string ~ RE is a matching expression and evaulated to true iff the | ||
| 95 | # string is matched by the regular expression. | ||
| 96 | # | ||
| 97 | # REFERENCES | ||
| 98 | # | ||
| 99 | # [SUSV3] Single UNIX Specification Version 3, | ||
| 100 | # http://www.unix.org/single_unix_specification/ | ||
| 101 | # | ||
| 102 | # For documenation of the standard utilities: sh, awk, join, sort, sed | ||
| 103 | # | ||
| 104 | # [MSDN-LINKER-DEF] Module-Definition (.def) files, | ||
| 105 | # http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_module.2d.definition_files.asp | ||
| 106 | # | ||
| 107 | # For documentation on the format of .def files. | ||
| 108 | |||
| 109 | tu () { | ||
| 110 | # if invoked on a file called spong.h will produce a file named | ||
| 111 | # spong.h.tu | ||
| 112 | gcc -fdump-translation-unit -o /dev/null "$@" | ||
| 113 | } | ||
| 114 | |||
| 115 | # This list of header files is produced by | ||
| 116 | # awk '/^copy.*\.h/{print $2}' w3build.bat | ||
| 117 | # followed by manual removal of mpsw3.h mpswin.h (which gcc on UNIX | ||
| 118 | # cannot parse). Also removed are mpsio.h mpslib.h as they defined | ||
| 119 | # interfaces that mps _uses_ not defines. Also removed is mpscmvff.h as | ||
| 120 | # it does not get included in mps.lib. Also removed is mpslibcb.h, | ||
| 121 | # which now has its own mpslibcb.def file (job002148). | ||
| 122 | # The functions declared in mpsw3.h have to be added to the .def file by | ||
| 123 | # hand later in this script. | ||
| 124 | f='mps.h | ||
| 125 | mpsavm.h | ||
| 126 | mpsacl.h | ||
| 127 | mpscamc.h | ||
| 128 | mpscams.h | ||
| 129 | mpscawl.h | ||
| 130 | mpsclo.h | ||
| 131 | mpscmv.h | ||
| 132 | mpscsnc.h | ||
| 133 | mpstd.h' | ||
| 134 | |||
| 135 | tu $f | ||
| 136 | |||
| 137 | >expgen | ||
| 138 | |||
| 139 | for a in $f | ||
| 140 | do | ||
| 141 | >fun | ||
| 142 | awk ' | ||
| 143 | $2=="function_decl" && $7=="srcp:" && $8 ~ /^'$a':/ {print $4 >"fun"} | ||
| 144 | $2=="identifier_node"{print $1,$4} | ||
| 145 | ' $a.tu | | ||
| 146 | sort -k 1 >name-s | ||
| 147 | |||
| 148 | echo ';' $a >>expgen | ||
| 149 | sort -k 1 fun | | ||
| 150 | join -o 2.2 - name-s >>expgen | ||
| 151 | done | ||
| 152 | |||
| 153 | { | ||
| 154 | printf '; %sHeader%s\n' '$' '$' | ||
| 155 | echo '; DO NOT EDIT. Automatically generated by $Header$' | sed 's/\$/!/g' | ||
| 156 | echo 'EXPORTS' | ||
| 157 | cat expgen | ||
| 158 | # This is where we manually the functions declared in mpsw3.h | ||
| 159 | echo ';' mpsw3.h - by hand | ||
| 160 | echo mps_SEH_filter | ||
| 161 | echo mps_SEH_handler | ||
| 162 | } > w3gen.def | ||
| 163 | |||
| 164 | |||
| 165 | # C. COPYRIGHT AND LICENSE | ||
| 166 | # | ||
| 167 | # Copyright (C) 2004-2005 Ravenbrook Limited <http://www.ravenbrook.com/>. | ||
| 168 | # All rights reserved. This is an open source license. Contact | ||
| 169 | # Ravenbrook for commercial licensing options. | ||
| 170 | # | ||
| 171 | # Redistribution and use in source and binary forms, with or without | ||
| 172 | # modification, are permitted provided that the following conditions are | ||
| 173 | # met: | ||
| 174 | # | ||
| 175 | # 1. Redistributions of source code must retain the above copyright | ||
| 176 | # notice, this list of conditions and the following disclaimer. | ||
| 177 | # | ||
| 178 | # 2. Redistributions in binary form must reproduce the above copyright | ||
| 179 | # notice, this list of conditions and the following disclaimer in the | ||
| 180 | # documentation and/or other materials provided with the distribution. | ||
| 181 | # | ||
| 182 | # 3. Redistributions in any form must be accompanied by information on how | ||
| 183 | # to obtain complete source code for this software and any accompanying | ||
| 184 | # software that uses this software. The source code must either be | ||
| 185 | # included in the distribution or be available for no more than the cost | ||
| 186 | # of distribution plus a nominal fee, and must be freely redistributable | ||
| 187 | # under reasonable conditions. For an executable file, complete source | ||
| 188 | # code means the source code for all modules it contains. It does not | ||
| 189 | # include source code for modules or files that typically accompany the | ||
| 190 | # major components of the operating system on which the executable file | ||
| 191 | # runs. | ||
| 192 | # | ||
| 193 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | ||
| 194 | # IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | ||
| 195 | # TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR | ||
| 196 | # PURPOSE, OR NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
| 197 | # COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| 198 | # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 199 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
| 200 | # USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
| 201 | # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
| 202 | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
| 203 | # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
diff --git a/mps/code/w3gen.def b/mps/code/w3gen.def deleted file mode 100644 index 03ebba93c95..00000000000 --- a/mps/code/w3gen.def +++ /dev/null | |||
| @@ -1,158 +0,0 @@ | |||
| 1 | ; $Header$ | ||
| 2 | ; --- EXTERNAL MPS FUNCTIONS --- | ||
| 3 | ; This is a list of the external MPS functions (those a client | ||
| 4 | ; might wish to call) present in the accompanying mps.lib library. | ||
| 5 | ; This list is for the w3i3mv platform. | ||
| 6 | ; | ||
| 7 | ; If you wish to link with the MPS library AND re-export these | ||
| 8 | ; functions from it (for example: so that other DLLs linked with | ||
| 9 | ; your binary will also be able to make direct MPS calls), then | ||
| 10 | ; you can specify: | ||
| 11 | ; /def:<this file> | ||
| 12 | ; to the MSVC LINK.EXE when you link your binary. | ||
| 13 | ; | ||
| 14 | ; This file was initially generated by !Header: //info.ravenbrook.com/project/mps/branch/2004-12-15/dll/code/expgen.sh#4 ! | ||
| 15 | ; And since then has been hand-edited. (But the result should be | ||
| 16 | ; identical (apart from ordering) to what expgen.sh would produce, | ||
| 17 | ; were it run on these sources. See MPS job001935.) | ||
| 18 | EXPORTS | ||
| 19 | ; mps.h | ||
| 20 | mps_ap_fill_with_reservoir_permit | ||
| 21 | mps_ap_fill | ||
| 22 | mps_commit | ||
| 23 | mps_reserve | ||
| 24 | mps_ap_destroy | ||
| 25 | mps_ap_create_v | ||
| 26 | mps_ap_create | ||
| 27 | mps_free | ||
| 28 | mps_alloc_v | ||
| 29 | mps_alloc | ||
| 30 | mps_chain_destroy | ||
| 31 | mps_chain_create | ||
| 32 | mps_pool_destroy | ||
| 33 | mps_pool_create_v | ||
| 34 | mps_pool_create | ||
| 35 | mps_fmt_destroy | ||
| 36 | mps_fmt_create_fixed | ||
| 37 | mps_fmt_create_auto_header | ||
| 38 | mps_fmt_create_B | ||
| 39 | mps_fmt_create_A | ||
| 40 | mps_arena_extend | ||
| 41 | mps_arena_has_addr | ||
| 42 | mps_addr_pool | ||
| 43 | mps_addr_fmt | ||
| 44 | mps_space_committed | ||
| 45 | mps_space_reserved | ||
| 46 | mps_arena_formatted_objects_walk | ||
| 47 | mps_arena_spare_commit_limit | ||
| 48 | mps_arena_spare_commit_limit_set | ||
| 49 | mps_arena_commit_limit_set | ||
| 50 | mps_arena_commit_limit | ||
| 51 | mps_arena_spare_committed | ||
| 52 | mps_arena_committed | ||
| 53 | mps_arena_reserved | ||
| 54 | mps_space_destroy | ||
| 55 | mps_space_create | ||
| 56 | mps_arena_destroy | ||
| 57 | mps_arena_create_v | ||
| 58 | mps_arena_create | ||
| 59 | mps_space_collect | ||
| 60 | mps_space_park | ||
| 61 | mps_space_release | ||
| 62 | mps_space_clamp | ||
| 63 | mps_arena_step | ||
| 64 | mps_arena_collect | ||
| 65 | mps_arena_start_collect | ||
| 66 | mps_arena_unsafe_restore_protection | ||
| 67 | mps_arena_unsafe_expose_remember_protection | ||
| 68 | mps_arena_expose | ||
| 69 | mps_arena_park | ||
| 70 | mps_arena_release | ||
| 71 | mps_arena_clamp | ||
| 72 | mps_telemetry_flush | ||
| 73 | mps_fix | ||
| 74 | mps_pool_check_fenceposts | ||
| 75 | mps_telemetry_label | ||
| 76 | mps_telemetry_intern | ||
| 77 | mps_telemetry_control | ||
| 78 | mps_alert_collection_set | ||
| 79 | mps_definalize | ||
| 80 | mps_finalize | ||
| 81 | mps_message_gc_not_condemned_size | ||
| 82 | mps_message_gc_condemned_size | ||
| 83 | mps_message_gc_live_size | ||
| 84 | mps_message_finalization_ref | ||
| 85 | mps_message_type | ||
| 86 | mps_message_queue_type | ||
| 87 | mps_message_discard | ||
| 88 | mps_message_get | ||
| 89 | mps_message_type_disable | ||
| 90 | mps_message_type_enable | ||
| 91 | mps_message_poll | ||
| 92 | mps_collections | ||
| 93 | mps_ld_isstale | ||
| 94 | mps_ld_merge | ||
| 95 | mps_ld_add | ||
| 96 | mps_ld_reset | ||
| 97 | mps_thread_dereg | ||
| 98 | mps_thread_reg | ||
| 99 | mps_tramp | ||
| 100 | mps_stack_scan_ambig | ||
| 101 | mps_root_destroy | ||
| 102 | mps_root_create_reg | ||
| 103 | mps_root_create_fmt | ||
| 104 | mps_root_create_table_masked | ||
| 105 | mps_root_create_table | ||
| 106 | mps_root_create | ||
| 107 | mps_reserve_with_reservoir_permit | ||
| 108 | mps_reservoir_available | ||
| 109 | mps_reservoir_limit | ||
| 110 | mps_arena_roots_walk | ||
| 111 | mps_reservoir_limit_set | ||
| 112 | mps_sac_empty | ||
| 113 | mps_pool_check_free_space | ||
| 114 | mps_sac_fill | ||
| 115 | mps_sac_flush | ||
| 116 | mps_sac_free | ||
| 117 | mps_sac_alloc | ||
| 118 | mps_sac_destroy | ||
| 119 | mps_sac_create | ||
| 120 | mps_rank_weak | ||
| 121 | mps_ap_alloc_pattern_reset | ||
| 122 | mps_rank_exact | ||
| 123 | mps_ap_alloc_pattern_end | ||
| 124 | mps_rank_ambig | ||
| 125 | mps_ap_alloc_pattern_begin | ||
| 126 | mps_alloc_pattern_ramp_collect_all | ||
| 127 | mps_alloc_pattern_ramp | ||
| 128 | mps_ap_trip | ||
| 129 | mps_ap_frame_pop | ||
| 130 | mps_ap_frame_push | ||
| 131 | ; mpsavm.h | ||
| 132 | mps_arena_class_vmnz | ||
| 133 | mps_arena_class_vm | ||
| 134 | mps_arena_vm_growth | ||
| 135 | ; mpsacl.h | ||
| 136 | mps_arena_class_cl | ||
| 137 | ; mpscamc.h | ||
| 138 | mps_class_amc | ||
| 139 | mps_amc_apply | ||
| 140 | mps_class_amcz | ||
| 141 | ; mpscams.h | ||
| 142 | mps_class_ams_debug | ||
| 143 | mps_class_ams | ||
| 144 | ; mpscawl.h | ||
| 145 | mps_class_awl | ||
| 146 | ; mpsclo.h | ||
| 147 | mps_class_lo | ||
| 148 | ; mpscmv.h | ||
| 149 | mps_mv_size | ||
| 150 | mps_class_mv_debug | ||
| 151 | mps_mv_free_size | ||
| 152 | mps_class_mv | ||
| 153 | ; mpscsnc.h | ||
| 154 | mps_class_snc | ||
| 155 | ; mpstd.h | ||
| 156 | ; mpsw3.h - by hand | ||
| 157 | mps_SEH_filter | ||
| 158 | mps_SEH_handler | ||