2
* SCCS: @(#)dynlink.c 1.2 (99/09/03)
4
* UniSoft Ltd., London, England
6
* Copyright (c) 1998 The Open Group
9
* No part of this source code may be reproduced, stored in a retrieval
10
* system, or transmitted, in any form or by any means, electronic,
11
* mechanical, photocopying, recording or otherwise, except as stated
12
* in the end-user licence agreement, without the prior permission of
13
* the copyright owners.
14
* A copy of the end-user licence agreement is contained in the file
15
* Licence which accompanies this distribution.
17
* Motif, OSF/1, UNIX and the "X" device are registered trademarks and
18
* IT DialTone and The Open Group are trademarks of The Open Group in
19
* the US and other countries.
21
* X/Open is a trademark of X/Open Company Limited in the UK and other
27
static char sccsid_dynlink[] = "@(#)dynlink.c 1.2 (99/09/03) TET3 release 3.7";
30
/************************************************************************
32
SCCS: @(#)dynlink.c 1.2 99/09/03 TETware release 3.7
35
AUTHOR: Andrew Dingwall, UniSoft Ltd.
36
DATE CREATED: July 1998
39
this is a simple dynamic linker for use when building a test case
40
to use a shared API library on a Win32 system
42
the dynamic linker is in two parts:
44
tet_w32dynlink() resides in the main program
45
tet_w32dlcheck() resides in the shared API library
47
tet_w32dynlink() performs the dynamic linking
48
tet_w32dlcheck() ensures that none of the pointers have been missed
50
see the comment in dtmac.h for an overview of how this works
53
no calls to TETware library functions are allowed from this file
57
Andrew Dingwall, UniSoft Ltd., July 1999
58
moved TCM code out of the API library
60
************************************************************************/
63
** This file is a component of the TCM (tcm.o) and/or one of the child
64
** process controllers (tcmchild.o and tcmrem.o).
65
** On UNIX systems, these .o files are built using ld -r.
66
** There is no equivalent to ld -r in MSVC, so on Win32 systems each .c
67
** file is #included in a scratch .c or .cpp file and a single object
68
** file built from that.
70
** This imposes some restictions on the contents of this file:
72
** + Since this file might be included in a C++ program, all
73
** functions must have both ANSI C and common C definitions.
75
** + The only .h file that may appear in this file is tcmhdrs.h;
76
** all other .h files that are needed must be #included in there.
78
** + The scope of static variables and functions encompasses all
79
** the source files, not just this file.
80
** So all static variables and functions must have unique names.
84
/* TET_SHLIB_SOURCE implies TET_SHLIB */
85
#if defined(TET_SHLIB_SOURCE) && !defined(TET_SHLIB)
90
int tet_dynlink_c_not_used;