home *** CD-ROM | disk | FTP | other *** search
- SDLS RELEASE 1.02 ERRATA
-
- _____________________________________________________________________________
-
-
- The section describing the macros for writing DLLs in C is incorrect. The way
- the macros work is described below.
-
- The preprocessing for the dll.h and the replacement standard header
- files are controlled by two macros:
-
- _DLL Define (e.g. using -D_DLL at the command line) to
- indicate that we are compiling code to be placed in
- a Dynamic Link Library. Do not define this macro
- if compiling for a statically linked version of the
- library.
-
- Precisely, defining _DLL will cause accesses to
- global SharedCLibrary variables (e.g. stdin or
- errno) to be translated into calls to find the
- address of the client's copy of these variables.
- Also, it enables translation of _dllEntry(name)
- into _dllEntry_name.
-
- _dll_NODLL Define (e.g. using -D_dll_NODLL) to indiciate that
- we should not perform any name translations or use
- DLLLib functions apart from the SWI veneers. Do not
- define if the program being compiled will not be
- using Dynamic Linking at all.
-
- Precisely, defining _dll_NODLL will make the
- following dllLib function calls into no-ops:
-
- * _dll_appspace
- * _dll_clibdata
- * _dll_setname
- * _dll_setjmp
- * _dll_longjmped
- * _dll_giveMemory
-
- It will also make the `safe *command' routines
- _dll_system etc. into direct calls to the `unsafe'
- versions (since we're not using SDLS, it doesn't
- matter). Note that the header file currently uses
- RISC_OSLib routines os_cli and wimp_starttask for
- this: you should change dll.h to use OSLib or DeskLib
- versions of these functions as appropriate.
-
- Finally, it will disable translation of
- _extEntry(name) into _extEntry_name.
-
- Note that _dll_setname is a synonym for dll_nameApp
- invented specifically so that defining _dll_NODLL
- makes it a no-op. It is recommended that you use
- the macro rather than the direct call in your own
- code.
-
- Note that you should never define both of these macros at the same
- time. Typical macro usage is shown in the table below.
-
- Compiling... _DLL _dll_NODLL
-
- code for a DLL defined not defined
- code for a static lib not defined as for client
- client using a DLL not defined not defined
- client not using DLLs not defined defined
-
- _____________________________________________________________________________
-
-