Back to index

glibc  2.9
Defines | Functions | Variables
bug-fseek.c File Reference
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <test-skeleton.c>

Go to the source code of this file.


#define PREPARE(argc, argv)   do_prepare ()
#define TEST_FUNCTION   do_test ()


static void do_prepare (void)
static int do_test (void)


static char * fname

Define Documentation

#define PREPARE (   argc,
)    do_prepare ()

Definition at line 11 of file bug-fseek.c.

#define TEST_FUNCTION   do_test ()

Definition at line 13 of file bug-fseek.c.

Function Documentation

static void do_prepare ( void  ) [static]

Definition at line 18 of file bug-fseek.c.

  static const char pattern[] = "12345678901234567890";
  int fd = create_temp_file ("bug-fseek.", &fname);
  if (fd == -1)
      printf ("cannot create temporary file: %m\n");
      exit (1);

  if (write (fd, pattern, sizeof (pattern)) != sizeof (pattern))
      perror ("short write");
      abort ();
  close (fd);

Here is the call graph for this function:

static int do_test ( void  ) [static]

Variable Documentation

char* fname [static]

Definition at line 7 of file bug-fseek.c.