]> granicus.if.org Git - php/commitdiff
fix syslog interference
authorAnatol Belski <ab@php.net>
Thu, 13 Oct 2016 12:38:51 +0000 (14:38 +0200)
committerAnatol Belski <ab@php.net>
Thu, 13 Oct 2016 12:40:37 +0000 (14:40 +0200)
ext/gd/gd.c
ext/gd/libgd/gd.c
ext/gd/libgd/gd_errors.h

index 8e2d088598888ce572698517a6f0453594fefdae..d214f3ccc11b663689e315ca4f8fd970186566f6 100644 (file)
@@ -1032,8 +1032,10 @@ void php_gd_error_method(int type, const char *format, va_list args)
 {
 
        switch (type) {
+#ifndef PHP_WIN32
                case GD_DEBUG:
                case GD_INFO:
+#endif
                case GD_NOTICE:
                        type = E_NOTICE;
                        break;
index ddf3b5b83bf7013f5b9a8dd17ee66cfc1263016c..4639fac713a1e8a85761669309918a8b298a7576 100644 (file)
@@ -108,12 +108,14 @@ void gd_stderr_error(int priority, const char *format, va_list args)
        case GD_NOTICE:
                fputs("GD Notice: ", stderr);
                break;
+#ifndef PHP_WIN32
        case GD_INFO:
                fputs("GD Info: ", stderr);
                break;
        case GD_DEBUG:
                fputs("GD Debug: ", stderr);
                break;
+#endif
        }
        vfprintf(stderr, format, args);
        fflush(stderr);
index 4ecee94b386386821c48342e10c3fecd9f23f52d..8a28bf605197a1a61ba3b06d5cbadccefeeece31 100644 (file)
@@ -4,23 +4,7 @@
 #ifndef _WIN32
 # include <syslog.h>
 #else
-/*
- * priorities/facilities are encoded into a single 32-bit quantity, where the
- * bottom 3 bits are the priority (0-7) and the top 28 bits are the facility
- * (0-big number).  Both the priorities and the facilities map roughly
- * one-to-one to strings in the syslogd(8) source code.  This mapping is
- * included in this file.
- *
- * priorities (these are ordered)
- */
-# define LOG_EMERG       0       /* system is unusable */
-# define LOG_ALERT       1       /* action must be taken immediately */
-# define LOG_CRIT        2       /* critical conditions */
-# define LOG_ERR         3       /* error conditions */
-# define LOG_WARNING     4       /* warning conditions */
-# define LOG_NOTICE      5       /* normal but significant condition */
-# define LOG_INFO        6       /* informational */
-# define LOG_DEBUG       7       /* debug-level messages */
+# include "win32/syslog.h"
 #endif
 
 /*