annotate dyncall/dyncall.3 @ 533:71c884e610f0

- integration of patches from Raphael Luba, Thekla, Inc.: * integration of aggregate-by-value (struct, union) support patch for x64 (win and sysv) * windows/x64 asm additions to specify how stack unwinds (help for debuggers, exception handling, etc.) * see Changelog for details - new calling convention modes for thiscalls (platform agnostic, was specific before) * new signature character for platform agnostic thiscalls ('*' / DC_SIGCHAR_CC_THISCALL) - dcCallF(), dcVCallF(), dcArgF() and dcVArgF(): * added support for aggregates-by-value (wasn't part of patch) * change that those functions don't implicitly call dcReset() anymore, which was unflexible (breaking change) - added macros to feature test implementation for aggregate-by-value and syscall support - changed libdyncall_s.lib and libdyncallback_s.lib order in callback test makefiles, as some toolchains are picky about order - doc: * man page updates to describe aggregate interface * manual overview changes to highlight platforms with aggregate-by-value support - test/plain: replaced tests w/ old/stale sctruct interface with new aggregate one
author Tassilo Philipp
date Thu, 21 Apr 2022 13:35:47 +0200
parents 78dfa2f9783a
children 52e87d4988e3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
1 .\" Copyright (c) 2007-2022 Daniel Adler <dadler AT uni-goettingen DOT de>,
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
2 .\" Tassilo Philipp <tphilipp AT potion-studios DOT com>
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
3 .\"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
4 .\" Permission to use, copy, modify, and distribute this software for any
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
5 .\" purpose with or without fee is hereby granted, provided that the above
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
6 .\" copyright notice and this permission notice appear in all copies.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
7 .\"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
8 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
9 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
10 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
11 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
12 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
13 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
14 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
15 .\"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
16 .Dd $Mdocdate$
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
17 .Dt dyncall 3
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
18 .Sh NAME
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
19 .Nm dyncall
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
20 .Nd encapsulation of architecture-, OS- and compiler-specific function call
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
21 semantics
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
22 .Sh SYNOPSIS
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
23 .In dyncall.h
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
24 .Ft DCCallVM *
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
25 .Fn dcNewCallVM "DCsize size"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
26 .Ft void
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
27 .Fn dcFree "DCCallVM * vm"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
28 .Ft void
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
29 .Fn dcMode "DCCallVM * vm" "DCint mode"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
30 .Ft void
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
31 .Fn dcReset "DCCallVM * vm"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
32 .Ft void
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
33 .Fn dcArgBool "DCCallVM * vm" "DCbool arg"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
34 .Ft void
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
35 .Fn dcArgChar "DCCallVM * vm" "DCchar arg"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
36 .Ft void
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
37 .Fn dcArgShort "DCCallVM * vm" "DCshort arg"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
38 .Ft void
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
39 .Fn dcArgInt "DCCallVM * vm" "DCint arg"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
40 .Ft void
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
41 .Fn dcArgLong "DCCallVM * vm" "DClong arg"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
42 .Ft void
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
43 .Fn dcArgLongLong "DCCallVM * vm" "DClonglong arg"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
44 .Ft void
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
45 .Fn dcArgFloat "DCCallVM * vm" "DCfloat arg"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
46 .Ft void
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
47 .Fn dcArgDouble "DCCallVM * vm" "DCdouble arg"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
48 .Ft void
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
49 .Fn dcArgPointer "DCCallVM * vm" "DCpointer arg"
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
50 .Ft void
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
51 .Fn dcArgAggr "DCCallVM * vm" "const DCaggr * ag" "const void * value"
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
52 .Ft DCvoid
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
53 .Fn dcCallVoid "DCCallVM * vm" "DCpointer funcptr"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
54 .Ft DCbool
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
55 .Fn dcCallBool "DCCallVM * vm" "DCpointer funcptr"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
56 .Ft DCchar
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
57 .Fn dcCallChar "DCCallVM * vm" "DCpointer funcptr"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
58 .Ft DCshort
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
59 .Fn dcCallShort "DCCallVM * vm" "DCpointer funcptr"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
60 .Ft DCint
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
61 .Fn dcCallInt "DCCallVM * vm" "DCpointer funcptr"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
62 .Ft DClong
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
63 .Fn dcCallLong "DCCallVM * vm" "DCpointer funcptr"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
64 .Ft DClonglong
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
65 .Fn dcCallLongLong "DCCallVM * vm" "DCpointer funcptr"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
66 .Ft DCfloat
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
67 .Fn dcCallFloat "DCCallVM * vm" "DCpointer funcptr"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
68 .Ft DCdouble
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
69 .Fn dcCallDouble "DCCallVM * vm" "DCpointer funcptr"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
70 .Ft DCpointer
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
71 .Fn dcCallPointer "DCCallVM * vm" "DCpointer funcptr"
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
72 .Ft DCpointer
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
73 .Fn dcCallAggr "DCCallVM * vm" "DCpointer funcptr" "const DCaggr * ag" "DCpointer ret"
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
74 .Ft void
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
75 .Fn dcBeginCallAggr "DCCallVM * vm" "const DCaggr * ag"
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
76 .Ft void
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
77 .Fn dcArgF "DCCallVM * vm" "const DCsigchar * signature" "..."
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
78 .Ft void
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
79 .Fn dcVArgF "DCCallVM * vm" "const DCsigchar * signature" "va_list args"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
80 .Ft void
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
81 .Fn dcCallF "DCCallVM * vm" "DCValue * result" "DCpointer funcptr" "const DCsigchar * signature" "..."
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
82 .Ft void
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
83 .Fn dcVCallF "DCCallVM * vm" "DCValue * result" "DCpointer funcptr" "const DCsigchar * signature" "va_list args"
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
84 .Ft DCaggr*
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
85 .Fn dcNewAggr "DCsize maxFieldCount" "DCsize size"
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
86 .Ft void
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
87 .Fn dcAggrField "DCaggr* ag" "DCsigchar type" "DCint offset" "DCsize array_len" "..."
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
88 .Ft void
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
89 .Fn dcCloseAggr "DCaggr* ag"
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
90 .Ft void
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
91 .Fn dcFreeAggr "DCaggr* ag"
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
92 .Sh DESCRIPTION
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
93 The
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
94 .Nm
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
95 library encapsulates architecture-, OS- and compiler-specific function call
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
96 semantics in a virtual "bind argument parameters from left to right and then
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
97 call" interface allowing programmers to call C functions in a completely
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
98 dynamic manner.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
99 .Pp
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
100 In other words, instead of calling a function directly, the
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
101 .Nm
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
102 library provides a mechanism to push the function parameters manually and to
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
103 issue the call afterwards.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
104 .Pp
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
105 Since the idea behind this concept is similar to call dispatching mechanisms
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
106 of virtual machines, the object that can be dynamically loaded with arguments,
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
107 and then used to actually invoke the call, is called CallVM. It is possible to
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
108 change the calling convention used by the CallVM at run-time. Due to the fact
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
109 that nearly every platform comes with one or more distinct calling conventions, the
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
110 .Nm
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
111 library project intends to be a portable and open-source approach to the variety of
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
112 compiler/toolchain/platform-specific binary interfaces subtleties, and so on...
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
113 .Pp
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
114 .Fn dcNewCallVM
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
115 creates a new CallVM object, where
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
116 .Ar size
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
117 specifies the max size of the internal stack that will be allocated and used to
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
118 bind the arguments to. Use
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
119 .Fn dcFree
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
120 to destroy the CallVM object.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
121 .Pp
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
122 .Fn dcMode
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
123 sets the calling convention to use. See dyncall.h for a list of
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
124 available modes. Note that some mode/platform combinations don't make any
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
125 sense (e.g. using a PowerPC calling convention on a MIPS platform) and are
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
126 silently ignored.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
127 .Pp
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
128 .Fn dcReset
362
78dfa2f9783a - added helper function dcGetModeFromCCSigChar() mapping callconv sig chars to respective mode
Tassilo Philipp
parents: 360
diff changeset
129 resets the internal stack of arguments and prepares it for a new call. This
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
130 function should be called after setting the initial/main call mode (using
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
131 dcMode()), but prior to binding arguments to the CallVM (sometimes dcMode()
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
132 calls are needed after pushing some args, e.g. DC_SIGCHAR_CC_ELLIPSIS_VARARGS,
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
133 which is used prior to binding varargs of variadic functions). Use it also when
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
134 reusing a CallVM, as arguments don't get flushed automatically after a function
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
135 call invocation. Note: you should also call this function after initial
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
136 creation of the a CallVM object, as dcNewCallVM doesn't do this, implicitly.
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
137 .Pp
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
138 .Fn dcArgBool ,
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
139 .Fn dcArgChar ,
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
140 .Fn dcArgShort ,
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
141 .Fn dcArgInt ,
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
142 .Fn dcArgLong ,
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
143 .Fn dcArgLongLong ,
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
144 .Fn dcArgFloat ,
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
145 .Fn dcArgDouble ,
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
146 .Fn dcArgPointer
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
147 and
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
148 .Fn dcArgAggr
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
149 are used to bind arguments of the named types to the CallVM object. Arguments should
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
150 be bound in
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
151 .Em "left to right"
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
152 order regarding the C function prototype.
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
153 .Pp
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
154 .Fn dcCallVoid ,
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
155 .Fn dcCallBool ,
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
156 .Fn dcCallChar ,
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
157 .Fn dcCallShort ,
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
158 .Fn dcCallInt ,
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
159 .Fn dcCallLong ,
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
160 .Fn dcCallLongLong ,
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
161 .Fn dcCallFloat ,
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
162 .Fn dcCallDouble ,
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
163 .Fn dcCallPointer
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
164 and
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
165 .Fn dcCallAggr
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
166 call the function with the previously bound arguments and return the named
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
167 type, where
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
168 .Ar funcptr
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
169 is a pointer to the function to call. After the invocation of the function
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
170 call, the argument values are still bound to the CallVM and a second call
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
171 using the same arguments can be issued. Call
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
172 .Fn dcReset
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
173 (as described above) to clear the internal argument stack.
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
174 .Pp
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
175 The interfaces for passing and/or returning aggregates (struct, union) by value
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
176 need to be explained as they are a bit more complex. Every such argument or
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
177 return type needs some extra info describing its layout via a
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
178 .Ft DCaggr
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
179 structure (except for non-trivial C++ aggregates, see AGGREGATE DESCRIPTION for
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
180 more information, below). Passing such arguments is then done by using
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
181 .Fn dcArgAggr ,
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
182 where
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
183 .Ar ag
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
184 is a pointer to the description and
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
185 .Ar value
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
186 is a pointer to the aggregate in question. Calling a function that returns an
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
187 aggregate by value is done via two functions,
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
188 .Fn dcBeginCallAggr ,
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
189 which handles special cases to facilitate the implementation and
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
190 .Sy must
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
191 be called
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
192 .Sy before
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
193 pushing any arguments, and finally
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
194 .Fn dcCallAggr
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
195 where
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
196 .Ar ag
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
197 is a pointer to the description (for both calls) and
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
198 .Ar ret
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
199 points to memory large enough to hold the to be returned aggregate.
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
200 .Fn dcCallAggr
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
201 returns a pointer to
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
202 .Ar ret .
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
203 .Pp
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
204 .Sy NOTE:
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
205 C++ non-trivial aggregates (check with the std::is_trivial type trait) need
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
206 some special handling. First of all, no aggregate description is needed and
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
207 NULL must be passed wherever a
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
208 .Ft DCaggr*
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
209 argument is needed. Also, as
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
210 .Nm
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
211 is oblivious to how to do any custom/non-trivial construction or copy, and thus
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
212 cannot do the copy of the aggregate, passed by-value, itself, the user has to
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
213 provide such copies, where needed. E.g. when passing such an aggregate as an
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
214 argument by-value, using
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
215 .Fn dcArgAggr ,
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
216 in order to preserver the call's by-value semantics.
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
217 .Pp
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
218 .Fn dcArgF ,
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
219 .Fn dcVArgF ,
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
220 .Fn dcCallF
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
221 and
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
222 .Fn dcVCallF
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
223 can be used to bind arguments in a printf-style call, using a signature
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
224 string encoding the argument and return types. The former 2 only bind
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
225 the arguments to the
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
226 .Ar vm
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
227 object (and ignore return types specified in the
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
228 signature), whereas the latter two issue a call to the given function pointer,
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
229 afterwards. The return value will be stored in
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
230 .Ar result .
360
32736025371f - doc updates with more info about signature string usage
Tassilo Philipp
parents: 250
diff changeset
231 The signature string also features calling convention mode selection.
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
232 For information about the signature format, refer to dyncall_signature.h or the
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
233 .Nm
533
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
234 manual.
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
235 .Pp
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
236 For passing aggregates using
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
237 .Fn dc*F
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
238 functions, pass two varargs for each aggregate, first a pointer to DCaggr, then
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
239 a pointer to the aggregate in question. For returning aggregates using those
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
240 functions, pass
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
241 .Sy two final extra
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
242 arguments, first a pointer to DCaggr describing the return value, then a
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
243 pointer to memory large enough to hold it. An explicit call do
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
244 .Fn dcBeginCallAggr
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
245 is not needed in those cases, and a pointer to the to be returned aggregate is
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
246 returned via
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
247 .Ar result .
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
248 .Sh AGGREGATE DESCRIPTION
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
249 In order to describe an aggregate (except for C++ non-trivial aggregates, as
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
250 mentioned above), create a DCaggr object using
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
251 .Fn dcNewAggr ,
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
252 where
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
253 .Ar maxFieldCount
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
254 is greater or equal to the number of fields the aggregate has (a nested
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
255 aggregate or an array is counted as one field), and
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
256 .Ar size
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
257 is the size of the aggregate (e.g. as determined by sizeof()).
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
258 .Pp
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
259 .Fn dcFreeAggr
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
260 destroys the DCaggr object.
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
261 .Pp
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
262 .Fn dcAggrField
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
263 is used to describe the aggregate, field-by-field (in order), with
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
264 .Ar type
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
265 being a DC_SIGCHAR_* (see dyncall_signature.h),
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
266 .Ar offset
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
267 being the offset of the field from the beginning of the aggregate (use C's
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
268 offsetof(3)), and
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
269 .Ar array_len
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
270 being the number of array elements,
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
271 .Sy iff
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
272 the field is an array, otherwise use 1. For nested aggregates (when using
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
273 DC_SIGCHAR_AGGREGATE as
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
274 .Ft type ) ,
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
275 one needs to pass the pointer to the nested aggregate's DCaggr object as last
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
276 argument (in
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
277 .Ar ... ) .
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
278 .Pp
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
279 Call
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
280 .Fn dcCloseAggr
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
281 after having described all fields of an aggregate.
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
282 .Pp
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
283 Note that c99 flexible array members do not count as a field, and must be
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
284 omitted, as passing aggregates with a flexible array member by value in C would
71c884e610f0 - integration of patches from Raphael Luba, Thekla, Inc.:
Tassilo Philipp
parents: 362
diff changeset
285 also omit it.
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
286 .Sh EXAMPLE
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
287 Let's say, we want to make a call to the function:
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
288 .Bd -literal -offset indent
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
289 double sqrt(double x);
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
290 .Ed
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
291 .Pp
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
292 Using the
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
293 .Nm
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
294 library, this function would be called as follows:
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
295 .Bd -literal -offset indent
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
296 double r;
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
297 DCCallVM* vm = dcNewCallVM(4096);
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
298 dcMode(vm, DC_CALL_C_DEFAULT);
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
299 dcReset(vm);
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
300 dcArgDouble(vm, 4.2373);
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
301 r = dcCallDouble(vm, (DCpointer)&sqrt);
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
302 dcFree(vm);
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
303 .Ed
250
7cb8a0aaf638 - note about c99 (+ anon struct/union) requirements in doc
Tassilo Philipp
parents: 93
diff changeset
304 .Sh CONFORMING TO
7cb8a0aaf638 - note about c99 (+ anon struct/union) requirements in doc
Tassilo Philipp
parents: 93
diff changeset
305 The dyncall library needs at least a c99 compiler with additional support for
7cb8a0aaf638 - note about c99 (+ anon struct/union) requirements in doc
Tassilo Philipp
parents: 93
diff changeset
306 anonymous structs/unions (which were introduced officially in c11). Given that
7cb8a0aaf638 - note about c99 (+ anon struct/union) requirements in doc
Tassilo Philipp
parents: 93
diff changeset
307 those are generally supported by pretty much all major c99 conforming compilers
7cb8a0aaf638 - note about c99 (+ anon struct/union) requirements in doc
Tassilo Philipp
parents: 93
diff changeset
308 (as default extension), it should build fine with a c99 toolchain. Strictly
7cb8a0aaf638 - note about c99 (+ anon struct/union) requirements in doc
Tassilo Philipp
parents: 93
diff changeset
309 speaking, dyncall conforms to c11, though.
7cb8a0aaf638 - note about c99 (+ anon struct/union) requirements in doc
Tassilo Philipp
parents: 93
diff changeset
310 .Ed
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
311 .Sh SEE ALSO
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
312 .Xr dyncallback 3 ,
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
313 .Xr dynload 3
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
314 and the
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
315 .Nm
93
dfde5035d410 - better, more neutral .3 SEE ALSO
cslag
parents: 81
diff changeset
316 manual (available in HTML and PDF format) for more information.
0
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
317 .Sh AUTHORS
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
318 .An "Daniel Adler" Aq dadler@uni-goettingen.de
3e629dc19168 initial from svn dyncall-1745
Daniel Adler
parents:
diff changeset
319 .An "Tassilo Philipp" Aq tphilipp@potion-studios.com