Merged epicsStdioRedirect.h into epicsStdio.h

This commit is contained in:
Andrew Johnson
2012-05-03 12:19:34 -05:00
parent 729f04ecce
commit 5b228618e1
34 changed files with 99 additions and 63 deletions

View File

@@ -15,6 +15,15 @@ EPICS Base 3.15.0.x releases are not intended for use in production systems.</p>
<h2 align="center">Changes between 3.14.x and 3.15.0.x</h2>
<!-- Insert new items immediately below here ... -->
<h4>epicsStdioRedirect.h merged into epicsStdio.h</h4>
<p>The definitions from the header file epicsStdioRedirect.h have been moved
into epicsStdio.h so all calls to printf(), puts() and putchar() in files that
include that OSI header will now be subject to stdout redirection. In past
releases (3.14.7 and later) it was necessary to request the redirection support
by including the epicsStdioRedirect.h header file. The header file is still
provided, but now it just includes epicsStdio.h.</p>
<h4>Named Soft Events</h4>
<p>Soft events can now be given meaningful names instead of just using the

View File

@@ -29,7 +29,7 @@
#include "caerr.h"
#include "caeventmask.h"
#include "alarm.h"
#include "epicsStdioRedirect.h"
#include "epicsStdio.h"
#include "asLib.h"
#include "epicsExport.h"

View File

@@ -18,7 +18,7 @@
#include "errlog.h"
#include "cantProceed.h"
#include "epicsThread.h"
#include "epicsStdioRedirect.h"
#include "epicsStdio.h"
#include "dbDefs.h"
#include "taskwd.h"
#include "asLib.h"

View File

@@ -24,7 +24,7 @@
#include "dbStaticLib.h"
#include "link.h"
#undef epicsExportSharedSymbols
#include "epicsStdioRedirect.h"
#include "epicsStdio.h"
/*definitions needed because of old vs new database access*/
#undef DBR_SHORT
#undef DBR_PUT_ACKT

View File

@@ -47,7 +47,7 @@ since this will delay all other threads.
#include <stdio.h>
#include <string.h>
#include "epicsStdioRedirect.h"
#include "epicsStdio.h"
#include "dbDefs.h"
#include "epicsPrint.h"
#include "errMdef.h"

View File

@@ -21,7 +21,7 @@
#include <limits.h>
#include <math.h>
#include "epicsStdioRedirect.h"
#include "epicsStdio.h"
#include "dbDefs.h"
#include "ellLib.h"
#include "taskwd.h"

View File

@@ -21,7 +21,6 @@
#include "errlog.h"
#include "ellLib.h"
#include "epicsMutex.h"
#include "epicsStdioRedirect.h"
#include "ellLib.h"
#include "epicsString.h"
#define epicsExportSharedSymbols

View File

@@ -21,7 +21,7 @@
#include "dbDefs.h"
#include "errlog.h"
#include "cadef.h"
#include "epicsStdioRedirect.h"
#include "epicsStdio.h"
#define epicsExportSharedSymbols
#include "db_access_routines.h"
#include "dbNotify.h"

View File

@@ -30,7 +30,7 @@
#include "osiFileName.h"
#include "epicsStdlib.h"
#include "epicsString.h"
#include "epicsStdioRedirect.h"
#include "epicsStdio.h"
#define epicsExportSharedSymbols
#include "link.h"

View File

@@ -13,7 +13,7 @@
#include <stdlib.h>
#include <stdio.h>
#include "epicsVersion.h"
#include "epicsStdioRedirect.h"
#include "epicsStdio.h"
#define epicsExportSharedSymbols
#include "epicsRelease.h"

View File

@@ -36,7 +36,7 @@
#include "dbAddr.h"
#include "dbEvent.h"
#include "dbCommon.h"
#include "epicsStdioRedirect.h"
#include "epicsStdio.h"
#define epicsExportSharedSymbols
#include "rsrv.h"

View File

@@ -17,7 +17,7 @@
#include <ctype.h>
#define epicsExportSharedSymbols
#include "epicsStdioRedirect.h"
#include "epicsStdio.h"
#include "dbDefs.h"
#include "epicsThread.h"
#include "cantProceed.h"

View File

@@ -23,7 +23,7 @@
#define epicsExportSharedSymbols
#include "ellLib.h"
#include "freeList.h"
#include "epicsStdioRedirect.h"
#include "epicsStdio.h"
#include "cantProceed.h"
#include "epicsMutex.h"
#include "ellLib.h"

View File

@@ -42,7 +42,7 @@
#define epicsExportSharedSymbols
#include "epicsStdlib.h"
#include "epicsStdioRedirect.h"
#include "epicsStdio.h"
#include "errMdef.h"
#include "errlog.h"
#include "envDefs.h"

View File

@@ -52,7 +52,7 @@ static char rcsid[] =
*/
#define epicsExportSharedSymbols
#include "epicsStdio.h"
#include "epicsTempFile.h"
#undef epicsExportSharedSymbols
static char flex_version[] = "2.3";

View File

@@ -53,6 +53,7 @@ INC += epicsReadline.h
INC += epicsMessageQueue.h
INC += epicsStdio.h
INC += epicsStdioRedirect.h
INC += epicsTempFile.h
INC += epicsGetopt.h
INC += devLib.h

View File

@@ -15,7 +15,7 @@
#define epicsExportSharedSymbols
#include "epicsEvent.h"
#include "epicsStdioRedirect.h"
#include "epicsStdio.h"
#include "cantProceed.h"
// vxWorks 5.4 gcc fails during compile when I use std::exception

View File

@@ -19,7 +19,7 @@
#define epicsExportSharedSymbols
#include "epicsMessageQueue.h"
#include "epicsStdioRedirect.h"
#include "epicsStdio.h"
epicsMessageQueue::epicsMessageQueue(unsigned int aCapacity,
unsigned int aMaxMessageSize)

View File

@@ -26,7 +26,7 @@
#include <string.h>
#define epicsExportSharedSymbols
#include "epicsStdioRedirect.h"
#include "epicsStdio.h"
#include "epicsThread.h"
#include "ellLib.h"
#include "errlog.h"

View File

@@ -19,6 +19,7 @@
#include <errno.h>
#define epicsExportSharedSymbols
#define epicsStdioStdStreams
#include "shareLib.h"
#include "epicsThread.h"
#include "epicsStdio.h"

View File

@@ -17,18 +17,42 @@
#include "shareLib.h"
#include "compilerDependencies.h"
#include "epicsTempFile.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifndef epicsStdioStdStreams
# undef stdin
# define stdin epicsGetStdin()
# undef stdout
# define stdout epicsGetStdout()
# undef stderr
# define stderr epicsGetStderr()
#endif
/* Make printf, puts and putchar use *our* version of stdout */
#ifdef printf
# undef printf
#endif /* printf */
#define printf epicsStdoutPrintf
#ifdef puts
# undef puts
#endif /* puts */
#define puts epicsStdoutPuts
#ifdef putchar
# undef putchar
#endif /* putchar */
#define putchar epicsStdoutPutchar
epicsShareFunc int epicsShareAPI epicsSnprintf(
char *str, size_t size, const char *format, ...) EPICS_PRINTF_STYLE(3,4);
epicsShareFunc int epicsShareAPI epicsVsnprintf(
char *str, size_t size, const char *format, va_list ap);
epicsShareFunc void epicsShareAPI epicsTempName (
char * pNameBuf, size_t nameBufLength );
epicsShareFunc FILE * epicsShareAPI epicsTempFile (void);
/*
* truncate to specified size (we dont use truncate()

View File

@@ -9,41 +9,15 @@
/* epicsStdioRedirect.h */
/* This file is now obselete, and is likely to be
* deleted in a future release of EPICS Base.
*
* Use the epicsStdio.h header file instead.
*/
#ifndef epicsStdioRedirecth
#define epicsStdioRedirecth
#ifdef __cplusplus
extern "C" {
#endif
#include <epicsStdio.h>
#undef stdin
#define stdin epicsGetStdin()
#undef stdout
#define stdout epicsGetStdout()
#undef stderr
#define stderr epicsGetStderr()
/* Make printf, puts and putchar use *our* version of stdout */
#ifdef printf
# undef printf
#endif /* printf */
#define printf epicsStdoutPrintf
#ifdef puts
# undef puts
#endif /* puts */
#define puts epicsStdoutPuts
#ifdef putchar
# undef putchar
#endif /* putchar */
#define putchar epicsStdoutPutchar
#ifdef __cplusplus
}
#endif
#endif /* epicsStdioRedirecth */

View File

@@ -0,0 +1,30 @@
/*************************************************************************\
* Copyright (c) 2012 UChicago Argonne LLC, as Operator of Argonne
* National Laboratory.
* Copyright (c) 2002 The Regents of the University of California, as
* Operator of Los Alamos National Laboratory.
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
/* epicsTempFile.h */
#ifndef INC_epicsTempFile_H
#define INC_epicsTempFile_H
#include <stdio.h>
#include "shareLib.h"
#ifdef __cplusplus
extern "C" {
#endif
epicsShareFunc void epicsShareAPI epicsTempName(char *pbuf, size_t bufLen);
epicsShareFunc FILE * epicsShareAPI epicsTempFile(void);
#ifdef __cplusplus
}
#endif
#endif /* INC_epicsTempFile_H */

View File

@@ -27,7 +27,6 @@
#include <string> // vxWorks 6.0 requires this include
#define epicsExportSharedSymbols
#include "epicsStdioRedirect.h"
#include "locationException.h"
#include "epicsAssert.h"
#include "epicsVersion.h"

View File

@@ -29,7 +29,7 @@
# define environ (*_NSGetEnviron())
#define epicsExportSharedSymbols
#include <epicsStdioRedirect.h>
#include "epicsStdio.h"
#include <errlog.h>
#include <cantProceed.h>
#include <envDefs.h>

View File

@@ -23,7 +23,7 @@
#include <rtems.h>
#include <rtems/error.h>
#include "epicsStdioRedirect.h"
#include "epicsStdio.h"
#include "epicsMutex.h"
#include "epicsEvent.h"
#include "errlog.h"

View File

@@ -20,7 +20,7 @@
#include <sys/stat.h>
#define epicsExportSharedSymbols
#include "epicsStdio.h"
#include "epicsTempFile.h"
//
// epicsTempName

View File

@@ -45,7 +45,7 @@
#include "shareLib.h"
#include "epicsMutex.h"
#include "epicsAssert.h"
#include "epicsStdioRedirect.h"
#include "epicsStdio.h"
typedef struct epicsMutexOSD {
union {

View File

@@ -22,7 +22,7 @@
#include <errno.h>
#define epicsExportSharedSymbols
#include <epicsStdioRedirect.h>
#include "epicsStdio.h"
#include <errlog.h>
#include <cantProceed.h>
#include <envDefs.h>

View File

@@ -22,7 +22,7 @@
#include <errno.h>
#define epicsExportSharedSymbols
#include <epicsStdioRedirect.h>
#include "epicsStdio.h"
#include <errlog.h>
#include <cantProceed.h>
#include <envDefs.h>

View File

@@ -11,7 +11,7 @@
#include <string.h>
#define epicsExportSharedSymbols
#include "epicsStdio.h"
#include "epicsTempFile.h"
extern "C"
epicsShareFunc void epicsShareAPI epicsTempName (

View File

@@ -23,7 +23,7 @@
#include <ctype.h>
#include <envLib.h>
#include <epicsStdioRedirect.h>
#include "epicsStdio.h"
#include <errlog.h>
#include <cantProceed.h>

View File

@@ -21,7 +21,6 @@
#include <errno.h>
#include "epicsStdio.h"
#include "epicsStdioRedirect.h"
#include "epicsUnitTest.h"
#include "testMain.h"

View File

@@ -9,7 +9,7 @@
#include <signal.h>
#include "defs.h"
#define epicsExportSharedSymbols
#include "epicsStdio.h"
#include "epicsTempFile.h"
#undef epicsExportSharedSymbols
char dflag;