mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
Update.
2002-07-22 Ulrich Drepper <drepper@redhat.com> * libio/bug-rewind.c: Use test skeleton. Use create_temp_file for file creation. * test-skeleton.c (create_temp_file): New function.
This commit is contained in:
parent
10e6256460
commit
3fa3d0b25c
@ -1,3 +1,9 @@
|
||||
2002-07-22 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* libio/bug-rewind.c: Use test skeleton. Use create_temp_file for
|
||||
file creation.
|
||||
* test-skeleton.c (create_temp_file): New function.
|
||||
|
||||
2002-07-22 Andreas Jaeger <aj@suse.de>
|
||||
|
||||
* sysdeps/x86_64/dl-machine.h (elf_machine_load_address): Use
|
||||
|
@ -5,24 +5,35 @@
|
||||
#define FAILED 3
|
||||
|
||||
|
||||
int
|
||||
main (void)
|
||||
#define TEST_FUNCTION do_test ()
|
||||
static int do_test (void);
|
||||
#include "../test-skeleton.c"
|
||||
|
||||
|
||||
static int
|
||||
do_test (void)
|
||||
{
|
||||
FILE *fptr;
|
||||
char arg1;
|
||||
char arg2;
|
||||
int ret, ret1, ret2, result, num;
|
||||
int ret1, ret2, result, num;
|
||||
int fd;
|
||||
|
||||
fd = create_temp_file ("wrewind.", NULL);
|
||||
if (fd == -1)
|
||||
return 3;
|
||||
|
||||
ret1 = 0;
|
||||
ret2 = 0;
|
||||
|
||||
if ((fptr = fopen ("./wrewind.dat", "w+")) == NULL)
|
||||
fptr = fdopen (fd, "w+");
|
||||
if (fptr == NULL)
|
||||
{
|
||||
printf ("Unable to open file.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ((ret = fwprintf (fptr, L"cderf")) <= 0)
|
||||
if (fwprintf (fptr, L"cderf") <= 0)
|
||||
{
|
||||
printf ("Unable to write to file with fwprintf().\n");
|
||||
fclose (fptr);
|
||||
|
Loading…
Reference in New Issue
Block a user