Back to index

glibc  2.9
Defines | Functions | Variables
tst-mmap-offend.c File Reference
#include <stdio.h>
#include <error.h>
#include <errno.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 * temp_file
static const char text1 [] = "hello\n"

Define Documentation

#define PREPARE (   argc,
)    do_prepare ()

Definition at line 8 of file tst-mmap-offend.c.

#define TEST_FUNCTION   do_test ()

Definition at line 10 of file tst-mmap-offend.c.

Function Documentation

static void do_prepare ( void  ) [static]

Definition at line 18 of file tst-mmap-offend.c.

  int temp_fd = create_temp_file ("tst-mmap-offend.", &temp_file);
  if (temp_fd == -1)
    error (1, errno, "cannot create temporary file");
      ssize_t cc = write (temp_fd, text1, sizeof text1 - 1);
      if (cc != sizeof text1 - 1)
       error (1, errno, "cannot write to temporary file");
  close (temp_fd);

Here is the call graph for this function:

static int do_test ( void  ) [static]

Variable Documentation

char* temp_file [static]

Definition at line 13 of file tst-mmap-offend.c.

const char text1[] = "hello\n" [static]

Definition at line 15 of file tst-mmap-offend.c.