Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
70f23b74
Commit
70f23b74
authored
5 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Eliminate DLLCALL macro usage from this module.
parent
a1db507d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/xpdev/filewrap.c
+8
-8
8 additions, 8 deletions
src/xpdev/filewrap.c
src/xpdev/filewrap.h
+10
-10
10 additions, 10 deletions
src/xpdev/filewrap.h
with
18 additions
and
18 deletions
src/xpdev/filewrap.c
+
8
−
8
View file @
70f23b74
...
...
@@ -60,7 +60,7 @@
/* Returns the modification time of the file in 'fd' */
/* or -1 if file doesn't exist. */
/****************************************************************************/
time_t
DLLCALL
filetime
(
int
fd
)
time_t
filetime
(
int
fd
)
{
struct
stat
st
;
...
...
@@ -76,7 +76,7 @@ time_t DLLCALL filetime(int fd)
/* Returns the length of the file in 'fd' */
/* or -1 if file doesn't exist. */
/****************************************************************************/
off_t
DLLCALL
filelength
(
int
fd
)
off_t
filelength
(
int
fd
)
{
struct
stat
st
;
...
...
@@ -92,7 +92,7 @@ off_t DLLCALL filelength(int fd)
#endif
/* Sets a lock on a portion of a file */
int
DLLCALL
lock
(
int
fd
,
off_t
pos
,
off_t
len
)
int
lock
(
int
fd
,
off_t
pos
,
off_t
len
)
{
#if defined(F_SANERDLCKNO) || !defined(BSD)
struct
flock
alock
=
{
0
};
...
...
@@ -135,7 +135,7 @@ int DLLCALL lock(int fd, off_t pos, off_t len)
}
/* Removes a lock from a file record */
int
DLLCALL
unlock
(
int
fd
,
off_t
pos
,
off_t
len
)
int
unlock
(
int
fd
,
off_t
pos
,
off_t
len
)
{
#if defined(F_SANEUNLCK) || !defined(BSD)
...
...
@@ -207,7 +207,7 @@ int DLLCALL unlock(int fd, off_t pos, off_t len)
* 2 = open succeeds if file read-only, else fails with INT 24
*/
#if !defined(__QNX__)
int
DLLCALL
sopen
(
const
char
*
fn
,
int
sh_access
,
int
share
,
...)
int
sopen
(
const
char
*
fn
,
int
sh_access
,
int
share
,
...)
{
int
fd
;
int
pmode
=
S_IREAD
;
...
...
@@ -276,7 +276,7 @@ int DLLCALL sopen(const char *fn, int sh_access, int share, ...)
#define LK_UNLCK LK_UNLOCK
#endif
int
DLLCALL
lock
(
int
file
,
off_t
offset
,
off_t
size
)
int
lock
(
int
file
,
off_t
offset
,
off_t
size
)
{
int
i
;
off_t
pos
;
...
...
@@ -290,7 +290,7 @@ int DLLCALL lock(int file, off_t offset, off_t size)
return
(
i
);
}
int
DLLCALL
unlock
(
int
file
,
off_t
offset
,
off_t
size
)
int
unlock
(
int
file
,
off_t
offset
,
off_t
size
)
{
int
i
;
off_t
pos
;
...
...
@@ -346,7 +346,7 @@ static int expandtofit(char **linep, size_t len, size_t *linecapp)
return
0
;
}
long
DLLCALL
getdelim
(
char
**
linep
,
size_t
*
linecapp
,
int
delimiter
,
FILE
*
stream
)
long
getdelim
(
char
**
linep
,
size_t
*
linecapp
,
int
delimiter
,
FILE
*
stream
)
{
size_t
linelen
;
int
ch
;
...
...
This diff is collapsed.
Click to expand it.
src/xpdev/filewrap.h
+
10
−
10
View file @
70f23b74
...
...
@@ -38,7 +38,7 @@
#ifndef _FILEWRAP_H
#define _FILEWRAP_H
#include
"wrapdll.h"
/* DLLEXPORT
and DLLCALL
*/
#include
"wrapdll.h"
/* DLLEXPORT */
#include
"gen_defs.h"
/* int32_t, int64_t */
#include
<sys/stat.h>
/* S_IREAD and S_IWRITE (for use with sopen) */
...
...
@@ -162,29 +162,29 @@ extern "C" {
#endif
#if !defined(__BORLANDC__) && !defined(__WATCOMC__)
DLLEXPORT
int
DLLCALL
lock
(
int
fd
,
off_t
pos
,
off_t
len
);
DLLEXPORT
int
DLLCALL
unlock
(
int
fd
,
off_t
pos
,
off_t
len
);
DLLEXPORT
int
lock
(
int
fd
,
off_t
pos
,
off_t
len
);
DLLEXPORT
int
unlock
(
int
fd
,
off_t
pos
,
off_t
len
);
#endif
#if defined(_WIN32 )
DLLEXPORT
long
DLLCALL
getdelim
(
char
**
linep
,
size_t
*
linecapp
,
int
delimiter
,
FILE
*
stream
);
DLLEXPORT
long
getdelim
(
char
**
linep
,
size_t
*
linecapp
,
int
delimiter
,
FILE
*
stream
);
#endif
#if !defined(__BORLANDC__) && defined(__unix__)
DLLEXPORT
int
DLLCALL
sopen
(
const
char
*
fn
,
int
sh_access
,
int
share
,
...);
DLLEXPORT
off_t
DLLCALL
filelength
(
int
fd
);
DLLEXPORT
int
sopen
(
const
char
*
fn
,
int
sh_access
,
int
share
,
...);
DLLEXPORT
off_t
filelength
(
int
fd
);
#endif
#if defined(__unix__)
DLLEXPORT
FILE
*
DLLCALL
_fsopen
(
const
char
*
pszFilename
,
const
char
*
pszMode
,
int
shmode
);
DLLEXPORT
FILE
*
_fsopen
(
const
char
*
pszFilename
,
const
char
*
pszMode
,
int
shmode
);
#endif
#if defined(_MSC_VER) && (_MSC_VER < 1300)
/* missing prototypes */
DLLEXPORT
int
DLLCALL
_fseeki64
(
FILE
*
,
int64_t
,
int
origin
);
DLLEXPORT
int64_t
DLLCALL
_ftelli64
(
FILE
*
);
DLLEXPORT
int
_fseeki64
(
FILE
*
,
int64_t
,
int
origin
);
DLLEXPORT
int64_t
_ftelli64
(
FILE
*
);
#endif
DLLEXPORT
time_t
DLLCALL
filetime
(
int
fd
);
DLLEXPORT
time_t
filetime
(
int
fd
);
#if defined(__cplusplus)
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment