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
ef82464d
Commit
ef82464d
authored
21 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Fix bugs in last commit
parent
47e3a06f
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
xtrn/sdk/xsdkwrap.c
+7
-6
7 additions, 6 deletions
xtrn/sdk/xsdkwrap.c
xtrn/sdk/xsdkwrap.h
+4
-0
4 additions, 0 deletions
xtrn/sdk/xsdkwrap.h
with
11 additions
and
6 deletions
xtrn/sdk/xsdkwrap.c
+
7
−
6
View file @
ef82464d
...
...
@@ -57,6 +57,7 @@
#include
<sys/time.h>
#include
<sys/types.h>
#include
<signal.h>
#include
<errno.h>
#endif
...
...
@@ -354,9 +355,9 @@ long filelength(int fd)
/* Sets a lock on a portion of a file */
#ifdef __QNX__
int
DLLCALL
lock
(
int
fd
,
long
pos
,
long
len
)
int
lock
(
int
fd
,
long
pos
,
long
len
)
#else
/* Not QNX */
int
DLLCALL
lock
(
int
fd
,
long
pos
,
int
len
)
int
lock
(
int
fd
,
long
pos
,
int
len
)
#endif
{
#if defined(F_SANERDLCKNO) || !defined(BSD)
...
...
@@ -393,9 +394,9 @@ int DLLCALL lock(int fd, long pos, int len)
/* Removes a lock from a file record */
#ifdef __QNX__
int
DLLCALL
unlock
(
int
fd
,
long
pos
,
long
len
)
int
unlock
(
int
fd
,
long
pos
,
long
len
)
#else
int
DLLCALL
unlock
(
int
fd
,
long
pos
,
int
len
)
int
unlock
(
int
fd
,
long
pos
,
int
len
)
#endif
{
...
...
@@ -424,14 +425,14 @@ int DLLCALL unlock(int fd, long pos, int len)
/* Opens a file in specified sharing (file-locking) mode */
#ifdef __QNX__
int
DLLCALL
qnx_sopen
(
char
*
fn
,
int
access
,
int
share
)
int
qnx_sopen
(
char
*
fn
,
int
access
,
int
share
)
{
#undef sopen
/* Stupid macro trick */
return
(
sopen
(
fn
,
access
,
share
,
S_IREAD
|
S_IWRITE
));
#define sopen(x,y,z) qnx_sopen(x,y,z)
}
#else
int
DLLCALL
sopen
(
char
*
fn
,
int
access
,
int
share
)
int
sopen
(
char
*
fn
,
int
access
,
int
share
)
{
int
fd
;
#ifndef F_SANEWRLCKNO
...
...
This diff is collapsed.
Click to expand it.
xtrn/sdk/xsdkwrap.h
+
4
−
0
View file @
ef82464d
...
...
@@ -140,9 +140,11 @@
#define O_BINARY 0
/* all files in binary mode on Unix */
#define O_DENYNONE (1<<31)
/* req'd for Baja/nopen compatibility */
#ifndef __QNX__
#define SH_DENYNO 2 // no locks
#define SH_DENYRW F_WRLCK // exclusive lock
#define SH_DENYWR F_RDLCK // shareable lock
#endif
#define stricmp(x,y) strcasecmp(x,y)
#define strnicmp(x,y,z) strncasecmp(x,y,z)
...
...
@@ -203,8 +205,10 @@
#define tell(fd) lseek(fd,0,SEEK_CUR)
#ifdef __QNX__
#include
<share.h>
int
qnx_sopen
(
char
*
fn
,
int
access
,
int
share
);
#define sopen(x,y,z) qnx_sopen(x,y,z)
#define L_SET SEEK_SET
#else
int
sopen
(
char
*
fn
,
int
access
,
int
share
);
#endif
...
...
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