mirror of
https://github.com/samba-team/samba.git
synced 2025-12-06 16:23:49 +03:00
r18343: fixed setlinebuf() prototype, added test for it, and use it in two
places to avoid a #ifdef
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
e191f84f24
commit
095b805774
@@ -338,9 +338,9 @@ char *rep_inet_ntoa(struct in_addr ip)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_SETLINEBUF
|
#ifndef HAVE_SETLINEBUF
|
||||||
int rep_setlinebuf(FILE *stream)
|
void rep_setlinebuf(FILE *stream)
|
||||||
{
|
{
|
||||||
return setvbuf(stream, (char *)NULL, _IOLBF, 0);
|
setvbuf(stream, (char *)NULL, _IOLBF, 0);
|
||||||
}
|
}
|
||||||
#endif /* HAVE_SETLINEBUF */
|
#endif /* HAVE_SETLINEBUF */
|
||||||
|
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ int rep_setegid(gid_t);
|
|||||||
|
|
||||||
#ifndef HAVE_SETLINEBUF
|
#ifndef HAVE_SETLINEBUF
|
||||||
#define setlinebuf rep_setlinebuf
|
#define setlinebuf rep_setlinebuf
|
||||||
int rep_setlinebuf(FILE *);
|
void rep_setlinebuf(FILE *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_STRCASESTR
|
#ifndef HAVE_STRCASESTR
|
||||||
|
|||||||
@@ -146,7 +146,8 @@ static int test_strdup(void)
|
|||||||
|
|
||||||
static int test_setlinebuf(void)
|
static int test_setlinebuf(void)
|
||||||
{
|
{
|
||||||
/* FIXME */
|
printf("testing setlinebuf\n");
|
||||||
|
setlinebuf(stdout);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -413,9 +413,7 @@ const static struct torture_ui_ops quiet_ui_ops = {
|
|||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef HAVE_SETBUFFER
|
setlinebuf(stdout);
|
||||||
setbuffer(stdout, NULL, 0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* we are never interested in SIGPIPE */
|
/* we are never interested in SIGPIPE */
|
||||||
BlockSignals(True,SIGPIPE);
|
BlockSignals(True,SIGPIPE);
|
||||||
|
|||||||
@@ -151,9 +151,7 @@ static int binary_net(int argc, const char **argv)
|
|||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef HAVE_SETBUFFER
|
setlinebuf(stdout);
|
||||||
setbuffer(stdout, NULL, 0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
pc = poptGetContext("net", argc, (const char **) argv, long_options,
|
pc = poptGetContext("net", argc, (const char **) argv, long_options,
|
||||||
POPT_CONTEXT_KEEP_FIRST);
|
POPT_CONTEXT_KEEP_FIRST);
|
||||||
|
|||||||
Reference in New Issue
Block a user