fixed a build issue for missing lchown against old macosx sdks
added Awk::writeConsoleBytes(), Awk::writePipeBytes(), Awk::writeFileBytes()
This commit is contained in:
@ -2020,6 +2020,12 @@ Awk::ssize_t Awk::writePipe (Pipe& io, const char_t* buf, size_t len)
|
||||
return -1;
|
||||
}
|
||||
|
||||
Awk::ssize_t Awk::writePipeBytes (Pipe& io, const qse_mchar_t* buf, size_t len)
|
||||
{
|
||||
((Run*)io)->setError (QSE_AWK_ENOIMPL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int Awk::flushPipe (Pipe& io)
|
||||
{
|
||||
((Run*)io)->setError (QSE_AWK_ENOIMPL);
|
||||
@ -2050,6 +2056,12 @@ Awk::ssize_t Awk::writeFile (File& io, const char_t* buf, size_t len)
|
||||
return -1;
|
||||
}
|
||||
|
||||
Awk::ssize_t Awk::writeFileBytes (File& io, const qse_mchar_t* buf, size_t len)
|
||||
{
|
||||
((Run*)io)->setError (QSE_AWK_ENOIMPL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int Awk::flushFile (File& io)
|
||||
{
|
||||
((Run*)io)->setError (QSE_AWK_ENOIMPL);
|
||||
@ -2080,6 +2092,12 @@ Awk::ssize_t Awk::writeConsole (Console& io, const char_t* buf, size_t len)
|
||||
return -1;
|
||||
}
|
||||
|
||||
Awk::ssize_t Awk::writeConsoleBytes (Console& io, const qse_mchar_t* buf, size_t len)
|
||||
{
|
||||
((Run*)io)->setError (QSE_AWK_ENOIMPL);
|
||||
return -1;
|
||||
}
|
||||
|
||||
int Awk::flushConsole (Console& io)
|
||||
{
|
||||
((Run*)io)->setError (QSE_AWK_ENOIMPL);
|
||||
|
@ -338,7 +338,10 @@
|
||||
# define QSE_CHROOT(path) QSE_LIBCALL1(chroot,path)
|
||||
#endif
|
||||
|
||||
#if defined(SYS_lchown) && defined(QSE_USE_SYSCALL)
|
||||
#if !defined(SYS_lchown) && !defined(HAVE_LCHOWN) && defined(__APPLE__) && defined(__MACH__) && defined(__POWERPC__)
|
||||
/* special handling for old darwin/macosx sdks */
|
||||
# define QSE_LCHOWN(path,owner,group) syscall(364,path,owner,group)
|
||||
#elif defined(SYS_lchown) && defined(QSE_USE_SYSCALL)
|
||||
# define QSE_LCHOWN(path,owner,group) syscall(SYS_lchown,path,owner,group)
|
||||
#else
|
||||
# define QSE_LCHOWN(path,owner,group) QSE_LIBCALL3(lchown,path,owner,group)
|
||||
|
@ -346,9 +346,9 @@ int qse_fs_setattrsys (qse_fs_t* fs, qse_fs_char_t* path, const qse_fattr_t* att
|
||||
int x;
|
||||
|
||||
if (flags & QSE_FILE_ATTR_SYMLINK)
|
||||
x = QSE_LCHOWN (path, attr->uid, attr->gid);
|
||||
x = QSE_LCHOWN(path, attr->uid, attr->gid);
|
||||
else
|
||||
x = QSE_CHOWN (path, attr->uid, attr->gid);
|
||||
x = QSE_CHOWN(path, attr->uid, attr->gid);
|
||||
|
||||
if (x <= -1)
|
||||
{
|
||||
|
@ -34,6 +34,7 @@
|
||||
/* TODO: windows event log */
|
||||
#else
|
||||
#include <syslog.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/un.h>
|
||||
|
@ -35,6 +35,7 @@
|
||||
#else
|
||||
# include <setjmp.h>
|
||||
# if defined(HAVE_UCONTEXT_H)
|
||||
# include <signal.h> /* for old DARWIN/MACOSX */
|
||||
# include <ucontext.h>
|
||||
# endif
|
||||
# if defined(HAVE_MAKECONTEXT) && defined(HAVE_SWAPCONTEXT) && \
|
||||
|
Reference in New Issue
Block a user