Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog11
-rw-r--r--winsup/cygwin/cygwin.din1
-rw-r--r--winsup/cygwin/fhandler.cc2
-rw-r--r--winsup/cygwin/include/cygwin/version.h3
-rw-r--r--winsup/cygwin/include/sys/syslog.h3
-rw-r--r--winsup/cygwin/syslog.cc15
6 files changed, 28 insertions, 7 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index fdce9f451..1588f3628 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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>
* cygthread.cc (cygthread::terminate_thread): Change system_printf to
diff --git a/winsup/cygwin/cygwin.din b/winsup/cygwin/cygwin.din
index 7cfe275a2..4deddb84f 100644
--- a/winsup/cygwin/cygwin.din
+++ b/winsup/cygwin/cygwin.din
@@ -1300,6 +1300,7 @@ sysconf
_sysconf = sysconf
syslog
_syslog = syslog
+vsyslog
system
_system = system
tan
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index ac0dfd581..8142cfa27 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -629,7 +629,7 @@ fhandler_base::write (const void *ptr, size_t len)
if (current_position > actual_length)
{
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
is writing after a long seek beyond EOF, convert the file to
diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h
index 50646dc5a..6caafea66 100644
--- a/winsup/cygwin/include/cygwin/version.h
+++ b/winsup/cygwin/include/cygwin/version.h
@@ -206,12 +206,13 @@ details. */
official release has been made so far. This change removes
exported symbols like fopen64, which might confuse configure.
86: Export ftok
+ 87: Export vsyslog
*/
/* Note that we forgot to bump the api for ualarm, strtoll, strtoull */
#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
shared memory regions. It is incremented when incompatible
diff --git a/winsup/cygwin/include/sys/syslog.h b/winsup/cygwin/include/sys/syslog.h
index f3195175e..a37b042d7 100644
--- a/winsup/cygwin/include/sys/syslog.h
+++ b/winsup/cygwin/include/sys/syslog.h
@@ -12,6 +12,8 @@ details. */
#define _SYS_LOG_H
#include <sys/cdefs.h>
+#include <stdarg.h>
+
#define LOG_EMERG 0
#define LOG_ALERT 1
#define LOG_CRIT 2
@@ -76,6 +78,7 @@ void closelog (void);
void openlog (const char *, int, int);
int setlogmask (int);
void syslog (int, const char *, ...);
+void vsyslog (int, const char *, va_list ap);
__END_DECLS
diff --git a/winsup/cygwin/syslog.cc b/winsup/cygwin/syslog.cc
index b39640524..b87ff6699 100644
--- a/winsup/cygwin/syslog.cc
+++ b/winsup/cygwin/syslog.cc
@@ -208,7 +208,7 @@ pass_handler::print_va (const char *fmt, va_list list)
*/
extern "C" void
-syslog (int priority, const char *message, ...)
+vsyslog (int priority, const char *message, va_list ap)
{
debug_printf ("%x %s", priority, message);
/* 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
is ugly, slow, but prevents core dumps :-).
*/
- va_list ap;
-
pass_handler pass;
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 */
- va_start (ap, message);
if (pass.print_va (message, ap) == -1)
return;
- va_end (ap);
}
const char *msg_strings[1];
@@ -409,6 +405,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
closelog (void)
{
;