aboutsummaryrefslogtreecommitdiff
path: root/lib/portability.h
diff options
context:
space:
mode:
authorGeorgi Chorbadzhiyski <gf@unixsol.org>2012-03-16 06:42:08 -0500
committerGeorgi Chorbadzhiyski <gf@unixsol.org>2012-03-16 06:42:08 -0500
commit522d90613ae7dc728a98d3ce3b939b4ad9b30f25 (patch)
tree3aa0a983f34e0d9c427bc012c532c324fbafdf15 /lib/portability.h
parentc4849f7e354d3c685c44ac2b2a7110238b17122b (diff)
downloadtoybox-522d90613ae7dc728a98d3ce3b939b4ad9b30f25.tar.gz
Implement Apple and Android versions of getline(), getdelim(), and clearenv().
Diffstat (limited to 'lib/portability.h')
-rw-r--r--lib/portability.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/portability.h b/lib/portability.h
index 0887d873..832dd123 100644
--- a/lib/portability.h
+++ b/lib/portability.h
@@ -1,5 +1,5 @@
// The tendency of gcc to produce stupid warnings continues with
-// warn_unsed_result, which warns about things like ignoring the return code
+// warn_unused_result, which warns about things like ignoring the return code
// of nice(2) (which is completely useless since -1 is a legitimate return
// value on success and even the man page tells you to use errno instead).
@@ -33,6 +33,7 @@
#define IS_BIG_ENDIAN 0
#endif
+int clearenv(void);
#else
#ifdef __BIG_ENDIAN__
@@ -72,3 +73,8 @@
#else
#define GCC_BUG
#endif
+
+#if defined(__APPLE__) || defined(__ANDROID__)
+ssize_t getdelim(char **lineptr, size_t *n, int delim, FILE *stream);
+ssize_t getline(char **lineptr, size_t *n, FILE *stream);
+#endif