Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
e77c9be0
Commit
e77c9be0
authored
Apr 06, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added support for fstatvfs.
parent
24dd96a9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
116 additions
and
0 deletions
+116
-0
configure
configure
+4
-0
configure.ac
configure.ac
+2
-0
config.h.in
include/config.h.in
+6
-0
port.h
include/wine/port.h
+5
-0
Makefile.in
libs/port/Makefile.in
+1
-0
fstatvfs.c
libs/port/fstatvfs.c
+98
-0
No files found.
configure
View file @
e77c9be0
...
@@ -15981,6 +15981,8 @@ fi
...
@@ -15981,6 +15981,8 @@ fi
for
ac_func
in
\
for
ac_func
in
\
_lwp_create
\
_lwp_create
\
_lwp_self
\
_lwp_self
\
...
@@ -15995,6 +15997,8 @@ for ac_func in \
...
@@ -15995,6 +15997,8 @@ for ac_func in \
clone
\
clone
\
finite
\
finite
\
fpclass
\
fpclass
\
fstatfs
\
fstatvfs
\
ftruncate
\
ftruncate
\
ftruncate64
\
ftruncate64
\
futimes
\
futimes
\
...
...
configure.ac
View file @
e77c9be0
...
@@ -1025,6 +1025,8 @@ AC_CHECK_FUNCS(\
...
@@ -1025,6 +1025,8 @@ AC_CHECK_FUNCS(\
clone \
clone \
finite \
finite \
fpclass \
fpclass \
fstatfs \
fstatvfs \
ftruncate \
ftruncate \
ftruncate64 \
ftruncate64 \
futimes \
futimes \
...
...
include/config.h.in
View file @
e77c9be0
...
@@ -125,6 +125,12 @@
...
@@ -125,6 +125,12 @@
/* Define to 1 if the system has the type `fsfilcnt_t'. */
/* Define to 1 if the system has the type `fsfilcnt_t'. */
#undef HAVE_FSFILCNT_T
#undef HAVE_FSFILCNT_T
/* Define to 1 if you have the `fstatfs' function. */
#undef HAVE_FSTATFS
/* Define to 1 if you have the `fstatvfs' function. */
#undef HAVE_FSTATVFS
/* Define to 1 if you have the <ft2build.h> header file. */
/* Define to 1 if you have the <ft2build.h> header file. */
#undef HAVE_FT2BUILD_H
#undef HAVE_FT2BUILD_H
...
...
include/wine/port.h
View file @
e77c9be0
...
@@ -222,6 +222,10 @@ struct statvfs
...
@@ -222,6 +222,10 @@ struct statvfs
#ifndef NO_LIBWINE_PORT
#ifndef NO_LIBWINE_PORT
#ifndef HAVE_FSTATVFS
int
fstatvfs
(
int
fd
,
struct
statvfs
*
buf
);
#endif
#ifndef HAVE_GETOPT_LONG
#ifndef HAVE_GETOPT_LONG
extern
char
*
optarg
;
extern
char
*
optarg
;
extern
int
optind
;
extern
int
optind
;
...
@@ -391,6 +395,7 @@ extern long interlocked_xchg_add( long *dest, long incr );
...
@@ -391,6 +395,7 @@ extern long interlocked_xchg_add( long *dest, long incr );
#define __WINE_NOT_PORTABLE(func) func##_is_not_portable func##_is_not_portable
#define __WINE_NOT_PORTABLE(func) func##_is_not_portable func##_is_not_portable
#define fstatvfs __WINE_NOT_PORTABLE(fstatvfs)
#define getopt_long __WINE_NOT_PORTABLE(getopt_long)
#define getopt_long __WINE_NOT_PORTABLE(getopt_long)
#define getopt_long_only __WINE_NOT_PORTABLE(getopt_long_only)
#define getopt_long_only __WINE_NOT_PORTABLE(getopt_long_only)
#define getpagesize __WINE_NOT_PORTABLE(getpagesize)
#define getpagesize __WINE_NOT_PORTABLE(getpagesize)
...
...
libs/port/Makefile.in
View file @
e77c9be0
...
@@ -7,6 +7,7 @@ VPATH = @srcdir@
...
@@ -7,6 +7,7 @@ VPATH = @srcdir@
MODULE
=
libwine_port.a
MODULE
=
libwine_port.a
C_SRCS
=
\
C_SRCS
=
\
fstatvfs.c
\
getopt.c
\
getopt.c
\
getopt1.c
\
getopt1.c
\
getpagesize.c
\
getpagesize.c
\
...
...
libs/port/fstatvfs.c
0 → 100644
View file @
e77c9be0
/*
* fstatvfs function
*
* Copyright 2004 Alexandre Julliard
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "wine/port.h"
#ifndef HAVE_FSTATVFS
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
#ifdef STATFS_DEFINED_BY_SYS_VFS
# include <sys/vfs.h>
#else
# ifdef STATFS_DEFINED_BY_SYS_MOUNT
# include <sys/mount.h>
# else
# ifdef STATFS_DEFINED_BY_SYS_STATFS
# include <sys/statfs.h>
# endif
# endif
#endif
int
fstatvfs
(
int
fd
,
struct
statvfs
*
buf
)
{
int
ret
;
#ifdef HAVE_FSTATFS
struct
statfs
info
;
/* FIXME: add autoconf check for this */
#if defined(__svr4__) || defined(_SCO_DS) || defined(__sun)
ret
=
fstatfs
(
fd
,
&
info
,
0
,
0
);
#else
ret
=
fstatfs
(
fd
,
&
info
);
#endif
if
(
ret
>=
0
)
{
memset
(
buf
,
0
,
sizeof
(
*
buf
)
);
buf
->
f_bsize
=
info
.
f_bsize
;
buf
->
f_blocks
=
info
.
f_blocks
;
buf
->
f_files
=
info
.
f_files
;
#ifdef HAVE_STRUCT_STATFS_F_NAMELEN
buf
->
f_namemax
=
info
.
f_namelen
;
#endif
#ifdef HAVE_STRUCT_STATFS_F_FRSIZE
buf
->
f_frsize
=
info
.
f_frsize
;
#else
buf
->
f_frsize
=
info
.
f_bsize
;
#endif
#ifdef HAVE_STRUCT_STATFS_F_BFREE
buf
->
f_bfree
=
info
.
f_bfree
;
#else
buf
->
f_bfree
=
info
.
f_bavail
;
#endif
#ifdef HAVE_STRUCT_STATFS_F_BAVAIL
buf
->
f_bavail
=
info
.
f_bavail
;
#else
buf
->
f_bavail
=
info
.
f_bfree
;
#endif
#ifdef HAVE_STRUCT_STATFS_F_FFREE
buf
->
f_ffree
=
info
.
f_ffree
;
#else
buf
->
f_ffree
=
info
.
f_favail
;
#endif
#ifdef HAVE_STRUCT_STATFS_F_FAVAIL
buf
->
f_favail
=
info
.
f_favail
;
#else
buf
->
f_favail
=
info
.
f_ffree
;
#endif
}
#else
/* HAVE_FSTATFS */
ret
=
-
1
;
errno
=
ENOSYS
;
#endif
/* HAVE_FSTATFS */
return
ret
;
}
#endif
/* HAVE_FSTATVFS */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment