Added DLLEXPORT definition to Alloc routines so that MSX could see them
git-svn-id: https://epanet.svn.sourceforge.net/svnroot/epanet/BASE/trunk@422 c320cabd-cc23-0410-96d8-e60fbf53ed7f
This commit is contained in:
@@ -88,7 +88,7 @@ static alloc_hdr_t * AllocHdr()
|
|||||||
** Returns pointer to the new pool.
|
** Returns pointer to the new pool.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
alloc_handle_t * AllocInit()
|
DLLEXPORT alloc_handle_t * AllocInit()
|
||||||
{
|
{
|
||||||
alloc_handle_t *newpool;
|
alloc_handle_t *newpool;
|
||||||
|
|
||||||
@@ -108,7 +108,7 @@ alloc_handle_t * AllocInit()
|
|||||||
** memory from the current pool.
|
** memory from the current pool.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char * Alloc(long size)
|
DLLEXPORT char *Alloc(long size)
|
||||||
{
|
{
|
||||||
alloc_hdr_t *hdr = root->current;
|
alloc_hdr_t *hdr = root->current;
|
||||||
char *ptr;
|
char *ptr;
|
||||||
@@ -158,7 +158,7 @@ char * Alloc(long size)
|
|||||||
** Change the current pool. Return the old pool.
|
** Change the current pool. Return the old pool.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
alloc_handle_t * AllocSetPool(alloc_handle_t *newpool)
|
DLLEXPORT alloc_handle_t * AllocSetPool(alloc_handle_t *newpool)
|
||||||
{
|
{
|
||||||
alloc_handle_t *old = (alloc_handle_t *) root;
|
alloc_handle_t *old = (alloc_handle_t *) root;
|
||||||
root = (alloc_root_t *) newpool;
|
root = (alloc_root_t *) newpool;
|
||||||
@@ -173,7 +173,7 @@ alloc_handle_t * AllocSetPool(alloc_handle_t *newpool)
|
|||||||
** so this is very fast.
|
** so this is very fast.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void AllocReset()
|
DLLEXPORT void AllocReset()
|
||||||
{
|
{
|
||||||
root->current = root->first;
|
root->current = root->first;
|
||||||
root->current->free = root->current->block;
|
root->current->free = root->current->block;
|
||||||
@@ -187,7 +187,7 @@ void AllocReset()
|
|||||||
** Don't use where AllocReset() could be used.
|
** Don't use where AllocReset() could be used.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void AllocFreePool()
|
DLLEXPORT void AllocFreePool()
|
||||||
{
|
{
|
||||||
alloc_hdr_t *tmp,
|
alloc_hdr_t *tmp,
|
||||||
*hdr = root->first;
|
*hdr = root->first;
|
||||||
|
|||||||
@@ -6,14 +6,31 @@
|
|||||||
** The type alloc_handle_t provides an opaque reference to the
|
** The type alloc_handle_t provides an opaque reference to the
|
||||||
** alloc pool - only the alloc routines know its structure.
|
** alloc pool - only the alloc routines know its structure.
|
||||||
*/
|
*/
|
||||||
|
#ifndef DLLEXPORT
|
||||||
|
#ifdef DLL
|
||||||
|
#ifdef __cplusplus
|
||||||
|
#define DLLEXPORT extern "C" __declspec(dllexport)
|
||||||
|
#else
|
||||||
|
#define DLLEXPORT __declspec(dllexport)
|
||||||
|
#endif
|
||||||
|
#elif defined(CYGWIN)
|
||||||
|
#define DLLEXPORT __stdcall
|
||||||
|
#else
|
||||||
|
#ifdef __cplusplus
|
||||||
|
#define DLLEXPORT
|
||||||
|
#else
|
||||||
|
#define DLLEXPORT
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
long dummy;
|
long dummy;
|
||||||
} alloc_handle_t;
|
} alloc_handle_t;
|
||||||
|
|
||||||
alloc_handle_t *AllocInit(void);
|
DLLEXPORT alloc_handle_t *AllocInit(void);
|
||||||
char *Alloc(long);
|
DLLEXPORT char *Alloc(long);
|
||||||
alloc_handle_t *AllocSetPool(alloc_handle_t *);
|
DLLEXPORT alloc_handle_t *AllocSetPool(alloc_handle_t *);
|
||||||
void AllocReset(void);
|
DLLEXPORT void AllocReset(void);
|
||||||
void AllocFreePool(void);
|
DLLEXPORT void AllocFreePool(void);
|
||||||
|
|||||||
Reference in New Issue
Block a user