Displaying 2 results from an estimated 2 matches for "string_const_aux".
2007 Jan 13
3
Default NUT PORT
In my latest patch, I hardcoded the port NUT uses for TCP communication
(3493). The reason is, that I can't figure out a way how to change the
numeric value of the #define'd PORT into a character string. Using
snprintf() and a temporary buffer just seems wrong, since this should be
handled by the preprocessor, rather than at runtime.
The following files are affected:
- server/conf.c (line
2016 Jul 11
0
Proposal for technique to stop a timer at any moment
...t *firstclient;
#define SIGCMD_STOP SIGTERM
#define SIGCMD_RELOAD SIGHUP
+/* How many user signals may be sent in a burst? RP */
+
+#define MAX_SIGUSR1 1 /* Safe */
+#define MAX_SIGUSR2 8 /* Experimental */
+
/* awkward way to make a string out of a numeric constant */
#define string_const_aux(x) #x
diff -rup nut-2.7.4.orig/server/upstype.h nut-2.7.4.dev/server/upstype.h
--- nut-2.7.4.orig/server/upstype.h 2015-12-29 13:08:34.000000000 +0100
+++ nut-2.7.4.dev/server/upstype.h 2016-06-23 16:35:18.940499226 +0200
@@ -46,6 +46,9 @@ typedef struct upstype_s {
PCONF_CTX_t sock_ctx;
str...