mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 06:26:15 +02:00
* GCC 4.3.0 (Fedora 9) compatibility fixes. Reported by Gour and
Armijn Hemel.
This commit is contained in:
parent
9819bb20da
commit
bd955e15e1
11 changed files with 18 additions and 3 deletions
|
@ -4,6 +4,8 @@
|
|||
#include "aterm.hh"
|
||||
#include "util.hh"
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
|
||||
namespace nix {
|
||||
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
#include "nixexpr-ast.hh"
|
||||
#include "nixexpr-ast.cc"
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
|
||||
namespace nix {
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include "util.hh"
|
||||
|
||||
#include <cerrno>
|
||||
#include <cstdlib>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
|
|
@ -17,7 +17,7 @@ int openLockFile(const Path & path, bool create);
|
|||
void deleteLockFilePreClose(const Path & path, int fd);
|
||||
void deleteLockFilePostClose(const Path & path);
|
||||
|
||||
typedef enum LockType { ltRead, ltWrite, ltNone };
|
||||
enum LockType { ltRead, ltWrite, ltNone };
|
||||
|
||||
bool lockFile(int fd, LockType lockType, bool wait);
|
||||
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#include "util.hh"
|
||||
|
||||
#include <cerrno>
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
#include <map>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#include "aterm.hh"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
using std::string;
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "config.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <cstring>
|
||||
|
||||
#ifdef HAVE_OPENSSL
|
||||
#include <openssl/md5.h>
|
||||
|
|
|
@ -83,7 +83,7 @@ Hash compressHash(const Hash & hash, unsigned int newSize);
|
|||
HashType parseHashType(const string & s);
|
||||
|
||||
|
||||
typedef union Ctx;
|
||||
union Ctx;
|
||||
|
||||
class HashSink : public Sink
|
||||
{
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#include "serialise.hh"
|
||||
#include "util.hh"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
|
||||
namespace nix {
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include <iostream>
|
||||
#include <cerrno>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <sstream>
|
||||
#include <cstring>
|
||||
|
||||
|
@ -529,13 +530,14 @@ AutoDelete::AutoDelete(const string & p, bool recursive) : path(p)
|
|||
AutoDelete::~AutoDelete()
|
||||
{
|
||||
try {
|
||||
if (del)
|
||||
if (del) {
|
||||
if (recursive)
|
||||
deletePath(path);
|
||||
else {
|
||||
if (remove(path.c_str()) == -1)
|
||||
throw SysError(format("cannot unlink `%1%'") % path);
|
||||
}
|
||||
}
|
||||
} catch (...) {
|
||||
ignoreException();
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include <iostream>
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
#include <cstring>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
|
Loading…
Reference in a new issue