File: set_unbuffered_mode.c

package info (click to toggle)
mdds 3.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,828 kB
  • sloc: cpp: 21,913; exp: 6,696; makefile: 698; ansic: 616; python: 602; sh: 428; lisp: 8
file content (15 lines) | stat: -rw-r--r-- 392 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// SPDX-FileCopyrightText: 2008 - 2012 Free Software Foundation, Inc.
//
// SPDX-License-Identifier: GPL-3.0-or-later

/* Force outputs to unbuffered mode.  */

#include <stdio.h>

static int __gdb_set_unbuffered_output (void) __attribute__ ((constructor));
static int
__gdb_set_unbuffered_output (void)
{
  setvbuf (stdout, NULL, _IONBF, BUFSIZ);
  setvbuf (stderr, NULL, _IONBF, BUFSIZ);
}