|
a/src/utils/pathut.cpp |
|
b/src/utils/pathut.cpp |
1 |
#ifndef lint
|
1 |
#ifndef lint
|
2 |
static char rcsid[] = "@(#$Id: pathut.cpp,v 1.22 2008-07-01 11:51:51 dockes Exp $ (C) 2004 J.F.Dockes";
|
2 |
static char rcsid[] = "@(#$Id: pathut.cpp,v 1.23 2008-11-24 15:47:40 dockes Exp $ (C) 2004 J.F.Dockes";
|
3 |
#endif
|
3 |
#endif
|
4 |
/*
|
4 |
/*
|
5 |
* This program is free software; you can redistribute it and/or modify
|
5 |
* This program is free software; you can redistribute it and/or modify
|
6 |
* it under the terms of the GNU General Public License as published by
|
6 |
* it under the terms of the GNU General Public License as published by
|
7 |
* the Free Software Foundation; either version 2 of the License, or
|
7 |
* the Free Software Foundation; either version 2 of the License, or
|
|
... |
|
... |
39 |
#include "autoconfig.h"
|
39 |
#include "autoconfig.h"
|
40 |
#include "pathut.h"
|
40 |
#include "pathut.h"
|
41 |
#include "transcode.h"
|
41 |
#include "transcode.h"
|
42 |
|
42 |
|
43 |
#include <sys/types.h>
|
43 |
#include <sys/types.h>
|
44 |
#ifndef STATFS_INCLUDE
|
44 |
// Let's include all files where statfs can be defined and hope for no
|
45 |
#define STATFS_INCLUDE <sys/vfs.h>
|
45 |
// conflict...
|
|
|
46 |
#ifdef HAVE_SYS_MOUNT_H
|
|
|
47 |
#include <sys/mount.h>
|
46 |
#endif
|
48 |
#endif
|
47 |
|
49 |
#ifdef HAVE_SYS_STATFS_H
|
48 |
#include STATFS_INCLUDE
|
50 |
#include <sys/statfs.h>
|
|
|
51 |
#endif
|
|
|
52 |
#ifdef HAVE_SYS_STATVFS_H
|
|
|
53 |
#include <sys/statvfs.h>
|
|
|
54 |
#endif
|
|
|
55 |
#ifdef HAVE_SYS_VFS_H
|
|
|
56 |
#include <sys/vfs.h>
|
|
|
57 |
#endif
|
49 |
|
58 |
|
50 |
bool fsocc(const string &path, int *pc, long *blocks)
|
59 |
bool fsocc(const string &path, int *pc, long *blocks)
|
51 |
{
|
60 |
{
|
52 |
#ifdef sun
|
61 |
#ifdef sun
|
53 |
struct statvfs buf;
|
62 |
struct statvfs buf;
|