~ubuntu-branches/ubuntu/raring/cowdancer/raring

« back to all changes in this revision

Viewing changes to tests/004_test_fopen64.c

  • Committer: Bazaar Package Importer
  • Author(s): Junichi Uekawa
  • Date: 2005-11-23 14:08:51 UTC
  • Revision ID: james.westby@ubuntu.com-20051123140851-phiyvzz9yhtj4kjp
Tags: 0.7
* Work around stat change with coreutils 5.3.0 and later
* Fix testsuite
* COWDANCER_DEBUG environmental variable enables debug messages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*BINFMTC: -D_FILE_OFFSET_BITS=64
 
2
fopen test */
 
3
#include <stdio.h>
 
4
#include <stdlib.h>
 
5
 
 
6
void writeandclose(FILE* a)
 
7
{
 
8
  fprintf(a,"abc\n");
 
9
  fclose(a);
 
10
}
 
11
 
 
12
int main(int argc, char** argv)
 
13
{
 
14
  /* test that the three args work. */
 
15
  if(argc < 4)
 
16
    exit(1);
 
17
  
 
18
  writeandclose(fopen(argv[1], "r"));
 
19
  writeandclose(fopen(argv[2], "w"));
 
20
  writeandclose(fopen(argv[3], "a"));
 
21
  return 0;
 
22
}