Description: Misc patches inherited from the monolithic .diff.gz. This includes: - changes to the bison parser; - detection of intsizes by Steinar Gundersson - various changes to make it build or work with Debian could be split out into separate patches. --- a/apps/dcm_modify_object/gram.h +++ b/apps/dcm_modify_object/gram.h @@ -1,22 +1,73 @@ -#ifndef BISON_Y_TAB_H -# define BISON_Y_TAB_H +/* A Bison parser, made by GNU Bison 2.3. */ -#ifndef YYSTYPE -typedef union{ +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 + Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + NUMBER = 258, + VALUE = 259 + }; +#endif +/* Tokens. */ +#define NUMBER 258 +#define VALUE 259 + + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +#line 25 "gram.y" +{ unsigned long num; char str[DICOM_LO_LENGTH+1]; char *s; DCM_ELEMENT *e; LST_HEAD *l; void *v; -} yystype; -# define YYSTYPE yystype +} +/* Line 1489 of yacc.c. */ +#line 66 "y.tab.h" + YYSTYPE; +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 #endif -# define NUMBER 257 -# define VALUE 258 - extern YYSTYPE yylval; -#endif /* not BISON_Y_TAB_H */ --- a/facilities/objects/dcmprivate.h +++ b/facilities/objects/dcmprivate.h @@ -117,11 +117,7 @@ typedef union { } SHORT_WORD; typedef union { -#ifdef __alpha unsigned int l; -#else - unsigned long l; -#endif unsigned char u[4]; } LONG_WORD; --- a/facilities/utility/utility.c +++ b/facilities/utility/utility.c @@ -912,7 +912,9 @@ CONDITION UTL_SetConfigFile(const char* if (configFile == 0 || configFile[0] == '\0') { char* p = getenv("CTN_TARGET"); if (p == NULL) { - return UTL_NO_CTN_TARGET; + /* Debian patch: Can not make operation dependent on Env var */ + /* return UTL_NO_CTN_TARGET; */ + p = "/etc/ctn"; } UTL_configFile = (char*) malloc(strlen(p) + strlen("/runtime/ctn_cfg.txt") + 1); strcpy(UTL_configFile, p); --- a/facilities/xutl/xutl.c +++ b/facilities/xutl/xutl.c @@ -31,7 +31,9 @@ findRuntime(XUTL_STRUCT* s) c = getenv("CTN_TARGET"); if (c == NULL) - c = "/opt/ctn"; + /* Debian patch: conform to debian directory policy */ + /* c = "/opt/ctn"; */ + c = "/etc/ctn"; sprintf(s->runtime, "%s/runtime/fontmap", c); } --- a/facilities/dicom/dicom.h +++ b/facilities/dicom/dicom.h @@ -57,6 +57,8 @@ #ifdef _MSC_VER #include "dicom_platform.h" +#else +#include "intsizes.h" #endif #ifdef __cplusplus @@ -85,14 +87,13 @@ extern "C" { typedef unsigned short U16; /* unsigned, 16 bit */ typedef short S16; /* signed, 16 bit */ -#if LONGSIZE == 64 && INTSIZE == 32 /* Such as an Alpha */ +#if LONGSIZE == 64 && INTSIZE == 32 /* Such as an Alpha */ typedef unsigned int U32; typedef int S32; #elif LONGSIZE == 32 /* Most 32 bit workstations */ typedef unsigned long U32; typedef long S32; - #else /* Something we do not support */ /* The writers of this code assume that we can find a 32 bit integer --- a/facilities/dicom/Makefile +++ b/facilities/dicom/Makefile @@ -8,6 +8,7 @@ library: install: $(INSTALLINCLUDE) ctn_os.h $(DICOM_INCLUDE) $(INSTALLINCLUDE) dicom.h $(DICOM_INCLUDE) + $(INSTALLINCLUDE) intsizes.h $(DICOM_INCLUDE) $(INSTALLINCLUDE) dicom_platform.h $(DICOM_INCLUDE) export: @@ -19,9 +20,10 @@ headerexport: $(INSTALLINCLUDE) dicom_platform.h $(DICOM_INCLUDE) links: rm -f $(DICOM_LIBSRC)/dicom.h $(DICOM_LIBSRC)/dicom_platform.h $(DICOM_LIBSRC)/ctn_os.h - ln -s ../facilities/dicom/ctn_os.h $(DICOM_LIBSRC) - ln -s ../facilities/dicom/dicom.h $(DICOM_LIBSRC) - ln -s ../facilities/dicom/dicom_platform.h $(DICOM_LIBSRC) + ln -sf ../facilities/dicom/ctn_os.h $(DICOM_LIBSRC) + ln -sf ../facilities/dicom/dicom.h $(DICOM_LIBSRC) + ln -sf ../facilities/dicom/intsizes.h $(DICOM_LIBSRC) + ln -sf ../facilities/dicom/dicom_platform.h $(DICOM_LIBSRC) clean: rm -f *.a *.o *.BAK *% core --- a/libsrc/Makefile +++ b/libsrc/Makefile @@ -25,7 +25,7 @@ BASE_OBJS = \ OBJS = $(BASE_OBJS) $(TBL_DB) tblcond.o idb.o idbcond.o OBJS_MBCTN = $(BASE_OBJS) dicom_chr.o $(TBLMB_DB) tblmbcond.o idbmb.o idbmbcond.o xutl_mb.o -BASE_HEADER_FILES = cfg.h condition.h ctn_os.h ctnthread.h dbquery.h decode.h dicom.h \ +BASE_HEADER_FILES = cfg.h condition.h ctn_os.h ctnthread.h dbquery.h decode.h dicom.h intsizes.h \ dicom_ddr.h dicom_ie.h dicom_irs.h dicom_messages.h \ dicom_objects.h dicom_platform.h dicom_print.h dicom_services.h \ dicom_sq.h dicom_uids.h dulfsm.h dulprotocol.h dulsnoop.h \ @@ -34,8 +34,9 @@ icon.h idb.h lst.h manage.h mut.h snp.h tbl_msql.h tbl_psql.h tbl_sqlserver.h tbl_sybase.h tbl_ufs.h \ utility.h xutl.h -HEADER_FILES = $(BASE_HEADER_FILES) tbl.h tbl_msql.h tbl_psql.h tbl_sqlserver.h\ -tbl_sybase.h tbl_ufs.h +HEADER_FILES = $(BASE_HEADER_FILES) +# KMR -- removed these files since BASE_HEADER_FILES has them in their +# tbl.h tbl_msql.h tbl_psql.h tbl_sqlserver.h tbl_sybase.h tbl_ufs.h HEADER_FILES_MBCTN = $(BASE_HEADER_FILES) dicom_chr.h idbmb.h tblmb.h tblmb_psql.h --- a/libsrc/Makefile.psql +++ b/libsrc/Makefile.psql @@ -24,7 +24,7 @@ BASE_OBJS = \ OBJS = $(BASE_OBJS) tbl_psql.o tblcond.o idb.o idbcond.o OBJS_MBCTN = $(BASE_OBJS) dicom_chr.o tblmb_psql.o tblmbcond.o idbmb.o idbmbcond.o xutl_mb.o -BASE_HEADER_FILES = cfg.h condition.h ctn_os.h ctnthread.h dbquery.h decode.h dicom.h \ +BASE_HEADER_FILES = cfg.h condition.h ctn_os.h ctnthread.h dbquery.h decode.h dicom.h intsizes.h \ dicom_ddr.h dicom_ie.h dicom_irs.h dicom_messages.h \ dicom_objects.h dicom_platform.h dicom_print.h dicom_services.h \ dicom_sq.h dicom_uids.h dulfsm.h dulprotocol.h dulsnoop.h \