1
1
openmpi/win_examples/export/hello.h
Prabhanjan Kambadur 4257467fec this is the big windows commit. there are more things which have gone into this than i can remember. but basically, we are looking for
1. header file and source file protections using #ifdef WIN32
2. new files and directories to support windows functionality
3. appropritate linkage symbols added (OMPI_DECLSPEC) for windows
4. some functions are unimplemented on the windows side. this is mostly
because there might not be need to implement it in windows land. eg., forking
a daemon off
5. Introduced locking mechanisms for windows

This commit was SVN r3286.
2004-10-22 16:06:05 +00:00

36 строки
625 B
C

#ifndef HELLO_H
#define HELLO_H
#if !(defined(__cplusplus) || defined(c_plusplus))
typedef enum {false, true} bool;
#endif
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
typedef int (*one_fn)(void);
typedef int (*two_fn)(void);
struct hello_t {
one_fn i;
two_fn j;
};
typedef struct hello_t hello_t;
#ifdef EXPORTING
__declspec(dllexport) extern hello_t anju;
__declspec(dllexport) extern bool aaa;
#else
__declspec(dllimport) extern hello_t anju;
__declspec(dllimport) extern bool aaa;
#endif
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif
#endif /*HELLO_H*/