aboutsummaryrefslogtreecommitdiffstats
path: root/mps/code
diff options
context:
space:
mode:
authorRichard Brooksby2012-09-02 16:44:34 +0100
committerRichard Brooksby2012-09-02 16:44:34 +0100
commit8631e4a2f7f2c5a3bf70cddde303cf44cb272fbe (patch)
tree161faf8b9b40a76dff7500ff04d6f83912b4a1f6 /mps/code
parent74c3b4b877ed085092f7dfc25067b397b60c2143 (diff)
downloademacs-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-xmps/code/expgen.sh203
-rw-r--r--mps/code/w3gen.def158
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
109tu () {
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.
124f='mps.h
125mpsavm.h
126mpsacl.h
127mpscamc.h
128mpscams.h
129mpscawl.h
130mpsclo.h
131mpscmv.h
132mpscsnc.h
133mpstd.h'
134
135tu $f
136
137>expgen
138
139for a in $f
140do
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
151done
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.)
18EXPORTS
19; mps.h
20mps_ap_fill_with_reservoir_permit
21mps_ap_fill
22mps_commit
23mps_reserve
24mps_ap_destroy
25mps_ap_create_v
26mps_ap_create
27mps_free
28mps_alloc_v
29mps_alloc
30mps_chain_destroy
31mps_chain_create
32mps_pool_destroy
33mps_pool_create_v
34mps_pool_create
35mps_fmt_destroy
36mps_fmt_create_fixed
37mps_fmt_create_auto_header
38mps_fmt_create_B
39mps_fmt_create_A
40mps_arena_extend
41mps_arena_has_addr
42mps_addr_pool
43mps_addr_fmt
44mps_space_committed
45mps_space_reserved
46mps_arena_formatted_objects_walk
47mps_arena_spare_commit_limit
48mps_arena_spare_commit_limit_set
49mps_arena_commit_limit_set
50mps_arena_commit_limit
51mps_arena_spare_committed
52mps_arena_committed
53mps_arena_reserved
54mps_space_destroy
55mps_space_create
56mps_arena_destroy
57mps_arena_create_v
58mps_arena_create
59mps_space_collect
60mps_space_park
61mps_space_release
62mps_space_clamp
63mps_arena_step
64mps_arena_collect
65mps_arena_start_collect
66mps_arena_unsafe_restore_protection
67mps_arena_unsafe_expose_remember_protection
68mps_arena_expose
69mps_arena_park
70mps_arena_release
71mps_arena_clamp
72mps_telemetry_flush
73mps_fix
74mps_pool_check_fenceposts
75mps_telemetry_label
76mps_telemetry_intern
77mps_telemetry_control
78mps_alert_collection_set
79mps_definalize
80mps_finalize
81mps_message_gc_not_condemned_size
82mps_message_gc_condemned_size
83mps_message_gc_live_size
84mps_message_finalization_ref
85mps_message_type
86mps_message_queue_type
87mps_message_discard
88mps_message_get
89mps_message_type_disable
90mps_message_type_enable
91mps_message_poll
92mps_collections
93mps_ld_isstale
94mps_ld_merge
95mps_ld_add
96mps_ld_reset
97mps_thread_dereg
98mps_thread_reg
99mps_tramp
100mps_stack_scan_ambig
101mps_root_destroy
102mps_root_create_reg
103mps_root_create_fmt
104mps_root_create_table_masked
105mps_root_create_table
106mps_root_create
107mps_reserve_with_reservoir_permit
108mps_reservoir_available
109mps_reservoir_limit
110mps_arena_roots_walk
111mps_reservoir_limit_set
112mps_sac_empty
113mps_pool_check_free_space
114mps_sac_fill
115mps_sac_flush
116mps_sac_free
117mps_sac_alloc
118mps_sac_destroy
119mps_sac_create
120mps_rank_weak
121mps_ap_alloc_pattern_reset
122mps_rank_exact
123mps_ap_alloc_pattern_end
124mps_rank_ambig
125mps_ap_alloc_pattern_begin
126mps_alloc_pattern_ramp_collect_all
127mps_alloc_pattern_ramp
128mps_ap_trip
129mps_ap_frame_pop
130mps_ap_frame_push
131; mpsavm.h
132mps_arena_class_vmnz
133mps_arena_class_vm
134mps_arena_vm_growth
135; mpsacl.h
136mps_arena_class_cl
137; mpscamc.h
138mps_class_amc
139mps_amc_apply
140mps_class_amcz
141; mpscams.h
142mps_class_ams_debug
143mps_class_ams
144; mpscawl.h
145mps_class_awl
146; mpsclo.h
147mps_class_lo
148; mpscmv.h
149mps_mv_size
150mps_class_mv_debug
151mps_mv_free_size
152mps_class_mv
153; mpscsnc.h
154mps_class_snc
155; mpstd.h
156; mpsw3.h - by hand
157mps_SEH_filter
158mps_SEH_handler