summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.vms37
-rw-r--r--descrip.mms14
-rw-r--r--examples/descrip.mms41
-rw-r--r--librabbitmq/descrip.mms15
-rw-r--r--vms/config.h6
-rw-r--r--vms/include.mms125
-rw-r--r--vms/stdint.h2
7 files changed, 240 insertions, 0 deletions
diff --git a/README.vms b/README.vms
new file mode 100644
index 0000000..3d88a01
--- /dev/null
+++ b/README.vms
@@ -0,0 +1,37 @@
+# rabbitmq-c on OpenVMS
+
+This rabbitmq-c has been tested and appears to work on OpenVMS v8.3 on the
+Alpha platform, with HP TCP/IP services v5.5
+running. There is no reason to believe it won't work on OpenVMS v8.3 on
+IA-64 (Itanium, a.k.a., Integrety) with an equivalent version of TCP/IP.
+Or an older version of either of these pieces of software.
+
+NOTE: the maintainers of rabbitmq-c do not have access to an OpenVMS box to
+regularly build and test rabbitmq-c, so this code may not build out of the box
+and if it does it may not work correctly. However, the build system should
+serve as a good starting point for getting something that does work.
+
+# Pre-reqs for building:
+- HP C compiler
+
+# Instructions for building
+1. Extract this package somewhere where you have space.
+2. Run mms or mmk to run the build
+3. The result of the build are a library and header files:
+ [.librabbitmq]rabbitmq.OLB for the library
+ [.librabbitmq]amqp.h and [.librabbitmq]amqp_framing.h for the header files.
+To build against the library put these in a place where your compiler/linker can find them
+
+# Other notes about the build:
+- The library is built using IEEE float with denormals enabled. This can be
+ adjusted by editing the OPTFLAGS line in [.vms]include.mms
+
+ NOTE: the library takes no special care to translate vax-floats into IEEE-floats
+ so if you plan on compiling the library with vax-floats enabled you'll need
+ to make some changes
+
+- The library is built using /NAMES=(UPPER,TRUNC). Adjust OPTFLAGS line in [.vms]include.mms
+ as necessary to get the desired naming scheme.
+
+- The library is built using /POINTER=SHORT. Adjust OPTFLAGS line in [.vms]include.mms as
+ necessary to get the desired pointer size
diff --git a/descrip.mms b/descrip.mms
new file mode 100644
index 0000000..e60ab69
--- /dev/null
+++ b/descrip.mms
@@ -0,0 +1,14 @@
+
+ALL : LIBRABBITMQ
+ @ CONTINUE
+
+LIBRABBITMQ :
+ SET DEFAULT [.LIBRABBITMQ]
+ MMK$(MMSQUALIFIERS)
+ SET DEFAULT [-]
+
+EXAMPLES : LIBRABBITMQ
+ SET DEFAULT [.EXAMPLES]
+ MMK$(MMSQUALIFIERS)
+ SET DEFAULT [-]
+
diff --git a/examples/descrip.mms b/examples/descrip.mms
new file mode 100644
index 0000000..2b58995
--- /dev/null
+++ b/examples/descrip.mms
@@ -0,0 +1,41 @@
+
+OBJS = AMQP_BIND.OBJ, AMQP_CONSUMER.OBJ, AMQP_EXCHANGE_DECLARE.OBJ, AMQP_LISTEN.OBJ,-
+ AMQP_LISTENQ.OBJ, AMQP_PRODUCER.OBJ, AMQP_SENDSTRING.OBJ, AMQP_UNBIND.OBJ, UTILS.OBJ,-
+ PLATFORM_UTILS.OBJ
+
+COM_OBJS = UTILS.OBJ, PLATFORM_UTILS.OBJ
+
+REAL_TARGETS = AMQP_BIND.EXE AMQP_CONSUMER.EXE AMQP_EXCHANGE_DECLARE.EXE AMQP_LISTEN.EXE AMQP_LISTENQ.EXE AMQP_PRODUCER.EXE AMQP_SENDSTRING.EXE AMQP_UNBIND.EXE
+
+.INCLUDE [-.vms]INCLUDE.MMS
+
+CFLAGS = $(OPTFLAGS)/DEFINE=($(DEFS))/INCLUDE=($(INC),"../vms","../librabbitmq")
+LDFLAGS = /TRACE
+
+AMQP_BIND.EXE : AMQP_BIND.OBJ, $(COM_OBJS)
+ LINK$(LDFLAGS)/EXE=$(MMS$TARGET) $(MMS$SOURCE_LIST),[-.librabbitmq]rabbitmq.olb/lib
+
+AMQP_CONSUMER.EXE : AMQP_CONSUMER.OBJ, $(COM_OBJS)
+ LINK$(LDFLAGS)/EXE=$(MMS$TARGET) $(MMS$SOURCE_LIST),[-.librabbitmq]rabbitmq.olb/lib
+
+AMQP_EXCHANGE_DECLARE.EXE : AMQP_EXCHANGE_DECLARE.OBJ, $(COM_OBJS)
+ LINK$(LDFLAGS)/EXE=$(MMS$TARGET) $(MMS$SOURCE_LIST),[-.librabbitmq]rabbitmq.olb/lib
+
+AMQP_LISTEN.EXE : AMQP_LISTEN.OBJ, $(COM_OBJS)
+ LINK$(LDFLAGS)/EXE=$(MMS$TARGET) $(MMS$SOURCE_LIST),[-.librabbitmq]rabbitmq.olb/lib
+
+AMQP_LISTENQ.EXE : AMQP_LISTENQ.OBJ, $(COM_OBJS)
+ LINK$(LDFLAGS)/EXE=$(MMS$TARGET) $(MMS$SOURCE_LIST),[-.librabbitmq]rabbitmq.olb/lib
+
+AMQP_PRODUCER.EXE : AMQP_PRODUCER.OBJ, $(COM_OBJS)
+ LINK$(LDFLAGS)/EXE=$(MMS$TARGET) $(MMS$SOURCE_LIST),[-.librabbitmq]rabbitmq.olb/lib
+
+AMQP_SENDSTRING.EXE : AMQP_SENDSTRING.OBJ, $(COM_OBJS)
+ LINK$(LDFLAGS)/EXE=$(MMS$TARGET) $(MMS$SOURCE_LIST),[-.librabbitmq]rabbitmq.olb/lib
+
+AMQP_UNBIND.EXE : AMQP_UNBIND.OBJ, $(COM_OBJS)
+ LINK$(LDFLAGS)/EXE=$(MMS$TARGET) $(MMS$SOURCE_LIST),[-.librabbitmq]rabbitmq.olb/lib
+
+
+PLATFORM_UTILS.OBJ : [.UNIX]PLATFORM_UTILS.C
+PLATFORM_UTILS.MMSD : [.UNIX]PLATFORM_UTILS.C
diff --git a/librabbitmq/descrip.mms b/librabbitmq/descrip.mms
new file mode 100644
index 0000000..3d0e2d1
--- /dev/null
+++ b/librabbitmq/descrip.mms
@@ -0,0 +1,15 @@
+OBJS = AMQP_FRAMING.OBJ, AMQP_API.OBJ, AMQP_CONNECTION.OBJ, AMQP_MEM.OBJ, AMQP_SOCKET.OBJ, AMQP_TABLE.OBJ, AMQP_URL.OBJ, AMQP_TCP_SOCKET.OBJ, AMQP_TIMER.OBJ
+
+REAL_TARGETS = RABBITMQ.OLB
+
+.INCLUDE [-.vms]INCLUDE.MMS
+
+CFLAGS = $(OPTFLAGS)/DEFINE=($(DEFS))/INCLUDE=($(INC),"./","../vms","./unix")/WARN=(DIS=PTRMISMATCH1)
+LDFLAGS = /TRACE
+
+RABBITMQ.OLB : $(OBJS)
+ IF F$SEARCH("$(MMS$TARGET)") .EQS. "" THEN LIBRARY/CREATE $(MMS$TARGET)
+ LIBRARY/REPLACE $(MMS$TARGET) $(MMS$SOURCE_LIST)
+
+SOCKET.OBJ : [.UNIX]SOCKET.C
+SOCKET.MMSD : [.UNIX]SOCKET.C
diff --git a/vms/config.h b/vms/config.h
new file mode 100644
index 0000000..d2866f0
--- /dev/null
+++ b/vms/config.h
@@ -0,0 +1,6 @@
+#ifndef LIBRABBITMQ_CONFIG_H
+#define LIBRABBITMQ_CONFIG_H
+
+#define VERSION "v0.1"
+
+#endif
diff --git a/vms/include.mms b/vms/include.mms
new file mode 100644
index 0000000..a590894
--- /dev/null
+++ b/vms/include.mms
@@ -0,0 +1,125 @@
+
+.SUFFIXES ;
+
+.SUFFIXES .EXE $(OLB) .OBJ .MMSD .cpp .cc .C .FOR .Y .L
+
+.L.C
+ flex -l $(MMS$SOURCE) -o $(MMS$TARGET)
+
+.Y.C
+ yacc $(MMS$SOURCE) -o $(MMS$TARGET)
+
+.C.OBJ
+ CC$(CFLAGS)/MMS=(FILE=$(MMS$TARGET_NAME).MMSD)/OBJ=$(MMS$TARGET_NAME).OBJ $(MMS$SOURCE)
+
+.C.MMSD
+ CC$(CFLAGS)/MMS=(FILE=$(MMS$TARGET_NAME).MMSD)/OBJ=$(MMS$TARGET_NAME).OBJ $(MMS$SOURCE)
+
+.CPP.OBJ
+ CXX$(CXXFLAGS)/MMS=(FILE=$(MMS$TARGET_NAME).MMSD)/OBJ=$(MMS$TARGET) $(MMS$SOURCE)
+
+.CPP.MMSD
+ CXX$(CXXFLAGS)/MMS=(FILE=$(MMS$TARGET))/OBJ=$(MMS$TARGET_NAME).OBJ $(MMS$SOURCE)
+
+.CC.OBJ
+ CXX$(CXXFLAGS)/MMS=(FILE=$(MMS$TARGET_NAME).MMSD)/OBJ=$(MMS$TARGET) $(MMS$SOURCE)
+
+.CC.MMSD
+ CXX$(CXXFLAGS)/MMS=(FILE=$(MMS$TARGET))/OBJ=$(MMS$TARGET_NAME).OBJ $(MMS$SOURCE)
+
+.OBJ$(OLB)
+ @ IF F$SEARCH("$(MMS$TARGET)") .EQS. "" THEN LIBRARY/CREATE $(MMS$TARGET)
+ LIBRARY/REPLACE $(MMS$TARGET) $(MMS$SOURCE_LIST)
+
+.FOR.OBJ
+ FOR$(FORFLAGS)/OBJ=$(MMS$TARGET) $(MMS$SOURCE)
+
+.FIRST
+ @ continue
+
+.IFDEF USE_DEPEND
+.ELSE
+ @ WRITE SYS$OUTPUT "Entering ''F$ENVIRONMENT(""DEFAULT"")'"
+.ENDIF
+
+.IFDEF USE_DEPEND
+.ELSE
+.LAST
+ @ WRITE SYS$OUTPUT "Leaving ''F$ENVIRONMENT(""DEFAULT"")'"
+.ENDIF
+
+ECHO = WRITE SYS$OUTPUT
+
+DEPS = $(OBJS:.OBJ=.MMSD)
+
+OPTFLAGS = /PREFIX=ALL/FLOAT=IEEE/IEEE=DENORM/NAMES=(UPPER,TRUNC)/POINTER=SHORT
+DEFS = __USE_STD_IOSTREAM=1,VMS
+CDEFS = VMS
+INC = .
+
+DEFAULT_TARGET : $(DEPS) MMS$DEPEND.MMSD INCLUDE_DEPS
+ @ CONTINUE
+
+MMS$DEPEND.MMSD : $(DEPS) MMS$GEN_DEPEND.COM
+ @MMS$GEN_DEPEND.COM
+
+MMS$GEN_DEPEND.COM :
+ @ WRITE SYS$OUTPUT "Regenerating GEN_DEPEND.COM"
+ @ OPEN/WRITE F MMS$GEN_DEPEND.COM
+ @ WRITE F "$ OPEN/WRITE FH MMS$DEPEND.MMSD"
+ @ WRITE F "$ WRITE FH ""# File generated by GEN_DEPEND.COM - DO NOT EDIT"""
+ @ WRITE F "$ WRITE FH ""# Changes will be overwritten next time product is built"""
+ @ WRITE F "$ WRITE FH "".IFDEF USE_DEPEND"""
+ @ WRITE F "$ LOOP:"
+ @ WRITE F "$ FIL = F$SEARCH(""*.MMSD"")"
+ @ WRITE F "$ IF FIL .NES. """""
+ @ WRITE F "$ THEN"
+ @ WRITE F "$ NAM = F$PARSE(FIL,,,""NAME"")"
+ @ WRITE F "$ IF NAM .EQS. ""MMS$DEPEND"" THEN GOTO LOOP"
+ @ WRITE F "$ TYP = F$PARSE(FIL,,,""TYPE"")"
+ @ WRITE F "$ FUL = NAM + TYP"
+ @ WRITE F "$ WRITE FH "".INCLUDE "" + FUL"
+ @ WRITE F "$ GOTO LOOP"
+ @ WRITE F "$ ENDIF"
+ @ WRITE F "$ WRITE FH "".ELSE"""
+ @ WRITE F "$ WRITE FH ""DUMMY :"""
+ @ WRITE F "$ WRITE FH "" @ WRITE SYS$OUTPUT """"MMS$DEPEND.MMS must .INCLUDED by appropriate DESCRIP.MMS and not called directly"""""""
+ @ WRITE F "$ WRITE FH "".ENDIF"""
+ @ WRITE F "$ CLOSE FH"
+ @ CLOSE F
+
+INCLUDE_DEPS :
+ MMK/EXTEND/MACRO=("USE_DEPEND=1") REAL_TARGET
+
+REAL_TARGET : $(REAL_TARGETS)
+ @ CONTINUE
+
+CLEAN :
+ IF F$SEARCH("*.MMSD*") .NES. "" THEN DEL/NOLOG *.MMSD*;*
+ IF F$SEARCH("MMS$GEN_DEPEND.COM*") .NES. "" THEN DEL/NOLOG MMS$GEN_DEPEND.COM*;*
+ IF F$SEARCH("MMS$LINK.OPT*") .NES. "" THEN DEL/NOLOG MMS$LINK.OPT*;*
+ IF F$SEARCH("MMS$SYMBOLS.OPT*") .NES. "" THEN DEL/NOLOG MMS$SYMBOLS.OPT*;*
+ IF F$SEARCH("*.OBJ*") .NES. "" THEN DEL/NOLOG *.OBJ*;*
+ IF F$SEARCH("[.CXX_REPOSITORY*]*.*") .NES. "" THEN DEL/NOLOG [.CXX_REPOSITORY*]*.*;*
+ IF F$SEARCH("CXX_REPOSITORY*.DIR") .NES. "" THEN -
+ PIPE (SET SEC/PROT=O:D CXX_REPOSITORY*.DIR; && DEL CXX_REPOSITORY*.DIR;)
+ IF F$SEARCH("*.OLB") .NES. "" THEN DEL/NOLOG *.OLB;*
+ IF F$SEARCH("*.EXE") .NES. "" THEN DEL/NOLOG *.EXE;*
+ IF F$SEARCH("*.OUT") .NES. "" THEN DEL/NOLOG *.OUT;*
+ IF F$SEARCH("*.TMP") .NES. "" THEN DEL/NOLOG *.TMP;*
+ IF F$SEARCH("TAGS.") .NES. "" THEN DEL/NOLOG TAGS.;*
+.IFDEF EXTRA_FILES
+ - DEL/NOLOG $(EXTRA_FILES)
+.ENDIF
+
+PURGE :
+ - PURGE *.OLB,*.MMSD,*.OBJ,*.EXE,[.CXX_REPOSITORY]*.*
+
+TAGS. :
+ @ IF "''CTAGS'" .NES. "" THEN CTAGS --language-force=c++ --c++-kinds=+p --fields=+iaS --extra=+q *.h *.cxx *.cpp
+
+.IFDEF USE_DEPEND
+.INCLUDE MMS$DEPEND.MMSD
+.ELSE
+.ENDIF
+
diff --git a/vms/stdint.h b/vms/stdint.h
new file mode 100644
index 0000000..7505091
--- /dev/null
+++ b/vms/stdint.h
@@ -0,0 +1,2 @@
+/* Simply forward this header to what VMS has */
+#include <inttypes.h>