aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2015-05-18 09:36:27 +0100
committerRon Yorston <rmy@pobox.com>2015-05-18 09:36:27 +0100
commit60063627a6d540871061854a362047e6517f821c (patch)
tree0de228630450c64e085f2e3f5141b5ba17eccab3 /include
parentec39cb770ddd5c0e085d5c4ee10be65bab5e7a44 (diff)
parent9a595bb36ded308e6d4336aef2c1cd3ac738a398 (diff)
downloadbusybox-w32-60063627a6d540871061854a362047e6517f821c.tar.gz
busybox-w32-60063627a6d540871061854a362047e6517f821c.tar.bz2
busybox-w32-60063627a6d540871061854a362047e6517f821c.zip
Merge branch 'busybox' into mergeFRP
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h27
-rw-r--r--include/platform.h20
2 files changed, 42 insertions, 5 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 28ac779c3..2ac95835a 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -84,7 +84,30 @@
84# include <selinux/av_permissions.h> 84# include <selinux/av_permissions.h>
85#endif 85#endif
86#if ENABLE_FEATURE_UTMP 86#if ENABLE_FEATURE_UTMP
87# include <utmp.h> 87# if defined __UCLIBC__ && ( \
88 (UCLIBC_VERSION >= KERNEL_VERSION(0, 9, 32) \
89 && UCLIBC_VERSION < KERNEL_VERSION(0, 9, 34) \
90 && defined __UCLIBC_HAS_UTMPX__ \
91 ) || ( \
92 UCLIBC_VERSION >= KERNEL_VERSION(0, 9, 34) \
93 ) \
94 )
95# include <utmpx.h>
96# elif defined __UCLIBC__
97# include <utmp.h>
98# define utmpx utmp
99# define setutxent setutent
100# define endutxent endutent
101# define getutxent getutent
102# define getutxid getutid
103# define getutxline getutline
104# define pututxline pututline
105# define utmpxname utmpname
106# define updwtmpx updwtmp
107# define _PATH_UTMPX _PATH_UTMP
108# else
109# include <utmpx.h>
110# endif
88#endif 111#endif
89#if ENABLE_LOCALE_SUPPORT 112#if ENABLE_LOCALE_SUPPORT
90# include <locale.h> 113# include <locale.h>
@@ -726,7 +749,7 @@ void* xrealloc_vector_helper(void *vector, unsigned sizeof_and_shift, int idx) F
726 749
727 750
728extern ssize_t safe_read(int fd, void *buf, size_t count) FAST_FUNC; 751extern ssize_t safe_read(int fd, void *buf, size_t count) FAST_FUNC;
729extern ssize_t nonblock_immune_read(int fd, void *buf, size_t count, int loop_on_EINTR) FAST_FUNC; 752extern ssize_t nonblock_immune_read(int fd, void *buf, size_t count) FAST_FUNC;
730// NB: will return short read on error, not -1, 753// NB: will return short read on error, not -1,
731// if some data was read before error occurred 754// if some data was read before error occurred
732extern ssize_t full_read(int fd, void *buf, size_t count) FAST_FUNC; 755extern ssize_t full_read(int fd, void *buf, size_t count) FAST_FUNC;
diff --git a/include/platform.h b/include/platform.h
index a550feae6..1cbffc102 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -385,6 +385,7 @@ typedef unsigned smalluint;
385#define HAVE_DPRINTF 1 385#define HAVE_DPRINTF 1
386#define HAVE_MEMRCHR 1 386#define HAVE_MEMRCHR 1
387#define HAVE_MKDTEMP 1 387#define HAVE_MKDTEMP 1
388#define HAVE_TTYNAME_R 1
388#define HAVE_PTSNAME_R 1 389#define HAVE_PTSNAME_R 1
389#define HAVE_SETBIT 1 390#define HAVE_SETBIT 1
390#define HAVE_SIGHANDLER_T 1 391#define HAVE_SIGHANDLER_T 1
@@ -515,9 +516,17 @@ typedef unsigned smalluint;
515#endif 516#endif
516 517
517#if defined(ANDROID) || defined(__ANDROID__) 518#if defined(ANDROID) || defined(__ANDROID__)
518# undef HAVE_DPRINTF 519# if __ANDROID_API__ < 8
519# undef HAVE_GETLINE 520# undef HAVE_DPRINTF
520# undef HAVE_STPCPY 521# else
522# define dprintf fdprintf
523# endif
524# if __ANDROID_API__ < 21
525# undef HAVE_TTYNAME_R
526# undef HAVE_GETLINE
527# undef HAVE_STPCPY
528# endif
529# undef HAVE_MEMPCPY
521# undef HAVE_STRCHRNUL 530# undef HAVE_STRCHRNUL
522# undef HAVE_STRVERSCMP 531# undef HAVE_STRVERSCMP
523# undef HAVE_UNLOCKED_LINE_OPS 532# undef HAVE_UNLOCKED_LINE_OPS
@@ -542,6 +551,11 @@ extern void *memrchr(const void *s, int c, size_t n) FAST_FUNC;
542extern char *mkdtemp(char *template) FAST_FUNC; 551extern char *mkdtemp(char *template) FAST_FUNC;
543#endif 552#endif
544 553
554#ifndef HAVE_TTYNAME_R
555#define ttyname_r bb_ttyname_r
556extern int ttyname_r(int fd, char *buf, size_t buflen);
557#endif
558
545#ifndef HAVE_SETBIT 559#ifndef HAVE_SETBIT
546# define setbit(a, b) ((a)[(b) >> 3] |= 1 << ((b) & 7)) 560# define setbit(a, b) ((a)[(b) >> 3] |= 1 << ((b) & 7))
547# define clrbit(a, b) ((a)[(b) >> 3] &= ~(1 << ((b) & 7))) 561# define clrbit(a, b) ((a)[(b) >> 3] &= ~(1 << ((b) & 7)))