git://git.jankratochvil.net
/
mdsms.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changes in 1.5.2 described
[mdsms.git]
/
mdsms.c
diff --git
a/mdsms.c
b/mdsms.c
index
03f391f
..
e2b173f
100644
(file)
--- a/
mdsms.c
+++ b/
mdsms.c
@@
-69,6
+69,13
@@
static char rcsid[] ATTR_UNUSED = "$Id$";
#include "getopt.h"
#endif
#include "getopt.h"
#endif
+
+/* Always override possible system defintions as it is safe (used by glib) */
+#undef MAX
+#define MAX(a,b) ((a)>(b)?(a):(b))
+#undef MIN
+#define MIN(a,b) ((a)<(b)?(a):(b))
+
#define NELEM(x) (sizeof((x))/sizeof(*(x)))
#ifndef DEBUG
#define NELEM(x) (sizeof((x))/sizeof(*(x)))
#ifndef DEBUG
@@
-866,7
+873,7
@@
static const char *record,*recordend;
static char *catchdata;
static size_t catchdatal,catchdatasiz;
static char *catchdata;
static size_t catchdatal,catchdatasiz;
-static char *reform(const char *s,int slot);
+static c
onst c
har *reform(const char *s,int slot);
static void catched(const char *end,char edata)
{
size_t len;
static void catched(const char *end,char edata)
{
size_t len;
@@
-896,7
+903,7
@@
static void retrying(void)
if (verbose>=2) error(_(".Retrying phase, %d out of %ld.."),retrycnt,maxretryn);
}
if (verbose>=2) error(_(".Retrying phase, %d out of %ld.."),retrycnt,maxretryn);
}
-static char *reform(const char *s,int slot)
+static c
onst c
har *reform(const char *s,int slot)
{
static struct formslot {
char *s;
{
static struct formslot {
char *s;
@@
-1514,8
+1521,8
@@
retry:
static char *check_format(const char *fmt,const char *string)
{
static char err[LINE_MAX],sub[50];
static char *check_format(const char *fmt,const char *string)
{
static char err[LINE_MAX],sub[50];
-char
*subp,
cf,cs;
-const char *sf,*ss;
+char cf,cs;
+const char *sf,*ss
,*subp
;
for (sf=fmt,ss=string;(cf=*sf) && (cs=*ss);sf++,ss++) {
subp=NULL;
for (sf=fmt,ss=string;(cf=*sf) && (cs=*ss);sf++,ss++) {
subp=NULL;
@@
-1638,6
+1645,9
@@
static void signal_chld(int signo)
int status;
pid_t pid;
int status;
pid_t pid;
+ signal(SIGCHLD,(RETSIGTYPE (*)(int))signal_chld);
+ /* we don't care about siginterrupt(3) as it doesn't matter how it is set */
+
d2("signal_chld: signo=%d\n",signo);
while (0<(pid=waitpid(-1 /* ANY process */,&status,WNOHANG /* options */))) {
if (verbose>=2)
d2("signal_chld: signo=%d\n",signo);
while (0<(pid=waitpid(-1 /* ANY process */,&status,WNOHANG /* options */))) {
if (verbose>=2)
@@
-1655,7
+1665,7
@@
int i;
FILE *f;
d2("receive_text: %s\n",bodyline);
FILE *f;
d2("receive_text: %s\n",bodyline);
- signal(SIGCHLD,signal_chld);
+ signal(SIGCHLD,
(RETSIGTYPE (*)(int))
signal_chld);
#if RECEIVE_TEST
pid=0;
#else
#if RECEIVE_TEST
pid=0;
#else