Various updates for building on Windows/Cygwin/MinGW

This commit is contained in:
Andrew Johnson
2012-07-18 15:35:32 -05:00
parent 4fb697d085
commit e02aaf5ef9
9 changed files with 20 additions and 14 deletions

View File

@@ -203,8 +203,7 @@ DLL_DEF_FLAG = $(addprefix -def:,$(wildcard ../$(addsuffix .def,$*)))
# x.exp: what you need to build the dll (in no variable)
#
LINK.shrlib = $(WINLINK) -nologo $(WIN32_DLLFLAGS) -implib:$*.lib -out:$*.dll \
$(DLL_DEF_FLAG)
LINK.shrlib += $(LIBRARY_LD_OBJS) $(LIBRARY_LD_RESS) $(SHRLIB_LDLIBS)
$(DLL_DEF_FLAG) $(LIBRARY_LD_OBJS) $(LIBRARY_LD_RESS) $(SHRLIB_LDLIBS)
MUNCH_CMD = $(CCC) -Fo $@ $^

View File

@@ -8,3 +8,7 @@
# If readline is installed uncomment the following line
# to add command-line editing and history support
COMMANDLINE_LIBRARY = READLINE
# On later versions of Cygwin you may need to uncomment this:
#LDLIBS_READLINE = -lreadline

View File

@@ -32,7 +32,7 @@
#define MAX_ELEMS 10
int gft(char *pname)
int gft(const char *pname)
{
char tgf_buffer[MAX_ELEMS*MAX_STRING_SIZE + sizeof(struct dbr_ctrl_double)];
struct dbChannel *chan;
@@ -82,7 +82,7 @@ int gft(char *pname)
* TPF
* Test put field
*/
int pft(char *pname, char *pvalue)
int pft(const char *pname, const char *pvalue)
{
struct dbChannel *chan;
struct dbCommon *precord;
@@ -217,7 +217,7 @@ static void tpnThread(void *pvt)
free(ptpnInfo);
}
int tpn(char *pname, char *pvalue)
int tpn(const char *pname, const char *pvalue)
{
struct dbChannel *chan;
tpnInfo *ptpnInfo;

View File

@@ -16,9 +16,9 @@
extern "C" {
#endif
epicsShareFunc int gft(char *pname);
epicsShareFunc int pft(char *pname,char *pvalue);
epicsShareFunc int tpn(char *pname,char *pvalue);
epicsShareFunc int gft(const char *pname);
epicsShareFunc int pft(const char *pname, const char *pvalue);
epicsShareFunc int tpn(const char *pname, const char *pvalue);
#ifdef __cplusplus
}
#endif

View File

@@ -10,4 +10,4 @@
# This is a Makefile fragment, see src/libCom/Makefile.
# Ensure that the lexer is built before it is needed
parse.c: $(YACC)
parse.c: $(TOOLS)/antelope$(HOSTEXE)

View File

@@ -38,6 +38,7 @@
* It appears that the only entry point used here that causes
* portability problems with W95\W98\WME is TryEnterCriticalSection.
*/
#undef _WIN32_WINNT
#define _WIN32_WINNT 0x0400
#include <windows.h>

View File

@@ -21,8 +21,8 @@
enum epicsSocketSystemCallInterruptMechanismQueryInfo
epicsSocketSystemCallInterruptMechanismQuery ()
{
#if (CYGWIN_VERSION_DLL_MAJOR >= 1007)
// Behaviour changed in Cygwin 1.7 release.
#if (CYGWIN_VERSION_DLL_MAJOR >= 1007) && (CYGWIN_VERSION_DLL_MINOR < 15)
// Behaviour changed in early Cygwin 1.7 releases, reverted later.
return esscimqi_socketCloseRequired;
#else
return esscimqi_socketBothShutdownRequired;

View File

@@ -9,6 +9,7 @@
#include <stdlib.h>
#define epicsExportSharedSymbols
#include "devLibVME.h"
/* This file must contain no definitions other than the following: */

View File

@@ -43,9 +43,10 @@
#include "arrRecord.h"
extern "C" int arrTest_registerRecordDeviceDriver(struct dbBase *pdbbase);
epicsShareExtern void (*pvar_func_arrInitialize)(void);
extern "C" {
int arrTest_registerRecordDeviceDriver(struct dbBase *pdbbase);
epicsShareExtern void (*pvar_func_arrInitialize)(void);
}
#define CA_SERVER_PORT "65535"