Experimental Physics and Industrial Control System
Hi all,
This is for those who have already wondered how to put the huge text
files (*.dbd, *.db, *.subs etc) on a small (flash) disc or how to make
loading those files via network faster.
With the attached patch (for R3.14.8.2, maybe works also on other
versions), it is possible to read gzip'ed files with dbLoadDatabase,
dbLoadRedords and dbLoadTemplate. (Of course not gzip'ed files still work.)
(A gzip'ing installation mechanism is not included! Write one or gzip
manually.)
You need zlib for your target architecture in a location where the build
mechanism can find it. Here is the zlib home page: http://www.zlib.net/
Add the following line to your <base>/configure/os/CONFIG.Common.<arch>
file to activate the feature for an architecture:
HAVE_ZLIB = YES
Please report it this works/fails on different architectures.
Dirk
Index: src/dbStatic/Makefile
===================================================================
RCS file: /cvs/G/EPICS/base-3.14.8/src/dbStatic/Makefile,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 Makefile
*** src/dbStatic/Makefile 10 Mar 2006 14:12:49 -0000 1.1.1.1
--- src/dbStatic/Makefile 18 Jul 2007 16:28:48 -0000
***************
*** 53,58 ****
--- 53,63 ----
dbToMenuH_SRCS = dbToMenuH.c
dbToRecordtypeH_SRCS = dbToRecordtypeH.c
+ ifeq ($(strip $(HAVE_ZLIB)),YES)
+ LIB_SYS_LIBS += z
+ CPPFLAGS+=-DHAVE_ZLIB
+ endif
+
include $(TOP)/configure/RULES
# Extra rule since dbLexRoutines.c is included in dbYacc.c
Index: src/dbStatic/dbLexRoutines.c
===================================================================
RCS file: /cvs/G/EPICS/base-3.14.8/src/dbStatic/dbLexRoutines.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 dbLexRoutines.c
*** src/dbStatic/dbLexRoutines.c 10 Mar 2006 14:12:49 -0000 1.1.1.1
--- src/dbStatic/dbLexRoutines.c 18 Jul 2007 16:28:48 -0000
***************
*** 37,42 ****
--- 37,48 ----
#include "dbStaticLib.h"
#include "dbStaticPvt.h"
+ #if defined(HAVE_ZLIB)
+ #include "zlib.h"
+ #define fopen gzopen
+ #define fclose gzclose
+ #define fgets(buf,len,file) gzgets(file,buf,len)
+ #endif
/*global declarations*/
Index: src/dbtools/Makefile
===================================================================
RCS file: /cvs/G/EPICS/base-3.14.8/src/dbtools/Makefile,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 Makefile
*** src/dbtools/Makefile 10 Mar 2006 14:12:49 -0000 1.1.1.1
--- src/dbtools/Makefile 18 Jul 2007 16:28:48 -0000
***************
*** 32,37 ****
--- 32,42 ----
OBJLIB_SRCS = $(LIBSRCS)
endif
+ ifeq ($(strip $(HAVE_ZLIB)),YES)
+ LIB_SYS_LIBS += z
+ CPPFLAGS+=-DHAVE_ZLIB
+ endif
+
include $(TOP)/configure/RULES
#
Index: src/dbtools/dbLoadTemplate.y
===================================================================
RCS file: /cvs/G/EPICS/base-3.14.8/src/dbtools/dbLoadTemplate.y,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 dbLoadTemplate.y
*** src/dbtools/dbLoadTemplate.y 10 Mar 2006 14:12:49 -0000 1.1.1.1
--- src/dbtools/dbLoadTemplate.y 18 Jul 2007 16:28:48 -0000
***************
*** 20,25 ****
--- 20,33 ----
#define epicsExportSharedSymbols
#include "dbLoadTemplate.h"
+ #if defined(HAVE_ZLIB)
+ #include "zlib.h"
+ #define fopen gzopen
+ #define fclose gzclose
+ #define read gzread
+ #define fileno(file) file
+ #endif
+
static int line_num;
static int yyerror();
- Navigate by Date:
- Prev:
RE: IPac driver organisation Andy Foster
- Next:
Mantis Bug Tracker Fixed Andrew Johnson
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
<2007>
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
RE: IPac driver organisation Andy Foster
- Next:
Mantis Bug Tracker Fixed Andrew Johnson
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
<2007>
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024