* cygwin.din: Add vsyslog.
* fhandler.cc (fhandler_base::write): Only make file sparse if the seeked area is >= 128K. * syslog.cc (vsyslog): New function, overtaking functionality from syslog. (syslog): Just call vsyslog. * include/cygwin/version.h: Bump API minor. * include/sys/syslog.h: Add vsyslog declaration.
This commit is contained in:
parent
b0ad6f2ba5
commit
54152c7e7e
|
@ -1,3 +1,14 @@
|
||||||
|
2003-06-06 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* cygwin.din: Add vsyslog.
|
||||||
|
* fhandler.cc (fhandler_base::write): Only make file sparse if the
|
||||||
|
seeked area is >= 128K.
|
||||||
|
* syslog.cc (vsyslog): New function, overtaking functionality from
|
||||||
|
syslog.
|
||||||
|
(syslog): Just call vsyslog.
|
||||||
|
* include/cygwin/version.h: Bump API minor.
|
||||||
|
* include/sys/syslog.h: Add vsyslog declaration.
|
||||||
|
|
||||||
2003-06-05 Christopher Faylor <cgf@redhat.com>
|
2003-06-05 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* cygthread.cc (cygthread::terminate_thread): Change system_printf to
|
* cygthread.cc (cygthread::terminate_thread): Change system_printf to
|
||||||
|
|
|
@ -1300,6 +1300,7 @@ sysconf
|
||||||
_sysconf = sysconf
|
_sysconf = sysconf
|
||||||
syslog
|
syslog
|
||||||
_syslog = syslog
|
_syslog = syslog
|
||||||
|
vsyslog
|
||||||
system
|
system
|
||||||
_system = system
|
_system = system
|
||||||
tan
|
tan
|
||||||
|
|
|
@ -629,7 +629,7 @@ fhandler_base::write (const void *ptr, size_t len)
|
||||||
if (current_position > actual_length)
|
if (current_position > actual_length)
|
||||||
{
|
{
|
||||||
if ((get_fs_flags (FILE_SUPPORTS_SPARSE_FILES))
|
if ((get_fs_flags (FILE_SUPPORTS_SPARSE_FILES))
|
||||||
&& current_position >= actual_length + (64 * 1024))
|
&& current_position >= actual_length + (128 * 1024))
|
||||||
{
|
{
|
||||||
/* If the file systemn supports sparse files and the application
|
/* If the file systemn supports sparse files and the application
|
||||||
is writing after a long seek beyond EOF, convert the file to
|
is writing after a long seek beyond EOF, convert the file to
|
||||||
|
|
|
@ -206,12 +206,13 @@ details. */
|
||||||
official release has been made so far. This change removes
|
official release has been made so far. This change removes
|
||||||
exported symbols like fopen64, which might confuse configure.
|
exported symbols like fopen64, which might confuse configure.
|
||||||
86: Export ftok
|
86: Export ftok
|
||||||
|
87: Export vsyslog
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
|
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
|
||||||
|
|
||||||
#define CYGWIN_VERSION_API_MAJOR 0
|
#define CYGWIN_VERSION_API_MAJOR 0
|
||||||
#define CYGWIN_VERSION_API_MINOR 86
|
#define CYGWIN_VERSION_API_MINOR 87
|
||||||
|
|
||||||
/* There is also a compatibity version number associated with the
|
/* There is also a compatibity version number associated with the
|
||||||
shared memory regions. It is incremented when incompatible
|
shared memory regions. It is incremented when incompatible
|
||||||
|
|
|
@ -12,6 +12,8 @@ details. */
|
||||||
#define _SYS_LOG_H
|
#define _SYS_LOG_H
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
#define LOG_EMERG 0
|
#define LOG_EMERG 0
|
||||||
#define LOG_ALERT 1
|
#define LOG_ALERT 1
|
||||||
#define LOG_CRIT 2
|
#define LOG_CRIT 2
|
||||||
|
@ -76,6 +78,7 @@ void closelog (void);
|
||||||
void openlog (const char *, int, int);
|
void openlog (const char *, int, int);
|
||||||
int setlogmask (int);
|
int setlogmask (int);
|
||||||
void syslog (int, const char *, ...);
|
void syslog (int, const char *, ...);
|
||||||
|
void vsyslog (int, const char *, va_list ap);
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -208,7 +208,7 @@ pass_handler::print_va (const char *fmt, va_list list)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern "C" void
|
extern "C" void
|
||||||
syslog (int priority, const char *message, ...)
|
vsyslog (int priority, const char *message, va_list ap)
|
||||||
{
|
{
|
||||||
debug_printf ("%x %s", priority, message);
|
debug_printf ("%x %s", priority, message);
|
||||||
/* If the priority fails the current mask, reject */
|
/* If the priority fails the current mask, reject */
|
||||||
|
@ -281,8 +281,6 @@ syslog (int priority, const char *message, ...)
|
||||||
output, then do it again to a malloc'ed string. This
|
output, then do it again to a malloc'ed string. This
|
||||||
is ugly, slow, but prevents core dumps :-).
|
is ugly, slow, but prevents core dumps :-).
|
||||||
*/
|
*/
|
||||||
va_list ap;
|
|
||||||
|
|
||||||
pass_handler pass;
|
pass_handler pass;
|
||||||
for (int pass_number = 0; pass_number < 2; ++pass_number)
|
for (int pass_number = 0; pass_number < 2; ++pass_number)
|
||||||
{
|
{
|
||||||
|
@ -341,10 +339,8 @@ syslog (int priority, const char *message, ...)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print out the variable part */
|
/* Print out the variable part */
|
||||||
va_start (ap, message);
|
|
||||||
if (pass.print_va (message, ap) == -1)
|
if (pass.print_va (message, ap) == -1)
|
||||||
return;
|
return;
|
||||||
va_end (ap);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
const char *msg_strings[1];
|
const char *msg_strings[1];
|
||||||
|
@ -408,6 +404,15 @@ syslog (int priority, const char *message, ...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C" void
|
||||||
|
syslog (int priority, const char *message, ...)
|
||||||
|
{
|
||||||
|
va_list ap;
|
||||||
|
va_start (ap, message);
|
||||||
|
vsyslog (priority, message, ap);
|
||||||
|
va_end (ap);
|
||||||
|
}
|
||||||
|
|
||||||
extern "C" void
|
extern "C" void
|
||||||
closelog (void)
|
closelog (void)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue