Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
ibmmqmet committed Dec 10, 2014
1 parent 4f59913 commit 4cf0fa4
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 27 deletions.
26 changes: 26 additions & 0 deletions src/README.txt
@@ -0,0 +1,26 @@
Building the programs

Included in this package is a Makefile for Linux x64.
You can use that Makefile as a template for other platforms,
with appropriate #define values. Often the platform compiler
will define some of the values that can be seen as #ifdef
elements in this source tree, but some MQ-related definitions
may also be needed.

Used #defines in the code which differentiate platforms include

AMQ_AS400
AMQ_UNIX (for all Unix and Linux platforms)
MVS
WIN32, WIN64, WINDOWS, _WINDOWS
HP_NSK

Within the Unix/Linux family, there are also
subdivisions for the #defines. You will see
_AIX
_HPUX_SOURCE
_LINUX_2
_SOLARIS_2



2 changes: 1 addition & 1 deletion src/q.c
Expand Up @@ -1631,7 +1631,7 @@ int main(int argc,
MQCHAR12 Userid;
BOOL bFileInput = FALSE; /* Used to remove > prompt */

sprintf(Parms,"WebSphere MQ Q Program [Build:%s] \n",
sprintf(Parms,"IBM MQ Q Program [Build:%s] \n",
__DATE__);
UsageLine(Parms);

Expand Down
2 changes: 1 addition & 1 deletion src/qlaccess.c
Expand Up @@ -210,7 +210,7 @@ static char * GetDefaultPath(void)

/* printf("Bit64 is %d\n",Bit64); */

#if defined(_LINUX_2) || defined(AMQ_DARWIN)
#if defined(_LINUX_2)
return Bit64 ? "/opt/mqm/lib64" : "/opt/mqm/lib";
#elif defined(_SOLARIS_2)
return Bit64 ? "/opt/mqm/lib64" : "/opt/mqm/lib";
Expand Down
9 changes: 0 additions & 9 deletions src/qlaccess.h
Expand Up @@ -83,15 +83,6 @@
#endif
#endif

#if defined (AMQ_DARWIN)
#ifdef _REENTRANT
#define SERVER_LIB "libmqm_r.dylib"
#define CLIENT_LIB "libmqic_r.dylib"
#else
#define SERVER_LIB "libmqm.dylib"
#define CLIENT_LIB "libmqic.dylib"
#endif
#endif

#endif
/* Datatypes */
Expand Down
4 changes: 1 addition & 3 deletions src/qlcs.c
Expand Up @@ -521,9 +521,7 @@ void CSSetEvent(CSEVENT * event)
MOD_EXIT:
pthread_mutex_unlock(&event->mutex);
}
#if defined(_LINUX_2) || defined(_SOLARIS_2) || defined(_HPUX_SOURCE) \
|| defined(AMQ_DARWIN)

#if defined(_LINUX_2) || defined(_SOLARIS_2) || defined(_HPUX_SOURCE)
#ifndef TIMEVAL_TO_TIMESPEC
#define TIMEVAL_TO_TIMESPEC(tv, ts) { \
(ts)->tv_sec = (tv)->tv_sec; \
Expand Down
18 changes: 8 additions & 10 deletions src/qload.c
Expand Up @@ -92,9 +92,7 @@ static CSPARTS MessageSizeParts[] =
/**********************************************************************/
void Title(void)
{
char * pYear = __DATE__;
fprintf(stdout,"5724-H72 (C) Copyright IBM Corp. 1994, %4.4s.\n"
"WebSphere MQ Queue Load/Unload Utility\n",pYear+7);
fprintf(stdout,"IBM MQ Queue Load/Unload Utility [Build:%s]\n",__DATE__);
}

/**********************************************************************/
Expand All @@ -105,7 +103,7 @@ void Usage(void)
{

Title();
fprintf(stdout,"\nUsage: dmpmqmsg <Optional flags as below>\n");
fprintf(stdout,"\nUsage: qload <Optional flags as below>\n");
fprintf(stdout," [-a <File access mode for fopen()>\n");
fprintf(stdout," a Append\n");
fprintf(stdout," b Binary\n");
Expand Down Expand Up @@ -177,12 +175,12 @@ void Usage(void)
fprintf(stdout,"\n");
fprintf(stdout,"Examples \n");
fprintf(stdout,"-------- \n");
fprintf(stdout,"Unload a queue to a file : dmpmqmsg -iQ1 -fmyfile\n");
fprintf(stdout,"Load a queue from a file : dmpmqmsg -oQ1 -fmyfile\n");
fprintf(stdout,"Copy a queue from Q1 to Q2 : dmpmqmsg -iQ1 -oQ2\n");
fprintf(stdout,"Move a queue from Q1 to Q2 : dmpmqmsg -IQ1 -oQ2\n");
fprintf(stdout,"Move old messages from Q1 to Q2 : dmpmqmsg -IQ1 -oQ2 -T1440\n");
fprintf(stdout,"Provide Summary of messages : dmpmqmsg -iQ1 -ds\n");
fprintf(stdout,"Unload a queue to a file : qload -iQ1 -fmyfile\n");
fprintf(stdout,"Load a queue from a file : qload -oQ1 -fmyfile\n");
fprintf(stdout,"Copy a queue from Q1 to Q2 : qload -iQ1 -oQ2\n");
fprintf(stdout,"Move a queue from Q1 to Q2 : qload -IQ1 -oQ2\n");
fprintf(stdout,"Move old messages from Q1 to Q2 : qload -IQ1 -oQ2 -T1440\n");
fprintf(stdout,"Provide Summary of messages : qload -iQ1 -ds\n");
}

/**********************************************************************/
Expand Down
4 changes: 2 additions & 2 deletions src/qloadfnc.c
Expand Up @@ -2255,7 +2255,7 @@ static MQLONG WriteFileHeader(QLOPT * pOpt)
strcpy(Nowc,pTime);
}
/* Ok, write header */
n = fprintf(pOpt->hOutFile,"* DMPMQMSG Version:%s Created:%s",
n = fprintf(pOpt->hOutFile,"* QLOAD Version:%s Created:%s",
QLOAD_VERSION,Nowc);
if (n<=0)
{
Expand Down Expand Up @@ -2380,7 +2380,7 @@ MQLONG QloadFnc(QLOPT * pOpt,BOOL Prompt)
if (memcmp(pOpt->pLine,"* QLOAD",7) != 0 && memcmp(pOpt->pLine,"* DMPMQMSG",10) != 0)
{
Reason = MQRC_FILE_SYSTEM_ERROR;
sprintf(pOpt->ErrorMessage,"File '%s' does not appear to be a dmpmqmsg file",
sprintf(pOpt->ErrorMessage,"File '%s' does not appear to be a qload file",
pOpt->InputFileName);
goto MOD_EXIT;
}
Expand Down
2 changes: 1 addition & 1 deletion src/qlutil.c
Expand Up @@ -23,7 +23,7 @@
#include "qlutil.h"
#include "qlcs.h"

#if defined(AMQ_AS400) || defined(AMQ_DARWIN)
#if defined(AMQ_AS400)
#include "stdlib.h"
#endif

Expand Down

0 comments on commit 4cf0fa4

Please sign in to comment.