1
1
openmpi/win_examples/windows_make/component.c
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

30 строки
637 B
C

#include <stdio.h>
#include "component.h"
static struct module *component_query(int i);
static void module_query(int i);
/* This is the component struct, and is exported */
//__declspec(dllexport)
__declspec(dllexport) struct component component_instance = {
component_query
};
/* This is the module struct, and is static */
static struct module module_instance = {
module_query
};
static struct module *component_query(int i)
{
printf("this is the component query: I got value %d\n", i);
return &module_instance;
}
static void module_query(int i)
{
printf("this is the module query: I got value %d\n", i);
}