summaryrefslogtreecommitdiff
path: root/include/stdlib.h
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-07-09 06:39:19 +0000
committerEric Andersen <andersen@codepoet.org>2000-07-09 06:39:19 +0000
commitf3a9360625bca4fb0b5fe9730d6e25431ac4704b (patch)
tree9de32b51a64464128da7d908a10378369f739a02 /include/stdlib.h
parent283f7172a1d7f3e42a38747f7a9b83bfc04c5238 (diff)
Add in a bunch of junk. Busybox now compiles (except for mkfs.minix and
fsck.minix). Of course, it doesn't link yet due to missing functions, but hey... At least it is now easy to see what isn't working. :-) -Erik
Diffstat (limited to 'include/stdlib.h')
-rw-r--r--include/stdlib.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/include/stdlib.h b/include/stdlib.h
index daff04b07..51ce80ba2 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -61,10 +61,29 @@ extern int setenv __P ((__const char *__name, __const char *__value,
extern int system __P ((__const char *__command));
-extern int qsort __P ((char *base, int num, int size, int (*cmp)()));
-
extern char * gcvt __P ((float number, size_t ndigit, char * buf));
+#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
+/* Return the canonical absolute name of file NAME. The last file name
+ * component need not exist, and may be a symlink to a nonexistent file.
+ * If RESOLVED is null, the result is malloc'd; otherwise, if the canonical
+ * name is PATH_MAX chars or more, returns null with `errno' set to
+ * ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars, returns the
+ * name in RESOLVED. */
+extern char *realpath __P ((__const char *__restrict __name,
+ char *__restrict __resolved));
+#endif
+
+
+/* Shorthand for type of comparison functions. */
+typedef int (*__compar_fn_t) __P ((__const __ptr_t, __const __ptr_t));
+typedef __compar_fn_t comparison_fn_t;
+/* Sort NMEMB elements of BASE, of SIZE bytes each,
+ using COMPAR to perform the comparisons. */
+extern void qsort __P ((__ptr_t __base, size_t __nmemb, size_t __size,
+ __compar_fn_t __compar));
+
+
#define atof(x) strtod((x),(char**)0)
#define atoi(x) (int)strtol((x),(char**)0,10)
#define atol(x) strtol((x),(char**)0,10)
@@ -84,4 +103,6 @@ typedef struct
long int rem; /* Remainder. */
} ldiv_t;
+
+
#endif /* __STDLIB_H */