/*============================================================================= * drt/sys/klib1.h * Definitions for Win32 dynamic shared library (DLL) gibberish. * * Usage * This file should be #included by each header file. * It follows all other #includes and forward declarations but precedes * any class declarations. * The end of each header file should #include the companion header file * "klib2.h". * * Example * /*======================================================== * * foo.h * *-------------------------------------------------------*\ * * /* Special includes *\ * #include "kdefs.h" * * /* System includes *\ * #include * * /* Local includes *\ * #include "local.h" * * /* Forward declarations *\ * struct Bar; /*#include "bar.h" *\ * * /* Local wrappers *\ * #include "klib1.h" <- This header goes here * * ...remaining contents of "foo.h"... * * struct Foo { ... }; * * extern int DRTCALL func(); * * ...no more declarations beyond this point... * * #include "klib2.h" <- Companion header goes here * * /* End foo.h *\ * * History * 0.01, 1998-03-28, David R Tribble. * First cut. * * 0.02, 1998-04-24, David R Tribble. * Renamed from "scmlib1.h" to "jlib1.h". * * 0.03, 1998-05-30, David R Tribble. * Changed filename prefix from "j" to "k". * * 0.04, 1999-02-21, David R Tribble. * Moved from scm/ to drt/sys/. * * 0.05, 1999-03-19, David R Tribble. * Converted from C++ to C. * * 1.00, 1999-07-31, David R Tribble. * Renamed 'DRTDECL' to 'DRTEXPORT' and 'DRTCALL' to 'DRTFUNC'. * * Copyright ©1998-1999, by David R. Tribble, all rights reserved. * See "drt/sys/copyr.txt" for more information. *----------------------------------------------------------------------------*/ /* Note: This file needs no wrapper macro */ #define drt_sys_klib1_h 100 /* Verify include order */ #ifdef __cplusplus #error Use "sys/sdefs.hpp" instead of "klib1.h" for C++ #endif #ifndef drt_sys_kdefs_h #error Include "sys/kdefs.h" before this header #endif /* Win32 DLL gibberish */ #undef DRTFUNC #undef DRTEXPORT #if DRT_OS_WIN32 and defined(_DLL) #define DRTFUNC __cdecl #ifdef vdiff_lib #define DRTEXPORT __declspec(dllexport) #else #define DRTEXPORT __declspec(dllimport) #endif #else #define DRTFUNC #define DRTEXPORT #endif /* End klib1.h */