Make headers clean

This commit is contained in:
Kolan Sh 2012-05-26 12:29:12 +04:00
parent fa4102004c
commit 7d0a7abd3e
2 changed files with 7 additions and 14 deletions

View File

@ -1,9 +1,12 @@
#if defined (__BORLANDC__) #if defined (__BORLANDC__)
#define __DLL_MEAN__ #define DLL_SPEC __declspec(dllexport)
#else
#define DLL_SPEC
#endif #endif
#include "mean.h" #include "mean.h"
double DLL_SPEC mean(double a, double b) { double DLL_SPEC
mean(double a, double b) {
return (a+b) / 2; return (a+b) / 2;
} }

View File

@ -1,20 +1,10 @@
#if defined (__BORLANDC__)
#if defined(__DLL_MEAN__)
#define DLL_SPEC __declspec(dllexport)
#else
#define DLL_SPEC __declspec(dllimport)
#endif
#else
#define DLL_SPEC
#endif
#if defined __cplusplus #if defined __cplusplus
extern "C" extern "C"
{ {
#endif #endif
double DLL_SPEC mean(double, double); double
mean(double, double);
#if defined __cplusplus #if defined __cplusplus
} }