~motumedia/xine-ui/ubuntu

« back to all changes in this revision

Viewing changes to src/common/getline.c

  • Committer: dgp85
  • Date: 2006-07-06 17:13:59 UTC
  • Revision ID: dgp85-20060706171359-617bbbe85dbb8a66
[xine-ui @ 2006-07-06 17:13:59 by dgp85]
The AC_REPLACE_FUNCS situation does not work, so replace it with some working #ifdef code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *
6
6
 */
7
7
 
 
8
#include <config.h>
 
9
 
 
10
#ifndef HAVE_GETLINE
 
11
 
8
12
#include <stdlib.h>
9
13
#include <stdio.h>
10
14
#include <errno.h>
12
16
 
13
17
#define BLOCK_SIZE 128
14
18
 
15
 
 
16
19
ssize_t getdelims(char **lineptr, size_t *n, const char *delims, FILE *stream) {
17
20
  void *tmp;
18
21
  int c;
46
49
ssize_t getline(char **lineptr, size_t *n, FILE *stream) {
47
50
  return getdelims(lineptr, n, "\n\r", stream);
48
51
}
 
52
 
 
53
#endif