git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
AcessNative - Changes to allow _compiling_ on windows.
[tpg/acess2.git]
/
AcessNative
/
ld-acess_src
/
syscalls.c
diff --git
a/AcessNative/ld-acess_src/syscalls.c
b/AcessNative/ld-acess_src/syscalls.c
index
3c691aa
..
6680186
100644
(file)
--- a/
AcessNative/ld-acess_src/syscalls.c
+++ b/
AcessNative/ld-acess_src/syscalls.c
@@
-108,7
+108,7
@@
const char *ReadEntry(tRequestValue *Dest, void *DataDest, void **PtrDest, const
break;
// Data (special handling)
case 'd':
break;
// Data (special handling)
case 'd':
- len = va_arg(*Args,
in
t);
+ len = va_arg(*Args,
size_
t);
str = va_arg(*Args, char*);
// Save the pointer for later
str = va_arg(*Args, char*);
// Save the pointer for later
@@
-116,7
+116,7
@@
const char *ReadEntry(tRequestValue *Dest, void *DataDest, void **PtrDest, const
// Create parameter block
Dest->Type = ARG_TYPE_DATA;
// Create parameter block
Dest->Type = ARG_TYPE_DATA;
- Dest->Length =
len
;
+ Dest->Length =
str ? len : 0
;
Dest->Flags = 0;
if( direction & 2 )
Dest->Flags |= ARG_FLAG_RETURN;
Dest->Flags = 0;
if( direction & 2 )
Dest->Flags |= ARG_FLAG_RETURN;
@@
-124,7
+124,7
@@
const char *ReadEntry(tRequestValue *Dest, void *DataDest, void **PtrDest, const
// Has data?
if( direction & 1 )
{
// Has data?
if( direction & 1 )
{
- if( DataDest )
+ if( DataDest
&& str
)
memcpy(DataDest, str, len);
}
else
memcpy(DataDest, str, len);
}
else
@@
-270,7
+270,7
@@
uint64_t _Syscall(int SyscallID, const char *ArgTypes, ...)
free( req );
free( retPtrs );
free( req );
free( retPtrs );
- DEBUG(": %
llx"
, retValue);
+ DEBUG(": %
i 0x%llx", SyscallID
, retValue);
return retValue;
}
return retValue;
}
@@
-318,7
+318,7
@@
uint64_t native_tell(int FD)
return ftell( gaSyscall_LocalFPs[FD] );
}
return ftell( gaSyscall_LocalFPs[FD] );
}
-int native_execve(const char *filename, c
har *const argv[],
char *const envp[])
+int native_execve(const char *filename, c
onst char *const argv[], const
char *const envp[])
{
int ret;
ret = execve(filename, argv, envp);
{
int ret;
ret = execve(filename, argv, envp);
UCC
git Repository :: git.ucc.asn.au