diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-11-01 08:30:42 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-11-01 08:30:42 +0100 |
commit | 3c37902adad2c4dd5d22b2d2fcc3e9c947b1a4cb (patch) | |
tree | 96015f21909ec34f1d50bc11fe0713d3b0db7bed /gl | |
parent | 4f9bc0fd8acc771b905ffc8de86b40150a305282 (diff) | |
download | gnutls-3c37902adad2c4dd5d22b2d2fcc3e9c947b1a4cb.tar.gz |
read_file and friends were renamed to gl_read_file.
Diffstat (limited to 'gl')
-rw-r--r-- | gl/override/lib/read-file.c.diff | 38 | ||||
-rw-r--r-- | gl/override/lib/read-file.h.diff | 16 | ||||
-rw-r--r-- | gl/override/tests/test-read-file.c.diff | 20 | ||||
-rw-r--r-- | gl/read-file.c | 8 | ||||
-rw-r--r-- | gl/read-file.h | 6 | ||||
-rw-r--r-- | gl/tests/test-read-file.c | 4 |
6 files changed, 83 insertions, 9 deletions
diff --git a/gl/override/lib/read-file.c.diff b/gl/override/lib/read-file.c.diff new file mode 100644 index 0000000000..2907631df9 --- /dev/null +++ b/gl/override/lib/read-file.c.diff @@ -0,0 +1,38 @@ +--- read-file.c.orig ++++ read-file.c +@@ -41,7 +41,7 @@ + *LENGTH. On errors, *LENGTH is undefined, errno preserves the + values set by system functions (if any), and NULL is returned. */ + char * +-fread_file (FILE *stream, size_t *length) ++gl_fread_file (FILE *stream, size_t *length) + { + char *buf = NULL; + size_t alloc = BUFSIZ; +@@ -145,7 +145,7 @@ internal_read_file (const char *filename, size_t *length, const char *mode) + if (!stream) + return NULL; + +- out = fread_file (stream, length); ++ out = gl_fread_file (stream, length); + + save_errno = errno; + +@@ -170,7 +170,7 @@ internal_read_file (const char *filename, size_t *length, const char *mode) + undefined, errno preserves the values set by system functions (if + any), and NULL is returned. */ + char * +-read_file (const char *filename, size_t *length) ++gl_read_file (const char *filename, size_t *length) + { + return internal_read_file (filename, length, "r"); + } +@@ -183,7 +183,7 @@ read_file (const char *filename, size_t *length) + preserves the values set by system functions (if any), and NULL is + returned. */ + char * +-read_binary_file (const char *filename, size_t *length) ++gl_read_binary_file (const char *filename, size_t *length) + { + return internal_read_file (filename, length, "rb"); + } diff --git a/gl/override/lib/read-file.h.diff b/gl/override/lib/read-file.h.diff new file mode 100644 index 0000000000..3731bc7ffe --- /dev/null +++ b/gl/override/lib/read-file.h.diff @@ -0,0 +1,16 @@ +--- read-file.h.orig ++++ read-file.h +@@ -25,10 +25,10 @@ + /* Get FILE. */ + #include <stdio.h> + +-extern char *fread_file (FILE * stream, size_t * length); ++extern char *gl_fread_file (FILE * stream, size_t * length); + +-extern char *read_file (const char *filename, size_t * length); ++extern char *gl_read_file (const char *filename, size_t * length); + +-extern char *read_binary_file (const char *filename, size_t * length); ++extern char *gl_read_binary_file (const char *filename, size_t * length); + + #endif /* READ_FILE_H */ diff --git a/gl/override/tests/test-read-file.c.diff b/gl/override/tests/test-read-file.c.diff new file mode 100644 index 0000000000..1c25c30332 --- /dev/null +++ b/gl/override/tests/test-read-file.c.diff @@ -0,0 +1,20 @@ +--- test-read-file.c.orig ++++ test-read-file.c +@@ -37,7 +37,7 @@ main (void) + if (stat (FILE1, &statbuf) >= 0) + { + size_t len; +- char *out = read_file (FILE1, &len); ++ char *out = gl_read_file (FILE1, &len); + + if (!out) + { +@@ -79,7 +79,7 @@ main (void) + if (stat (FILE2, &statbuf) >= 0) + { + size_t len; +- char *out = read_file (FILE2, &len); ++ char *out = gl_read_file (FILE2, &len); + + if (!out) + { diff --git a/gl/read-file.c b/gl/read-file.c index bcbfbbb460..0e6c3835fc 100644 --- a/gl/read-file.c +++ b/gl/read-file.c @@ -41,7 +41,7 @@ *LENGTH. On errors, *LENGTH is undefined, errno preserves the values set by system functions (if any), and NULL is returned. */ char * -fread_file (FILE *stream, size_t *length) +gl_fread_file (FILE *stream, size_t *length) { char *buf = NULL; size_t alloc = BUFSIZ; @@ -145,7 +145,7 @@ internal_read_file (const char *filename, size_t *length, const char *mode) if (!stream) return NULL; - out = fread_file (stream, length); + out = gl_fread_file (stream, length); save_errno = errno; @@ -170,7 +170,7 @@ internal_read_file (const char *filename, size_t *length, const char *mode) undefined, errno preserves the values set by system functions (if any), and NULL is returned. */ char * -read_file (const char *filename, size_t *length) +gl_read_file (const char *filename, size_t *length) { return internal_read_file (filename, length, "r"); } @@ -183,7 +183,7 @@ read_file (const char *filename, size_t *length) preserves the values set by system functions (if any), and NULL is returned. */ char * -read_binary_file (const char *filename, size_t *length) +gl_read_binary_file (const char *filename, size_t *length) { return internal_read_file (filename, length, "rb"); } diff --git a/gl/read-file.h b/gl/read-file.h index 42663ef666..70d88d64d0 100644 --- a/gl/read-file.h +++ b/gl/read-file.h @@ -25,10 +25,10 @@ /* Get FILE. */ #include <stdio.h> -extern char *fread_file (FILE * stream, size_t * length); +extern char *gl_fread_file (FILE * stream, size_t * length); -extern char *read_file (const char *filename, size_t * length); +extern char *gl_read_file (const char *filename, size_t * length); -extern char *read_binary_file (const char *filename, size_t * length); +extern char *gl_read_binary_file (const char *filename, size_t * length); #endif /* READ_FILE_H */ diff --git a/gl/tests/test-read-file.c b/gl/tests/test-read-file.c index de7a0bb9f3..23c1b750f8 100644 --- a/gl/tests/test-read-file.c +++ b/gl/tests/test-read-file.c @@ -37,7 +37,7 @@ main (void) if (stat (FILE1, &statbuf) >= 0) { size_t len; - char *out = read_file (FILE1, &len); + char *out = gl_read_file (FILE1, &len); if (!out) { @@ -79,7 +79,7 @@ main (void) if (stat (FILE2, &statbuf) >= 0) { size_t len; - char *out = read_file (FILE2, &len); + char *out = gl_read_file (FILE2, &len); if (!out) { |