Commit f14de0e4 authored by Andreas Tille's avatar Andreas Tille

Imported Upstream version 2.3.4-2+dfsg

parent a84ff919
......@@ -89,8 +89,8 @@ include $(TOP)/build/Makefile.rules
# external schema modules
EXT_SCHEMA_MODULES = axf sraxf wgsxf vxf
READONLY_SCHEMA_LIBS = $(addprefix -d,$(EXT_SCHEMA_MODULES))
UPDATE_SCHEMA_LIBS = $(addprefix -dw,$(EXT_SCHEMA_MODULES))
UPDATE_SCHEMA_LIBS := $(addprefix -lw,$(EXT_SCHEMA_MODULES))
READONLY_SCHEMA_LIBS = $(addprefix -l,$(EXT_SCHEMA_MODULES))
ALWAYS_STATIC_SCHEMA_LIBS = $(addprefix -s,$(EXT_SCHEMA_MODULES))
# full directory paths
......@@ -301,9 +301,9 @@ DLLX ?= $(SHLX)
ARCHDEFS = -D_ARCH_BITS=$(BITS) -DLIBPREFIX=$(LPFX) -DSHLIBEXT=$(DLLX)
# default tool parameters
CFLAGS = $(DEBUG) $(DBG) $(CARCH) $(PROF) $(PED) $(LINKAGE) $(DEFINES) $(ARCHDEFS) $(INCDIRS)
CPFLAGS = $(DEBUG) $(DBG) $(CARCH) $(PROF) $(LINKAGE) $(DEFINES) $(ARCHDEFS) $(INCDIRS)
LDFLAGS = $(DBG) $(PROF) $(CARCH)
CFLAGS = $(DEBUG) $(DBG) $(CARCH) $(PROF) $(PED) $(LINKAGE) $(DEFINES) $(ARCHDEFS) $(MIN_DEPLOY_OS_OPT) $(INCDIRS)
CPFLAGS = $(DEBUG) $(DBG) $(CARCH) $(PROF) $(LINKAGE) $(DEFINES) $(ARCHDEFS) $(MIN_DEPLOY_OS_OPT) $(INCDIRS)
LDFLAGS = $(DBG) $(PROF) $(CARCH) $(MIN_DEPLOY_OS_OPT)
#-------------------------------------------------------------------------------
# runtests
......
......@@ -67,6 +67,10 @@ DEFINES := -DMAC -DBSD -DUNIX -D_REENTRANT -D_FILE_OFFSET_BITS=64
OS_DAD = bsd
OS_GDAD = unix
# minimum deployment os
MIN_DEPLOY_OS = 10.6
MIN_DEPLOY_OS_OPT = -mmacosx-version-min=$(MIN_DEPLOY_OS)
LIBXML_LPATH = /usr/lib
# flex+bison: on Mac, use source-controlled generated .c/.h files
......
......@@ -291,7 +291,12 @@ fi
# add in xml
if [ $HAVE_XML -ne 0 ]
then
CMD="$CMD -lxml2"
if [ "$NCBI" != "" ] && [ -f "$NCBI/libxml/lib/libxml2-static.a" ]
then
CMD="$CMD -L$NCBI/libxml/lib -lxml2-static"
else
CMD="$CMD -lxml2"
fi
fi
# add in math library
......
......@@ -319,7 +319,12 @@ fi
# add in xml
if [ $HAVE_XML -ne 0 ]
then
CMD="$CMD -lxml2"
# if [ "$NCBI" != "" ] && [ -f "$NCBI/libxml/lib/libxml2-static.a" ]
# then
# CMD="$CMD -L$NCBI/libxml/lib -lxml2-static"
# else
CMD="$CMD -lxml2"
# fi
fi
# add in math library
......
......@@ -163,7 +163,11 @@ do
DEPENDENCIES=1
;;
-fPIC|-std=c99|-ansi|-pedantic)
-fPIC|-std=c99|-ansi)
;;
-pedantic)
ARGS="$ARGS /W3"
;;
-*)
......@@ -228,29 +232,12 @@ then
for inc in $(cat $TARG.inc)
do
inc_low=$(echo ${inc} | tr '[A-Z]' '[a-z]' | tr '\\' '/')
# vers.h files are now generated in the objdir
if [ "$inc" != "${inc%.vers.h}" ]
if [ "${inc_low#$rhome_low}" != "$inc_low" ]
then
# convert the "...vers.h" in the object directory into "...vers" in the source directory
inc="${inc%.h}"
if [ "${inc_low#$rhome_low}" != "$inc_low" ]
then
inc="${inc:$rhome_len}"
elif [ "${inc_low#$routdir_low}" != "$inc_low" ]
then
inc="$SRCDIR/$inc"
fi
inc="${inc//\\//}"
inc="$(basename $inc)"
inc="$SRCDIR/$inc"
else
if [ "${inc_low#$rhome_low}" != "$inc_low" ]
then
inc="$LHOME${inc:$rhome_len}"
elif [ "${inc_low#$routdir_low}" != "$inc_low" ]
then
inc="$OUTDIR${inc:$routdir_len}"
fi
inc="$LHOME${inc:$rhome_len}"
elif [ "${inc_low#$routdir_low}" != "$inc_low" ]
then
inc="$OUTDIR${inc:$routdir_len}"
fi
echo -n " $inc" | tr '\\' '/' >> $TARG.d
done
......
......@@ -4,7 +4,7 @@
# N.B. Run "perl configuration-assistant.perl" if you see a message like:
# configuration-assistant.perl: /usr/bin/perl: bad interpreter: No such file or directory
################################################################################
my $VERSION = '2.3.3';
my $VERSION = '2.3.4-2';
################################################################################
use strict;
......@@ -42,6 +42,7 @@ Version() if ($options{version});
$options{references} = 1 if ($#ARGV >= 0);
printOS();
println "cwd = '" . getcwd() . "'\n";
my $DECRYPTION_PKG;
......@@ -236,6 +237,22 @@ sub Posixify {
return $_;
}
sub printOS {
my $fail;
if ($^O eq 'MSWin32') {
$fail = system('ver');
}
else {
$fail = system('uname -a');
if ($fail) {
$fail = system('ver');
}
}
if ($fail) {
println "Operating system: '$^O'";
}
}
sub Version {
my $bin = basename($0);
print << "END";
......
......@@ -77,9 +77,12 @@ KFG_EXTERN rc_t CC KartMakeText(const struct KDirectory *dir, const char *path,
#endif
KFG_EXTERN rc_t CC KartPrint(const Kart *self);
KFG_EXTERN rc_t CC KartPrintNumbered(const Kart *self);
KFG_EXTERN rc_t CC KartMakeNextItem(Kart *self, const KartItem **item);
KFG_EXTERN rc_t CC KartItemsProcessed(const Kart *self, uint16_t *number);
#ifdef __cplusplus
}
#endif
......
......@@ -39,8 +39,6 @@
extern "C" {
#endif
#define ENV_KRYPTO_PWFILE "VDB_PWFILE"
struct KFile;
struct KConfig;
struct String;
......
......@@ -27,6 +27,10 @@
#ifndef _h_kfg_priv_
#define _h_kfg_priv_
#ifndef _h_kfg_extern_
#include <kfg/extern.h>
#endif
#ifndef _h_kfg_config_
#include <kfg/config.h>
#endif
......@@ -35,6 +39,25 @@
extern "C" {
#endif
/*--------------------------------------------------------------------------
* forwards
*/
struct KDirectory;
struct KNamelist;
/*--------------------------------------------------------------------------
* Environment and configuration keys
*/
#define ENV_KRYPTO_PWFILE "VDB_PWFILE"
#define KFG_KRYPTO_PWFILE "krypto/pwfile"
#define KFG_KRYPTO_PWFD "krypto/pwfd"
/*--------------------------------------------------------------------------
* KConfig
* configuration paramter manager
*/
/* ListIncluded
* list all included files
*/
......@@ -48,9 +71,17 @@ KFG_EXTERN rc_t CC KConfigListIncluded ( const KConfig *self,
KFG_EXTERN rc_t CC KConfigGetLoadPath ( const KConfig *self,
const char **path );
/* call KConfigMake not initializing the static global KConfig pointer */
/* MakeLocal
* make a KConfig object that avoids singleton
*/
KFG_EXTERN rc_t CC KConfigMakeLocal ( KConfig **cfg,
const struct KDirectory * cfgdir );
struct KDirectory const * cfgdir );
/* PrintDebug
* print configuration including some internal nodes information
*/
KFG_EXTERN rc_t CC KConfigPrintDebug ( const KConfig *self,
const char *root_node_name );
#ifdef __cplusplus
}
......
......@@ -44,6 +44,7 @@ extern "C" {
* struct/class forwards
*/
struct KDirectory;
struct KSysDir;
struct KFile;
struct KPath;
struct KDlset;
......@@ -87,6 +88,13 @@ KFS_EXTERN rc_t KDirectoryPosixStringToSystemString (
#endif
/* OSPath
* returns a real OS path
*/
rc_t KSysDirOSPath ( struct KSysDir const *self,
wchar_t *real, size_t bsize, const char *path, va_list args );
#ifdef __cplusplus
}
#endif
......
......@@ -35,9 +35,16 @@
#include <atomic32.h>
#endif
#ifndef FORCE_TRACK_REFERENCES
#define FORCE_TRACK_REFERENCES 0
#endif
/* normally turned off */
#ifndef TRACK_REFERENCES
#if FORCE_TRACK_REFERENCES
#undef TRACK_REFERENCES
#define TRACK_REFERENCES 1
#elif ! defined TRACK_REFERENCES
#define TRACK_REFERENCES 0
#endif
/* normally turned on */
......
......@@ -81,6 +81,11 @@ KLIB_EXTERN void CC ReportSilence ( void );
*/
KLIB_EXTERN rc_t CC ReportFinalize ( rc_t rc );
/* ForceFinalize
* Finalize forcing report generation to stdout
*/
KLIB_EXTERN rc_t CC ReportForceFinalize ( void );
/* ResetObject
* Resets the name of the current object beeing processes(path or accession),
......
/*===========================================================================
*
* PUBLIC DOMAIN NOTICE
* National Center for Biotechnology Information
*
* This software/database is a "United States Government Work" under the
* terms of the United States Copyright Act. It was written as part of
* the author's official duties as a United States Government employee and
* thus cannot be copyrighted. This software/database is freely available
* to the public for use. The National Library of Medicine and the U.S.
* Government have not placed any restriction on its use or reproduction.
*
* Although all reasonable efforts have been taken to ensure the accuracy
* and reliability of the software and data, the NLM and the U.S.
* Government do not and cannot warrant the performance or results that
* may be obtained by using this software or data. The NLM and the U.S.
* Government disclaim all warranties, express or implied, including
* warranties of performance, merchantability or fitness for any particular
* purpose.
*
* Please cite the author in any work or product based on this material.
*
* ===========================================================================
*
*/
#ifndef _h_klib_sra_release_version_
#define _h_klib_sra_release_version_
#ifndef _h_klib_extern_
#include <klib/extern.h>
#endif
#ifndef _h_klib_defs_
#include <klib/defs.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* major . minor . release [ - [ type - ] revision ]
*
* Examples:
* "2.3.4-a0"
* "2.3.4-b3"
* "2.3.4-rc1"
* "2.3.4"
* "2.3.4-2"
*/
typedef struct SraReleaseVersion SraReleaseVersion;
struct SraReleaseVersion
{
ver_t version; /* major . minor . release */
uint32_t revision;
enum {
eSraReleaseVersionTypeAlpha,
eSraReleaseVersionTypeBeta,
eSraReleaseVersionTypeRC, /* release candidate */
eSraReleaseVersionTypeFinal
} type;
};
/* Get
* Get release version of this build of SRA Toolkit */
KLIB_EXTERN rc_t CC SraReleaseVersionGet ( SraReleaseVersion *version );
/* Cmp
* Compare two release versions
* result return values:
* 0 - the versions are the same
* 1 - version2 is more recent than self
* -1 - self is more recent than version2
*/
KLIB_EXTERN rc_t CC SraReleaseVersionCmp ( const SraReleaseVersion *self,
const SraReleaseVersion *version2, int32_t *result );
/* Parse
* Initialize SraReleaseVersion from char version[size]
*/
KLIB_EXTERN rc_t CC SraReleaseVersionInit ( SraReleaseVersion *self,
const char *version, size_t size );
/* Print
* Convert SraReleaseVersion to version[size]
*/
KLIB_EXTERN rc_t CC SraReleaseVersionPrint ( const SraReleaseVersion *self,
char *version, size_t size, size_t *num_writ );
#ifdef __cplusplus
}
#endif
#endif /* _h_klib_sra_release_version_ */
......@@ -30,6 +30,10 @@
#include <kns/extern.h>
#endif
#ifndef _h_klib_defs_
#include <klib/defs.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
......
......@@ -70,9 +70,12 @@ typedef struct {
TProgress *callback;
TQuitting *quitting;
bool disabled; /* output parameter for aspera_options */
} AscpOptions;
/** ascp_bin and private_file should be freed by the caller */
/** status - whether to print STSMSG(1-2) - information messages
ascp_bin and private_file should be freed by the caller */
KNS_EXTERN rc_t CC ascp_locate(const char **ascp_bin, const char **private_file,
bool use_config, bool status);
......@@ -80,6 +83,10 @@ KNS_EXTERN rc_t CC ascp_locate(const char **ascp_bin, const char **private_file,
KNS_EXTERN rc_t CC aspera_get(const char *ascp_bin, const char *private_file,
const char *src, const char *dest, AscpOptions *opt);
/** Fill AscpOptions members initialized by ascp library */
KNS_EXTERN rc_t CC aspera_options(AscpOptions *opt);
#ifdef __cplusplus
}
#endif
......
/*===========================================================================
*
* PUBLIC DOMAIN NOTICE
* National Center for Biotechnology Information
*
* This software/database is a "United States Government Work" under the
* terms of the United States Copyright Act. It was written as part of
* the author's official duties as a United States Government employee and
* thus cannot be copyrighted. This software/database is freely available
* to the public for use. The National Library of Medicine and the U.S.
* Government have not placed any restriction on its use or reproduction.
*
* Although all reasonable efforts have been taken to ensure the accuracy
* and reliability of the software and data, the NLM and the U.S.
* Government do not and cannot warrant the performance or results that
* may be obtained by using this software or data. The NLM and the U.S.
* Government disclaim all warranties, express or implied, including
* warranties of performance, merchantability or fitness for any particular
* purpose.
*
* Please cite the author in any work or product based on this material.
*
* ===========================================================================
*
*/
#ifndef _h_kns_manager_ext_
#define _h_kns_manager_ext_
#ifndef _h_kns_manager_
#include <kns/manager.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*--------------------------------------------------------------------------
* forwards
*/
struct SraReleaseVersion;
/*--------------------------------------------------------------------------
* KNSManager
*/
/* NewReleaseVersion
* Get release version of the new (latest available) public SRA Toolkit
*/
KNS_EXTERN rc_t CC KNSManagerNewReleaseVersion ( const KNSManager *self,
struct SraReleaseVersion *newVersion );
#ifdef __cplusplus
}
#endif
#endif /* _h_kns_manager_ext_ */
......@@ -78,6 +78,19 @@ KNS_EXTERN rc_t CC KNSManagerAvail ( const KNSManager *self );
KNS_EXTERN rc_t CC KNSManagerCurlVersion ( const KNSManager *self, const char ** version_string );
/* SetVerbose
* set/clear verbosity flag of manager ( dflt is false )...
* the network-code has to request it
*/
KNS_EXTERN void CC KNSManagerSetVerbose ( struct KNSManager *self, bool verbosity );
/* IsVerbose
* request the verbosity flag of manager ( dflt is false )...
*/
KNS_EXTERN bool CC KNSManagerIsVerbose ( const KNSManager *self );
#ifdef __cplusplus
}
#endif
......
......@@ -49,46 +49,59 @@ struct KNSManager;
/*--------------------------------------------------------------------------
* KSocket
*/
struct KSocket;
typedef struct KSocket KSocket;
/* KSocketAddRef
*
*/
KNS_EXTERN rc_t CC KSocketAddRef( struct KSocket *self );
/* KSocketRelease
*
*/
KNS_EXTERN rc_t CC KSocketRelease( struct KSocket *self );
/* MakeConnection
* create a connection-oriented stream connected to an Internet server
* conn [ OUT ] - a stream for communication with the server
* from [ IN ] - client endpoint
* to [ IN ] - server endpoint
* create a connection-oriented stream
*
* "conn" [ OUT ] - a stream for communication with the server
*
* "from" [ IN ] - client endpoint
*
* both endpoints have to be of type epIP; creates a TCP connection
* "to" [ IN ] - server endpoint
*
* both endpoints have to be of type epIP; creates a TCP connection
*/
KNS_EXTERN rc_t CC KNSMakeConnection ( struct KStream **conn, struct KEndPoint const *from, struct KEndPoint const *to );
KNS_EXTERN rc_t CC KNSManagerMakeConnection ( struct KNSManager const * self,
struct KStream **conn, struct KEndPoint const *from, struct KEndPoint const *to );
/* MakeIPCConnection
* create a connection-oriented stream connected to an IPC server
* conn [ OUT ] - a stream for communication with the server
* to [ IN ] - server endpoint (must be of type epIPC)
* max_retries [ IN ] - number of retries to be made if connection is refused. Will sleep for 1 second between retries
*
* "conn" [ OUT ] - a stream for communication with the server
*
* "to" [ IN ] - server endpoint (must be of type epIPC)
*
* "max_retries" [ IN ] - number of retries to be made if connection is refused.
* Will sleep for 1 second between retries
*/
KNS_EXTERN rc_t CC KNSMakeIPCConnection ( struct KStream **conn, struct KEndPoint const *to, uint8_t max_retries );
KNS_EXTERN rc_t CC KNSManagerMakeIPCConnection ( struct KNSManager const *self,
struct KStream **conn, struct KEndPoint const *to, uint32_t max_retries );
/* Create a listener socket for accepting incoming IPC connections
* ep [ IN ] - a endpoint of type epIPC
* listener [ IN ] - a listener socket, to be called KNSListen() on
/* MakeListener
* create a listener socket for accepting incoming IPC connections
*
* "ep" [ IN ] - a endpoint of type epIPC
*
* "listener" [ IN ] - a listener socket, to be called KSocketListen() on
*/
KNS_EXTERN rc_t CC KNSMakeListener( struct KSocket** listener, struct KEndPoint const * ep );
KNS_EXTERN rc_t CC KNSManagerMakeListener ( struct KNSManager const *self,
KSocket **listener, struct KEndPoint const * ep );
/* Wait for an incoming connection
* listener [ IN ] - a listener socket
* conn [ OUT ] - a stream for communication with the client
/* AddRef
* Release
*/
KNS_EXTERN rc_t CC KSocketAddRef ( KSocket *self );
KNS_EXTERN rc_t CC KSocketRelease ( KSocket *self );
/* Listen
* wait for an incoming connection
*
* "conn" [ OUT ] - a stream for communication with the client
*/
KNS_EXTERN rc_t CC KNSListen ( struct KSocket *listener, struct KStream **conn );
KNS_EXTERN rc_t CC KSocketListen ( KSocket *self, struct KStream **conn );
#ifdef __cplusplus
......
......@@ -27,40 +27,17 @@
#ifndef _h_krypto_extern_
#define _h_krypto_extern_
#ifndef _h_klib_callconv_
#include <klib/callconv.h>
#endif
#if ! defined EXPORT_LATCH && _LIBRARY
#if ! defined EXPORT_LATCH && defined _LIBRARY
#define KRYPTO_EXTERN LIB_EXPORT
#define KRYPTO_EXTERN_DATA extern LIB_EXPORT
#define KRYPTO_EXTERN_DATA LIB_EXPORT_DATA
#define EXPORT_LATCH 1
#else
#define KRYPTO_EXTERN LIB_IMPORT
#define KRYPTO_EXTERN_DATA LIB_IMPORT
#define KRYPTO_EXTERN_DATA LIB_IMPORT_DATA
#endif
#if defined _MSC_VER && ! _STATIC
/* __declspec ( dllimport ) will cause creation of
function pointers rather than thunks, which makes
the code that imports unable to link statically
against a library. we leave this symbol defined as
"extern" to use thunks instead. as a result, all
function addresses resolve to the thunk and not
the actual function. */