Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build issue on latest Arch #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions src/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15.1 from Makefile.am.
# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# Copyright (C) 1994-2021 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
Expand Down Expand Up @@ -133,7 +133,7 @@ am__recursive_targets = \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
distdir
distdir distdir-am
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
Expand All @@ -151,8 +151,6 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
Expand Down Expand Up @@ -193,10 +191,10 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CORE_CRYPT_O = @CORE_CRYPT_O@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CSCOPE = @CSCOPE@
CTAGS = @CTAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
Expand All @@ -206,6 +204,7 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
GREP = @GREP@
INSTALL = @INSTALL@
Expand Down Expand Up @@ -282,6 +281,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
Expand Down Expand Up @@ -317,8 +317,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
Expand Down Expand Up @@ -428,8 +428,10 @@ cscopelist-am: $(am__tagged_files)

distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am

distdir: $(DISTFILES)
distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
Expand Down
22 changes: 12 additions & 10 deletions src/core/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15.1 from Makefile.am.
# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# Copyright (C) 1994-2021 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
Expand Down Expand Up @@ -141,7 +141,7 @@ am__v_at_0 = @
am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp =
am__depfiles_maybe =
am__maybe_remake_depfiles =
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
AM_V_CXX = $(am__v_CXX_@AM_V@)
Expand Down Expand Up @@ -208,8 +208,6 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
Expand All @@ -224,10 +222,10 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CORE_CRYPT_O = @CORE_CRYPT_O@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CSCOPE = @CSCOPE@
CTAGS = @CTAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
Expand All @@ -237,6 +235,7 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
GREP = @GREP@
INSTALL = @INSTALL@
Expand Down Expand Up @@ -313,6 +312,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
Expand Down Expand Up @@ -380,8 +380,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
Expand Down Expand Up @@ -485,8 +485,10 @@ cscopelist-am: $(am__tagged_files)

distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am

distdir: $(DISTFILES)
distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
Expand Down
4 changes: 2 additions & 2 deletions src/core/file_unix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ cFile::File_t cFile::Read(void* buffer, File_t nBytes) const //throw(eFile)
}
else
{
iBytesRead = fread(buffer, sizeof(byte), nBytes, mpData->mpCurrStream);
iBytesRead = fread(buffer, sizeof(ibyte), nBytes, mpData->mpCurrStream);
if (ferror(mpData->mpCurrStream) != 0)
{
throw eFileRead(mpData->mFileName, iFSServices::GetInstance()->GetErrString());
Expand All @@ -382,7 +382,7 @@ cFile::File_t cFile::Write(const void* buffer, File_t nBytes) //throw(eFile)
ASSERT(mpData->mpCurrStream != NULL);
ASSERT(isWritable);

if ((actual_count = fwrite(buffer, sizeof(byte), nBytes, mpData->mpCurrStream)) < nBytes)
if ((actual_count = fwrite(buffer, sizeof(ibyte), nBytes, mpData->mpCurrStream)) < nBytes)
throw eFileWrite(mpData->mFileName, iFSServices::GetInstance()->GetErrString());
else
return actual_count;
Expand Down
10 changes: 5 additions & 5 deletions src/core/hashtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,20 +91,20 @@ template<> inline bool cDefaultCompare<TSTRING>::operator()(const TSTRING& lhs,
template<class T> class cDefaultConvert
{
public:
const byte* operator()(const T& obj, int* const pcbKeyLen)
const ibyte* operator()(const T& obj, int* const pcbKeyLen)
{
// HACK! TODO: in the interest of time, I've left this as it is.....
*pcbKeyLen = sizeof(TCHAR) * _tcslen(obj);
return (byte*)obj;
return (ibyte*)obj;
}
};
/////////////////////////////////////////////////////////
// specialization for TSTRINGS
/////////////////////////////////////////////////////////
template<> inline const byte* cDefaultConvert<TSTRING>::operator()(const TSTRING& obj, int* const pcbKeyLen)
template<> inline const ibyte* cDefaultConvert<TSTRING>::operator()(const TSTRING& obj, int* const pcbKeyLen)
{
*pcbKeyLen = sizeof(TCHAR) * obj.length();
return (byte*)obj.c_str();
return (ibyte*)obj.c_str();
}

///////////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -510,7 +510,7 @@ uint32 cHashTable<KEY_TYPE, VAL_TYPE, COMPARE_OP, CONVERTER>::Hash(const KEY_TYP
{
CONVERTER converter;
int len;
const byte* pb = converter(key, &len); //locates key
const ibyte* pb = converter(key, &len); //locates key
uint32 hindex;

hindex = *pb;
Expand Down
4 changes: 2 additions & 2 deletions src/core/stringutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@
class tss_hash_key_convert
{
public:
const byte* operator()(const wc16_string& s, int* const pcbKeyLen)
const ibyte* operator()(const wc16_string& s, int* const pcbKeyLen)
{
*pcbKeyLen = sizeof(WCHAR16) * s.length();
return (byte*)s.c_str();
return (ibyte*)s.c_str();
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/core/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
// standard TSS types
//-----------------------------------------------------------------------------

typedef unsigned char byte; // platform-independent
typedef unsigned char ibyte; // platform-independent

typedef signed char int8;
typedef short int16;
Expand Down
22 changes: 12 additions & 10 deletions src/cryptlib/Makefile.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Makefile.in generated by automake 1.15.1 from Makefile.am.
# Makefile.in generated by automake 1.16.5 from Makefile.am.
# @configure_input@

# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# Copyright (C) 1994-2021 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
Expand Down Expand Up @@ -131,7 +131,7 @@ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
depcomp =
am__depfiles_maybe =
am__maybe_remake_depfiles =
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
AM_V_CXX = $(am__v_CXX_@AM_V@)
Expand Down Expand Up @@ -198,8 +198,6 @@ am__define_uniq_tagged_files = \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
Expand All @@ -214,10 +212,10 @@ CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CORE_CRYPT_O = @CORE_CRYPT_O@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CSCOPE = @CSCOPE@
CTAGS = @CTAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
Expand All @@ -227,6 +225,7 @@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
GREP = @GREP@
INSTALL = @INSTALL@
Expand Down Expand Up @@ -303,6 +302,7 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
Expand Down Expand Up @@ -355,8 +355,8 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
Expand Down Expand Up @@ -460,8 +460,10 @@ cscopelist-am: $(am__tagged_files)

distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am

distdir: $(DISTFILES)
distdir-am: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
Expand Down
14 changes: 7 additions & 7 deletions src/cryptlib/asn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@
#include <stdlib.h>
#include <stdio.h>

unsigned int DERLengthEncode(unsigned int length, byte *output)
unsigned int DERLengthEncode(unsigned int length, ibyte *output)
{
unsigned int i=0;
if (length <= 0x7f)
{
output[i++] = byte(length);
output[i++] = ibyte(length);
}
else
{
output[i++] = byte(BytePrecision(length) | 0x80);
output[i++] = ibyte(BytePrecision(length) | 0x80);
for (int j=BytePrecision(length); j; --j)
{
output[i++] = byte (length >> (j-1)*8);
output[i++] = ibyte (length >> (j-1)*8);
}
}
return i;
}

unsigned int DERLengthEncode(unsigned int length, BufferedTransformation &bt)
{
byte buf[10]; // should be more than enough
ibyte buf[10]; // should be more than enough
unsigned int i = DERLengthEncode(length, buf);
assert(i <= 10);
bt.Put(buf, i);
Expand All @@ -35,7 +35,7 @@ unsigned int DERLengthEncode(unsigned int length, BufferedTransformation &bt)

bool BERLengthDecode(BufferedTransformation &bt, unsigned int &length)
{
byte b;
ibyte b;

if (!bt.Get(b))
BERDecodeError();
Expand Down Expand Up @@ -76,7 +76,7 @@ bool BERLengthDecode(BufferedTransformation &bt, unsigned int &length)
BERSequenceDecoder::BERSequenceDecoder(BufferedTransformation &inQueue)
: inQueue(inQueue)
{
byte b;
ibyte b;
if (!inQueue.Get(b) || b != (SEQUENCE | CONSTRUCTED))
BERDecodeError();

Expand Down
12 changes: 6 additions & 6 deletions src/cryptlib/asn.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
enum ASNTag {INTEGER=0x02, BIT_STRING=0x03, SEQUENCE=0x10};
enum ASNIdFlag {CONSTRUCTED = 0x20};

unsigned int DERLengthEncode(unsigned int length, byte *output);
unsigned int DERLengthEncode(unsigned int length, ibyte *output);
unsigned int DERLengthEncode(unsigned int length, BufferedTransformation &);

#ifdef THROW_EXCEPTIONS
Expand All @@ -27,16 +27,16 @@ class BERSequenceDecoder : public BufferedTransformation
BERSequenceDecoder(BufferedTransformation &inQueue);
~BERSequenceDecoder();

void Put(byte) {}
void Put(const byte *, unsigned int) {}
void Put(ibyte) {}
void Put(const ibyte *, unsigned int) {}

unsigned long MaxRetrieveable()
{return inQueue.MaxRetrieveable();}
unsigned int Get(byte &outByte)
unsigned int Get(ibyte &outByte)
{return inQueue.Get(outByte);}
unsigned int Get(byte *outString, unsigned int getMax)
unsigned int Get(ibyte *outString, unsigned int getMax)
{return inQueue.Get(outString, getMax);}
unsigned int Peek(byte &outByte) const
unsigned int Peek(ibyte &outByte) const
{return inQueue.Peek(outByte);}

private:
Expand Down
Loading