Explorar o código

syslog.h: allow prioritynames[]/facilitynames[] to be defined const
(selectable by #defining SYSLOG_NAMES_CONST)

Denis Vlasenko %!s(int64=17) %!d(string=hai) anos
pai
achega
a903e9ba46
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      include/sys/syslog.h

+ 6 - 0
include/sys/syslog.h

@@ -71,6 +71,9 @@ typedef struct _code {
 	int	c_val;
 } CODE;
 
+#ifdef SYSLOG_NAMES_CONST
+const
+#endif
 CODE prioritynames[] =
   {
     { "alert", LOG_ALERT },
@@ -119,6 +122,9 @@ CODE prioritynames[] =
 #define	LOG_FAC(p)	(((p) & LOG_FACMASK) >> 3)
 
 #ifdef SYSLOG_NAMES
+#ifdef SYSLOG_NAMES_CONST
+const
+#endif
 CODE facilitynames[] =
   {
     { "auth", LOG_AUTH },