diff options
-rwxr-xr-x | autogen.sh | 3 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | lib/GMPString.cc | 3 | ||||
-rw-r--r-- | lib/Handle.cc | 8 | ||||
-rw-r--r-- | lib/Output.cc | 4 |
5 files changed, 14 insertions, 6 deletions
@@ -13,4 +13,5 @@ autoheader echo Running autoconf... autoconf echo Running automake... -automake -a -c -f --gnu +#automake -a -c -f --gnu +automake -a -c --gnu diff --git a/configure.ac b/configure.ac index 8942d5e..96caac4 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ # -*- Autoconf -*- # Process this file with autoconf to produce a configure script. -AC_PREREQ(2.56) +AC_PREREQ(2.50) AC_INIT([Baltisot],[0.1.0],[pixel@nobis-crew.org]) AM_INIT_AUTOMAKE(Baltisot, 0.1.0) AC_CONFIG_SRCDIR(src/Main.cc) diff --git a/lib/GMPString.cc b/lib/GMPString.cc index 5b2d1c6..be39e38 100644 --- a/lib/GMPString.cc +++ b/lib/GMPString.cc @@ -24,4 +24,7 @@ GMPString::operator String() const { return String(str); } +GMPString::~GMPString() { +} + #endif diff --git a/lib/Handle.cc b/lib/Handle.cc index 8ec6219..84004b0 100644 --- a/lib/Handle.cc +++ b/lib/Handle.cc @@ -29,6 +29,10 @@ inline Uint32 bswap_32(Uint32 w) { #include <io.h> #endif +#ifndef _WIN32 +#include <sys/mman.h> +#endif + #include "Handle.h" #include "gettext.h" @@ -535,10 +539,10 @@ void * Handle::mmap(off_t offset, size_t length) throw (GeneralException) { throw GeneralException("Handle already mmap()ped"); } mapped = true; - maplength = length; if (length == -1) { length = GetSize(); } + maplength = length; #ifndef _WIN32 r = ::mmap(0, length, (CanRead() ? PROT_READ : 0) | (CanWrite() ? PROT_WRITE : 0), MAP_SHARED, h, offset); if (!r) { @@ -578,7 +582,7 @@ void Handle::munmap() throw (GeneralException) { throw GeneralException("Can't munmap, was not mapped"); } #ifndef _WIN32 - if (::munmap(mappedarea, maplength) { + if (::munmap(mappedarea, maplength)) { throw GeneralException(String("Was not able to munmap(): ") + strerror(errno)); } #else diff --git a/lib/Output.cc b/lib/Output.cc index 912af25..7d619b6 100644 --- a/lib/Output.cc +++ b/lib/Output.cc @@ -39,8 +39,8 @@ Output::Output(String no, int create, int trunc) throw (GeneralException) : int Output::wrapopen(const String & n, int create, int trunc) { #ifndef _WIN32 - return open(no.to_charp(), (create ? O_CREAT : 0) | - (trunc ? O_TRUNC : 0) | O_WRONLY, 00666); + return open(n.to_charp(), (create ? O_CREAT : 0) | + (trunc ? O_TRUNC : 0) | O_WRONLY, 00666); #else DWORD dwCreationDisposition; switch ((create ? 1 : 0) | (trunc ? 2 : 0)) { |