aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/applets.src.h5
-rw-r--r--include/busybox.h4
-rw-r--r--include/libbb.h26
3 files changed, 21 insertions, 14 deletions
diff --git a/include/applets.src.h b/include/applets.src.h
index 6e1b02fc3..248d539c4 100644
--- a/include/applets.src.h
+++ b/include/applets.src.h
@@ -205,7 +205,6 @@ IF_MAKEDEVS(APPLET(makedevs, BB_DIR_SBIN, BB_SUID_DROP))
205IF_MAKEMIME(APPLET(makemime, BB_DIR_BIN, BB_SUID_DROP)) 205IF_MAKEMIME(APPLET(makemime, BB_DIR_BIN, BB_SUID_DROP))
206IF_MAN(APPLET(man, BB_DIR_USR_BIN, BB_SUID_DROP)) 206IF_MAN(APPLET(man, BB_DIR_USR_BIN, BB_SUID_DROP))
207IF_MATCHPATHCON(APPLET(matchpathcon, BB_DIR_USR_SBIN, BB_SUID_DROP)) 207IF_MATCHPATHCON(APPLET(matchpathcon, BB_DIR_USR_SBIN, BB_SUID_DROP))
208IF_MD5SUM(APPLET_NOEXEC(md5sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, md5sum))
209IF_MICROCOM(APPLET(microcom, BB_DIR_USR_BIN, BB_SUID_DROP)) 208IF_MICROCOM(APPLET(microcom, BB_DIR_USR_BIN, BB_SUID_DROP))
210IF_MKDIR(APPLET_NOFORK(mkdir, mkdir, BB_DIR_BIN, BB_SUID_DROP, mkdir)) 209IF_MKDIR(APPLET_NOFORK(mkdir, mkdir, BB_DIR_BIN, BB_SUID_DROP, mkdir))
211IF_MKFS_VFAT(APPLET_ODDNAME(mkdosfs, mkfs_vfat, BB_DIR_SBIN, BB_SUID_DROP, mkfs_vfat)) 210IF_MKFS_VFAT(APPLET_ODDNAME(mkdosfs, mkfs_vfat, BB_DIR_SBIN, BB_SUID_DROP, mkfs_vfat))
@@ -280,10 +279,6 @@ IF_SETKEYCODES(APPLET(setkeycodes, BB_DIR_USR_BIN, BB_SUID_DROP))
280IF_SETLOGCONS(APPLET(setlogcons, BB_DIR_USR_SBIN, BB_SUID_DROP)) 279IF_SETLOGCONS(APPLET(setlogcons, BB_DIR_USR_SBIN, BB_SUID_DROP))
281IF_SETSEBOOL(APPLET(setsebool, BB_DIR_USR_SBIN, BB_SUID_DROP)) 280IF_SETSEBOOL(APPLET(setsebool, BB_DIR_USR_SBIN, BB_SUID_DROP))
282IF_SETSID(APPLET(setsid, BB_DIR_USR_BIN, BB_SUID_DROP)) 281IF_SETSID(APPLET(setsid, BB_DIR_USR_BIN, BB_SUID_DROP))
283IF_SHA1SUM(APPLET_NOEXEC(sha1sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, sha1sum))
284IF_SHA3SUM(APPLET_NOEXEC(sha3sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, sha3sum))
285IF_SHA256SUM(APPLET_NOEXEC(sha256sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, sha256sum))
286IF_SHA512SUM(APPLET_NOEXEC(sha512sum, md5_sha1_sum, BB_DIR_USR_BIN, BB_SUID_DROP, sha512sum))
287IF_SHOWKEY(APPLET(showkey, BB_DIR_USR_BIN, BB_SUID_DROP)) 282IF_SHOWKEY(APPLET(showkey, BB_DIR_USR_BIN, BB_SUID_DROP))
288IF_SLATTACH(APPLET(slattach, BB_DIR_SBIN, BB_SUID_DROP)) 283IF_SLATTACH(APPLET(slattach, BB_DIR_SBIN, BB_SUID_DROP))
289/* Do not make this applet NOFORK. It breaks ^C-ing of pauses in shells: */ 284/* Do not make this applet NOFORK. It breaks ^C-ing of pauses in shells: */
diff --git a/include/busybox.h b/include/busybox.h
index 737627bd0..6a003d544 100644
--- a/include/busybox.h
+++ b/include/busybox.h
@@ -19,7 +19,9 @@ extern const uint8_t applet_flags[] ALIGN1;
19extern const uint8_t applet_suid[] ALIGN1; 19extern const uint8_t applet_suid[] ALIGN1;
20extern const uint8_t applet_install_loc[] ALIGN1; 20extern const uint8_t applet_install_loc[] ALIGN1;
21 21
22#if ENABLE_FEATURE_PREFER_APPLETS 22#if ENABLE_FEATURE_PREFER_APPLETS \
23 || ENABLE_FEATURE_SH_STANDALONE \
24 || ENABLE_FEATURE_SH_NOFORK
23# define APPLET_IS_NOFORK(i) (applet_flags[(i)/4] & (1 << (2 * ((i)%4)))) 25# define APPLET_IS_NOFORK(i) (applet_flags[(i)/4] & (1 << (2 * ((i)%4))))
24# define APPLET_IS_NOEXEC(i) (applet_flags[(i)/4] & (1 << ((2 * ((i)%4))+1))) 26# define APPLET_IS_NOEXEC(i) (applet_flags[(i)/4] & (1 << ((2 * ((i)%4))+1)))
25#else 27#else
diff --git a/include/libbb.h b/include/libbb.h
index 6db03d2df..30a0e00ba 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -196,24 +196,33 @@ int klogctl(int type, char *b, int len);
196/* Busybox does not use threads, we can speed up stdio. */ 196/* Busybox does not use threads, we can speed up stdio. */
197#ifdef HAVE_UNLOCKED_STDIO 197#ifdef HAVE_UNLOCKED_STDIO
198# undef getc 198# undef getc
199# define getc(stream) getc_unlocked(stream) 199# define getc(stream) getc_unlocked(stream)
200# undef getchar 200# undef getchar
201# define getchar() getchar_unlocked() 201# define getchar() getchar_unlocked()
202# undef putc 202# undef putc
203# define putc(c, stream) putc_unlocked(c, stream) 203# define putc(c,stream) putc_unlocked(c,stream)
204# undef putchar 204# undef putchar
205# define putchar(c) putchar_unlocked(c) 205# define putchar(c) putchar_unlocked(c)
206# undef fgetc 206# undef fgetc
207# define fgetc(stream) getc_unlocked(stream) 207# define fgetc(stream) getc_unlocked(stream)
208# undef fputc 208# undef fputc
209# define fputc(c, stream) putc_unlocked(c, stream) 209# define fputc(c,stream) putc_unlocked(c,stream)
210#endif 210#endif
211/* Above functions are required by POSIX.1-2008, below ones are extensions */ 211/* Above functions are required by POSIX.1-2008, below ones are extensions */
212#ifdef HAVE_UNLOCKED_LINE_OPS 212#ifdef HAVE_UNLOCKED_LINE_OPS
213# undef fgets 213# undef fgets
214# define fgets(s, n, stream) fgets_unlocked(s, n, stream) 214# define fgets(s,n,stream) fgets_unlocked(s,n,stream)
215# undef fputs 215# undef fputs
216# define fputs(s, stream) fputs_unlocked(s, stream) 216# define fputs(s,stream) fputs_unlocked(s,stream)
217/* musl <= 1.1.15 does not support fflush_unlocked(NULL) */
218//# undef fflush
219//# define fflush(stream) fflush_unlocked(stream)
220# undef feof
221# define feof(stream) feof_unlocked(stream)
222# undef ferror
223# define ferror(stream) ferror_unlocked(stream)
224# undef fileno
225# define fileno(stream) fileno_unlocked(stream)
217#endif 226#endif
218 227
219 228
@@ -1755,6 +1764,7 @@ typedef struct sha512_ctx_t {
1755typedef struct sha3_ctx_t { 1764typedef struct sha3_ctx_t {
1756 uint64_t state[25]; 1765 uint64_t state[25];
1757 unsigned bytes_queued; 1766 unsigned bytes_queued;
1767 unsigned input_block_bytes;
1758} sha3_ctx_t; 1768} sha3_ctx_t;
1759void md5_begin(md5_ctx_t *ctx) FAST_FUNC; 1769void md5_begin(md5_ctx_t *ctx) FAST_FUNC;
1760void md5_hash(md5_ctx_t *ctx, const void *buffer, size_t len) FAST_FUNC; 1770void md5_hash(md5_ctx_t *ctx, const void *buffer, size_t len) FAST_FUNC;