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
2d2414f3
Commit
2d2414f3
authored
Dec 17, 2006
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- We now define int16 and uint16.
- Make use of the [u]int{16,32,64}_t types, if they're around.
parent
edb4ba5f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
9 deletions
+38
-9
rsync.h
rsync.h
+38
-9
No files found.
rsync.h
View file @
2d2414f3
...
@@ -216,6 +216,9 @@ enum msgcode {
...
@@ -216,6 +216,9 @@ enum msgcode {
#ifdef HAVE_STRINGS_H
#ifdef HAVE_STRINGS_H
# include <strings.h>
# include <strings.h>
#endif
#endif
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
#ifdef HAVE_UNISTD_H
#ifdef HAVE_UNISTD_H
# include <unistd.h>
# include <unistd.h>
#endif
#endif
...
@@ -355,11 +358,30 @@ enum msgcode {
...
@@ -355,11 +358,30 @@ enum msgcode {
#define schar char
#define schar char
#endif
#endif
#ifndef int16
#if SIZEOF_INT16_T == 2
# define int16 int16_t
#else
# define int16 short
#endif
#endif
#ifndef uint16
#if SIZEOF_UINT16_T == 2
# define uint16 uint16_t
#else
# define uint16 unsigned int16
#endif
#endif
/* Find a variable that is either exactly 32-bits or longer.
/* Find a variable that is either exactly 32-bits or longer.
* If some code depends on 32-bit truncation, it will need to
* If some code depends on 32-bit truncation, it will need to
* take special action in a "#if SIZEOF_INT32 > 4" section. */
* take special action in a "#if SIZEOF_INT32 > 4" section. */
#ifndef int32
#ifndef int32
#if SIZEOF_INT == 4
#if SIZEOF_INT32_T == 4
# define int32 int32_t
# define SIZEOF_INT32 4
#elif SIZEOF_INT == 4
# define int32 int
# define int32 int
# define SIZEOF_INT32 4
# define SIZEOF_INT32 4
#elif SIZEOF_LONG == 4
#elif SIZEOF_LONG == 4
...
@@ -382,7 +404,11 @@ enum msgcode {
...
@@ -382,7 +404,11 @@ enum msgcode {
#endif
#endif
#ifndef uint32
#ifndef uint32
#define uint32 unsigned int32
#if SIZEOF_UINT32_T == 4
# define uint32 uint32_t
#else
# define uint32 unsigned int32
#endif
#endif
#endif
#if SIZEOF_OFF_T == 8 || !SIZEOF_OFF64_T || !defined HAVE_STRUCT_STAT64
#if SIZEOF_OFF_T == 8 || !SIZEOF_OFF64_T || !defined HAVE_STRUCT_STAT64
...
@@ -400,7 +426,10 @@ enum msgcode {
...
@@ -400,7 +426,10 @@ enum msgcode {
* to ensure that any code that really requires a 64-bit integer has
* to ensure that any code that really requires a 64-bit integer has
* it (e.g. the checksum code uses two 32-bit integers for its 64-bit
* it (e.g. the checksum code uses two 32-bit integers for its 64-bit
* counter). */
* counter). */
#if SIZEOF_LONG == 8
#if SIZEOF_INT64_T == 8
# define int64 int64_t
# define SIZEOF_INT64 8
#elif SIZEOF_LONG == 8
# define int64 long
# define int64 long
# define SIZEOF_INT64 8
# define SIZEOF_INT64 8
#elif SIZEOF_INT == 8
#elif SIZEOF_INT == 8
...
@@ -511,12 +540,12 @@ union file_extras {
...
@@ -511,12 +540,12 @@ union file_extras {
};
};
struct
file_struct
{
struct
file_struct
{
const
char
*
dirname
;
/* The dir info inside the transfer */
const
char
*
dirname
;
/* The dir info inside the transfer */
time_t
modtime
;
/* When the item was last modified */
time_t
modtime
;
/* When the item was last modified */
uint32
len32
;
/* Lowest 32 bits of the file's length */
uint32
len32
;
/* Lowest 32 bits of the file's length */
u
nsigned
short
mode
;
/* The item's type and permissions */
u
int16
mode
;
/* The item's type and permissions */
u
nsigned
short
flags
;
/* The FLAG_* bits for this item */
u
int16
flags
;
/* The FLAG_* bits for this item */
const
char
basename
[
1
];
/* The basename (AKA filename) follows */
const
char
basename
[
1
];
/* The basename (AKA filename) follows */
};
};
extern
int
flist_extra_cnt
;
extern
int
flist_extra_cnt
;
...
...
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