Skip to content

Commit

Permalink
Revert "Change filenames in picolibc test-ungetc-ftell,test-fgets-eof"
Browse files Browse the repository at this point in the history
This reverts commit ab68577.

picolibc upstream has merged the PR containing the same patch, so
applying an extra copy of it here is no longer necessary, and worse,
causes a conflict.
  • Loading branch information
statham-arm committed Jun 17, 2024
1 parent ab68577 commit 7006fbe
Showing 1 changed file with 0 additions and 60 deletions.
60 changes: 0 additions & 60 deletions patches/picolibc.patch
Original file line number Diff line number Diff line change
Expand Up @@ -35,63 +35,3 @@ index b97ea3300..04b94f35c 100644
*(.gnu.linkonce.t.*)
KEEP (*(.fini .fini.*))
@PREFIX@__text_end = .;
diff --git a/test/test-fgets-eof.c b/test/test-fgets-eof.c
index 4c9e141b7..704e1a3ac 100644
--- a/test/test-fgets-eof.c
+++ b/test/test-fgets-eof.c
@@ -36,6 +36,10 @@
#include <stdio.h>
#include <string.h>

+#ifndef TEST_FILE_NAME
+#define TEST_FILE_NAME "FGETSEOF.TXT"
+#endif
+
const char *string = "123456789";

int main(void)
@@ -46,12 +50,12 @@ int main(void)
FILE *file;
int ret = 0;

- file = fopen("testfile.dat", "w");
+ file = fopen( TEST_FILE_NAME, "w" );
if(file == NULL) return 1;
fputs(string, file);
fclose(file);

- file = fopen( "testfile.dat", "r" );
+ file = fopen( TEST_FILE_NAME, "r" );
if(file == NULL) return 1;

/*Calling fgets to reach EOF and check on the returned value*/
diff --git a/test/test-ungetc-ftell.c b/test/test-ungetc-ftell.c
index 245679814..a3e702312 100644
--- a/test/test-ungetc-ftell.c
+++ b/test/test-ungetc-ftell.c
@@ -36,6 +36,10 @@
#include <stdio.h>
#include <string.h>

+#ifndef TEST_FILE_NAME
+#define TEST_FILE_NAME "UNGETCFTELL.DAT"
+#endif
+
const char *str = "This is a string";

int main(void) {
@@ -44,12 +48,12 @@ int main(void) {
char first;
long position, start;

- file = fopen( "testfile.dat", "wb" );
+ file = fopen( TEST_FILE_NAME, "wb" );
if( file == NULL ) return 1;
fputs(str, file);
fclose(file);

- file = fopen( "testfile.dat", "rb" );
+ file = fopen( TEST_FILE_NAME, "rb" );
if(file == NULL) return 1;

first = fgetc(file);

0 comments on commit 7006fbe

Please sign in to comment.