mirror of
https://github.com/GnoConsortium/gno.git
synced 2024-12-27 00:29:55 +00:00
stdio.h:
Changed some '0' constants to '0L'. Probably not necessary, but consider it paranoia from earlier ORCA/C bugs. sys/syslog.h: These changes reflect the new implementation for syslog(3) and friends. The biggest change is that the facility/priority (which is encoded as a single number) requires 32 bits, so has been moved from an int value to a long value. This means that any programs using syslog(3) cannot merely be relinked, but will need to be recompiled. This file also contained various constants coded as bitshift values, like (4<<3). ORCA/C can't handle this in the context of a constant initializer, so these constants have been resolved and changed to single hex values. The originals are left in comments. sys/uio.h: - #include <sys/types.h> if it has not already been done. - change the return value of readv/writev back from size_t to ssize_t. I don't recall why they were originally changed, given that they weren't implemented and BSD uses ssize_t.
This commit is contained in:
parent
c6c45722d8
commit
4e1bec2062
@ -332,8 +332,8 @@ FILE *funopen __P((const void *,
|
|||||||
fpos_t (*)(void *, fpos_t, int),
|
fpos_t (*)(void *, fpos_t, int),
|
||||||
int (*)(void *)));
|
int (*)(void *)));
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
#define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0)
|
#define fropen(cookie, fn) funopen(cookie, fn, 0L, 0L, 0L)
|
||||||
#define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0)
|
#define fwopen(cookie, fn) funopen(cookie, 0L, fn, 0L, 0L)
|
||||||
#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */
|
#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -31,13 +31,17 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* @(#)syslog.h 8.1 (Berkeley) 6/2/93
|
* @(#)syslog.h 8.1 (Berkeley) 6/2/93
|
||||||
* $Id: syslog.h,v 1.1 1997/02/28 04:42:15 gdr Exp $
|
* $Id: syslog.h,v 1.2 1998/06/24 00:12:30 gdr-ftp Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _SYS_SYSLOG_H_
|
#ifndef _SYS_SYSLOG_H_
|
||||||
#define _SYS_SYSLOG_H_
|
#define _SYS_SYSLOG_H_
|
||||||
|
|
||||||
|
#ifdef __appleiigs__
|
||||||
|
#define _PATH_LOG ".syslog"
|
||||||
|
#else
|
||||||
#define _PATH_LOG "/dev/log"
|
#define _PATH_LOG "/dev/log"
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* priorities/facilities are encoded into a single 32-bit quantity, where the
|
* priorities/facilities are encoded into a single 32-bit quantity, where the
|
||||||
@ -68,7 +72,7 @@
|
|||||||
#define INTERNAL_MARK LOG_MAKEPRI(LOG_NFACILITIES, 0)
|
#define INTERNAL_MARK LOG_MAKEPRI(LOG_NFACILITIES, 0)
|
||||||
typedef struct _code {
|
typedef struct _code {
|
||||||
char *c_name;
|
char *c_name;
|
||||||
int c_val;
|
long c_val;
|
||||||
} CODE;
|
} CODE;
|
||||||
|
|
||||||
CODE prioritynames[] = {
|
CODE prioritynames[] = {
|
||||||
@ -88,29 +92,58 @@ CODE prioritynames[] = {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The only code that should ever define __SYSLOG_INTERNALS is syslogd(8) and
|
||||||
|
* the syslog(3) implementation in libc.
|
||||||
|
*/
|
||||||
|
#ifdef __SYSLOG_INTERNALS
|
||||||
|
|
||||||
|
#ifndef _SYS_TYPES_H_
|
||||||
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Identifier used bye the kernel ports interface. Only the first 32
|
||||||
|
* characters are significant!
|
||||||
|
*/
|
||||||
|
#define __SYSLOG_PORT_NAME "syslogd_v2"
|
||||||
|
|
||||||
|
/* Max number of characters that syslog(3) will log per call. */
|
||||||
|
#define MSG_BUF_LEN 1024
|
||||||
|
#define SYSLOG_MAGIC 0xB38F0E32
|
||||||
|
|
||||||
|
typedef struct SyslogDataBuffer_t {
|
||||||
|
unsigned long magic;
|
||||||
|
int len;
|
||||||
|
pid_t sender;
|
||||||
|
char msg_buffer[MSG_BUF_LEN];
|
||||||
|
} SyslogDataBuffer_t;
|
||||||
|
|
||||||
|
#endif /* __SYSLOG_INTERNALS */
|
||||||
|
|
||||||
/* facility codes */
|
/* facility codes */
|
||||||
#define LOG_KERN (0<<3) /* kernel messages */
|
#define LOG_KERN 0x00 /* (0<<3) kernel messages */
|
||||||
#define LOG_USER (1<<3) /* random user-level messages */
|
#define LOG_USER 0x08 /* (1<<3) random user-level messages */
|
||||||
#define LOG_MAIL (2<<3) /* mail system */
|
#define LOG_MAIL 0x10 /* (2<<3) mail system */
|
||||||
#define LOG_DAEMON (3<<3) /* system daemons */
|
#define LOG_DAEMON 0x18 /* (3<<3) system daemons */
|
||||||
#define LOG_AUTH (4<<3) /* security/authorization messages */
|
#define LOG_AUTH 0x20 /* (4<<3) security/authorization messages */
|
||||||
#define LOG_SYSLOG (5<<3) /* messages generated internally by syslogd */
|
#define LOG_SYSLOG 0x28 /* (5<<3) messages generated internally by syslogd */
|
||||||
#define LOG_LPR (6<<3) /* line printer subsystem */
|
#define LOG_LPR 0x30 /* (6<<3) line printer subsystem */
|
||||||
#define LOG_NEWS (7<<3) /* network news subsystem */
|
#define LOG_NEWS 0x38 /* (7<<3) network news subsystem */
|
||||||
#define LOG_UUCP (8<<3) /* UUCP subsystem */
|
#define LOG_UUCP 0x40 /* (8<<3) UUCP subsystem */
|
||||||
#define LOG_CRON (9<<3) /* clock daemon */
|
#define LOG_CRON 0x48 /* (9<<3) clock daemon */
|
||||||
#define LOG_AUTHPRIV (10<<3) /* security/authorization messages (private) */
|
#define LOG_AUTHPRIV 0x50 /* (10<<3) security/authorization messages (private) */
|
||||||
#define LOG_FTP (11<<3) /* ftp daemon */
|
#define LOG_FTP 0x58 /* (11<<3) ftp daemon */
|
||||||
|
|
||||||
/* other codes through 15 reserved for system use */
|
/* other codes through 15 reserved for system use */
|
||||||
#define LOG_LOCAL0 (16<<3) /* reserved for local use */
|
#define LOG_LOCAL0 0x80 /* (16<<3) reserved for local use */
|
||||||
#define LOG_LOCAL1 (17<<3) /* reserved for local use */
|
#define LOG_LOCAL1 0x88 /* (17<<3) reserved for local use */
|
||||||
#define LOG_LOCAL2 (18<<3) /* reserved for local use */
|
#define LOG_LOCAL2 0x90 /* (18<<3) reserved for local use */
|
||||||
#define LOG_LOCAL3 (19<<3) /* reserved for local use */
|
#define LOG_LOCAL3 0x98 /* (19<<3) reserved for local use */
|
||||||
#define LOG_LOCAL4 (20<<3) /* reserved for local use */
|
#define LOG_LOCAL4 0xA0 /* (20<<3) reserved for local use */
|
||||||
#define LOG_LOCAL5 (21<<3) /* reserved for local use */
|
#define LOG_LOCAL5 0xA8 /* (21<<3) reserved for local use */
|
||||||
#define LOG_LOCAL6 (22<<3) /* reserved for local use */
|
#define LOG_LOCAL6 0xB0 /* (22<<3) reserved for local use */
|
||||||
#define LOG_LOCAL7 (23<<3) /* reserved for local use */
|
#define LOG_LOCAL7 0xB8 /* (23<<3) reserved for local use */
|
||||||
|
|
||||||
#define LOG_NFACILITIES 24 /* current number of facilities */
|
#define LOG_NFACILITIES 24 /* current number of facilities */
|
||||||
#define LOG_FACMASK 0x03f8 /* mask to extract facility part */
|
#define LOG_FACMASK 0x03f8 /* mask to extract facility part */
|
||||||
@ -188,10 +221,10 @@ CODE facilitynames[] = {
|
|||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
void closelog __P((void));
|
void closelog __P((void));
|
||||||
void openlog __P((const char *, int, int));
|
void openlog __P((const char *, int, long));
|
||||||
int setlogmask __P((int));
|
long setlogmask __P((long));
|
||||||
void syslog __P((int, const char *, ...));
|
void syslog __P((long, const char *, ...));
|
||||||
void vsyslog __P((int, const char *, _BSD_VA_LIST_));
|
void vsyslog __P((long, const char *, _BSD_VA_LIST_));
|
||||||
#ifndef _POSIX_SOURCE
|
#ifndef _POSIX_SOURCE
|
||||||
void old_syslog __P((char **dataHandle)); /* GNO-specific */
|
void old_syslog __P((char **dataHandle)); /* GNO-specific */
|
||||||
#endif
|
#endif
|
||||||
|
@ -31,12 +31,16 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* @(#)uio.h 8.5 (Berkeley) 2/22/94
|
* @(#)uio.h 8.5 (Berkeley) 2/22/94
|
||||||
* $Id: uio.h,v 1.1 1997/02/28 04:42:17 gdr Exp $
|
* $Id: uio.h,v 1.2 1998/06/24 00:12:32 gdr-ftp Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _SYS_UIO_H_
|
#ifndef _SYS_UIO_H_
|
||||||
#define _SYS_UIO_H_
|
#define _SYS_UIO_H_
|
||||||
|
|
||||||
|
#ifndef _SYS_TYPES_H_
|
||||||
|
#include <sys/types.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* XXX
|
* XXX
|
||||||
* iov_base should be a void *.
|
* iov_base should be a void *.
|
||||||
@ -85,8 +89,8 @@ int uiomove __P((caddr_t, int, struct uio *));
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
__BEGIN_DECLS
|
__BEGIN_DECLS
|
||||||
size_t readv __P((int, const struct iovec *, int)); /* non-BSD */
|
ssize_t readv __P((int, const struct iovec *, int));
|
||||||
size_t writev __P((int, const struct iovec *, int)); /* non-BSD */
|
ssize_t writev __P((int, const struct iovec *, int));
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
#endif /* KERNEL */
|
#endif /* KERNEL */
|
||||||
|
Loading…
Reference in New Issue
Block a user