aboutsummaryrefslogtreecommitdiff
path: root/include/libbb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libbb.h')
-rw-r--r--include/libbb.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 5d7248104..13303073d 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -191,6 +191,18 @@ struct sysinfo {
extern int sysinfo(struct sysinfo* info);
+/* Size-saving "small" ints (arch-dependent) */
+#if defined(i386) || defined (__mips__)
+/* add other arches which benefit from this... */
+typedef signed char smallint;
+typedef unsigned char smalluint;
+#else
+/* for arches where byte accesses generate larger code: */
+typedef int smallint;
+typedef unsigned smalluint;
+#endif
+
+
extern void chomp(char *s);
extern void trim(char *s);
extern char *skip_whitespace(const char *);