Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
bb0f7089
Commit
bb0f7089
authored
May 26, 1998
by
Andrew Tridgell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check for munmap as well as mmap. NextStep only has mmap in standard
libs
parent
1ff5450d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
6 deletions
+7
-6
configure.in
configure.in
+1
-1
rsync.h
rsync.h
+2
-1
syscall.c
syscall.c
+1
-1
util.c
util.c
+3
-3
No files found.
configure.in
View file @
bb0f7089
...
...
@@ -39,7 +39,7 @@ echo no)
AC_FUNC_MEMCMP
AC_FUNC_UTIME_NULL
AC_CHECK_FUNCS(mmap waitpid getcwd strdup strerror chown chmod mknod)
AC_CHECK_FUNCS(mmap
munmap
waitpid getcwd strdup strerror chown chmod mknod)
AC_CHECK_FUNCS(fchmod fstat strchr bcopy bzero readlink link utime utimes)
AC_CHECK_FUNCS(memmove getopt_long lchown setlinebuf vsnprintf setsid glob)
...
...
rsync.h
View file @
bb0f7089
...
...
@@ -142,8 +142,9 @@
#endif
#include <errno.h>
#if
def HAVE_MMAP
#if
defined(HAVE_MMAP) && defined(HAVE_MUNMAP)
#include <sys/mman.h>
#define USE_MMAP 1
#endif
#ifdef HAVE_UTIME_H
...
...
syscall.c
View file @
bb0f7089
...
...
@@ -149,7 +149,7 @@ OFF_T do_lseek(int fd, OFF_T offset, int whence)
#endif
}
#if
HAV
E_MMAP
#if
def US
E_MMAP
void
*
do_mmap
(
void
*
start
,
int
len
,
int
prot
,
int
flags
,
int
fd
,
OFF_T
offset
)
{
#if HAVE_OFF64_T
...
...
util.c
View file @
bb0f7089
...
...
@@ -46,7 +46,7 @@ struct map_struct *map_file(int fd,OFF_T len)
ret
->
p_offset
=
0
;
ret
->
p_len
=
0
;
#ifdef
HAV
E_MMAP
#ifdef
US
E_MMAP
len
=
MIN
(
len
,
MAX_MAP_SIZE
);
ret
->
map
=
(
char
*
)
do_mmap
(
NULL
,
len
,
PROT_READ
,
MAP_SHARED
,
fd
,
0
);
if
(
ret
->
map
==
(
char
*
)
-
1
)
{
...
...
@@ -69,7 +69,7 @@ char *map_ptr(struct map_struct *map,OFF_T offset,int len)
if
(
len
>
(
map
->
size
-
offset
))
len
=
map
->
size
-
offset
;
#ifdef
HAV
E_MMAP
#ifdef
US
E_MMAP
if
(
map
->
map
)
{
if
(
offset
>=
map
->
p_offset
&&
offset
+
len
<=
map
->
p_offset
+
map
->
p_len
)
{
...
...
@@ -143,7 +143,7 @@ char *map_ptr(struct map_struct *map,OFF_T offset,int len)
void
unmap_file
(
struct
map_struct
*
map
)
{
#ifdef
HAV
E_MMAP
#ifdef
US
E_MMAP
if
(
map
->
map
)
{
munmap
(
map
->
map
,
map
->
p_len
);
map
->
map
=
NULL
;
...
...
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