aboutsummaryrefslogtreecommitdiff
path: root/include/libbb.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove bb_ prefixes from xfuncs.c (and a few other places), consolidateRob Landley2006-08-031-22/+30
| | | | | | | | | | things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only had one user), clean up lots of #includes... General cleanup pass. What I've been doing for the last couple days. And it conflicts! I've removed httpd.c from this checkin due to somebody else touching that file. It builds for me. I have to catch a bus. (Now you know why I'm looking forward to Mercurial.)
* Cleaup read() and write() variants, plus a couple of new functions likeRob Landley2006-07-161-5/+7
| | | | xlseek and fdlength() for the new mkswap.
* We need xsetuid() and xsetgid() because per-user process resource limits canRob Landley2006-07-151-0/+2
| | | | | prevent a process from switching to a user that has too many processes, and when that happens WE'RE STILL ROOT. See http://lwn.net/Articles/190331/
* A couple things that got tangled up in my tree, easier to check in both thanRob Landley2006-07-121-1/+10
| | | | | | | | | | | | | | untangle them: Rewrite u_signal_names() into get_signum() and get_signame(), plus trim the signal list to that required by posix (they can specify the numbers for the rest if they really need them). (This is preparatory cleanup for adding a timeout applet like Roberto Foglietta wants.) Export the itoa (added due to Denis Vlasenko, although it's not quite his preferred implementation) from xfuncs.c so it's actually used, and remove several other redundant implementations of itoa and utoa() in the tree.
* Patch from Tito to remove pwd_to_spwd (which we don't actually need), withRob Landley2006-07-111-6/+0
| | | | some #ifdef removal from me.
* Upgrade netcat a lot. Make -e able to take the rest of the command line asRob Landley2006-07-101-0/+1
| | | | | | | what to exec. Add -f mode and a brief explanation of how to use it to replace minicom. Add -l -l mode so you can turn any command into a server. And group all of netcat's command line options under two CONFIG entries, so if you disable both it doesn't use getopt at all.
* Minor build tweaks that save 1100 bytes building busybox on Ubuntu 6.06.Rob Landley2006-07-061-0/+15
|
* Slowly pulling more common headers into libbb.h. Andre pointed out thatRob Landley2006-06-241-0/+5
| | | | | older uClibc didn't include sys/socket.h from netinet/in.h, so add an explicit #include for that too...
* Since rangecoder is just a bunch of C functions, move it into the one userRob Landley2006-06-201-0/+1
| | | | | (decompress_unlzma.c). Also a slight #include cleanup, and I've been meaning to put #include <unistd.h> into libbb.h since it's so darn common...
* Undo all of the ugliness and some of the bloat from 15412.Rob Landley2006-06-181-2/+2
|
* skip_whitespace() shouldn't claim its return value is const, it doesn't knowRob Landley2006-06-181-1/+1
| | | | that and callers wind up typecasting it back.
* Attempt at fixing bug 815 by upgrading bb_spawn() so that builtins are atRob Landley2006-06-141-0/+1
| | | | | | | | the start of the path. (This should be under the same config option as the standalone shell, but right now that's buried in the shell menu.) Also add the ability to specify CONFIG_BUSYBOX_EXEC_PATH with /proc/self/exe as an overrideable default.
* made "test" an ash built-in.Paul Fox2006-06-081-0/+1
| | | | | | | | | | | | | | | | | | | moved the contents of libbb/bb_echo.c back into coreutils/echo.c, which is a more reasonable place for them than libbb. this forces anyone who wants echo and test to be builtin to ash to also have them available as applets. their cost is very small, and the number of people who wouldn't want them as applets is also very small. added warning about shell builtins vs. CONFIG_FEATURE_SH_STANDALONE_SHELL, which conflicts with their use. thanks to nathanael copa for debugging help. some string size optimization in test.c may have been lost with this commit, but this is a good new baseline.
* need prototype for new vfork_daemon()Mike Frysinger2006-06-071-0/+1
|
* - reuse strings and messages. Saves about 600BBernhard Reutner-Fischer2006-06-071-0/+2
|
* Header cleanup on two more networking files (move libbb.h to the top andRob Landley2006-06-051-16/+13
| | | | | remove #includes that libbb.h already does), plus a minor cleanup of libbb.h to move #includes towards the top of the file where we can see 'em.
* Header file cleanup. platform.h apparently needs to be included early on so itRob Landley2006-05-311-9/+21
| | | | | | | | | | | can figure out what header files to include, and override stuff that comes later. But applets shouldn't include platform.h directly, they should include busybox.h or libbb.h. Since busybox.h already includes libbb.h, move libbb.h to the top of busybox.h and platform.h near the top of libbb.h (right after bbconfig.h, which is something platform.h also needs access to). While we're at it, move some stuff from busybox.h to libbb.h so we have one big file to audit/clean up/try to make sense of instead of many.
* - s/defined(__uClinux__)/BB_NOMMU/Bernhard Reutner-Fischer2006-05-311-1/+1
| | | | | | | This needs a second pass to: + add bb_daemon(unsigned char no_chdir, unsigned char no_close, const char*flag) + eventually globally export argc and argv, so we don't need to pass it to bb_daemon().
* Fix hdparm to use PRIu64 instead of typecasting to long long (which is 128 bitsRob Landley2006-05-281-0/+1
| | | | on 64 bit platforms), and move #include <inttypes.h> to libbb.h.
* Consolidate #include <sys/time.h> so libbb.h does it.Rob Landley2006-05-271-0/+2
|
* Change llist_add_* to take the address of the list rather than returning the newRob Landley2006-05-261-2/+2
| | | | head, and change all the callers.
* Slight sanity fix: data is void *, not char *. And it's called dataRob Landley2006-05-261-2/+2
| | | | almost everywhere, so be consistent.
* - introduce and use bb_path_wtmp_file for portability (saves 11 Bytes).Bernhard Reutner-Fischer2006-05-261-4/+6
| | | | - fix last.c to also look at the double-underscore UT_ defines.
* - move llist to top of file so we can potentially use it in all prototypes ↵Bernhard Reutner-Fischer2006-05-261-9/+10
| | | | easily
* Rich Felker suggested removing dprintf() from watch, and one thing led toRob Landley2006-05-251-0/+2
| | | | | | another... This adds bb_xspawn() support, which does vfork/exec. (I don't know why using a static instead of a local adds ~40 bytes, but using the local doesn't work...)
* A pending item in my tree I might as well check in: I plan to migrate calloc()Rob Landley2006-05-191-0/+1
| | | | | and bb_calloc() calls to bb_xzalloc() which allocates prezeroed memory but only takes one argument (the size).
* - single KERNEL_VERSION(a,b,c) macro in platform.hBernhard Reutner-Fischer2006-05-191-1/+1
| | | | | - rename get_kernel_revision() to get_linux_version_code from Robert P. J. Day
* Make md5 calculation always go through an the buffer so that A) we don'tRob Landley2006-05-161-1/+1
| | | | | | | | | | | handle packets out of sequence if some data goes through the buffer and some doesn't, B) it works on systems that can't handle aligned access, C) we just have one code path to worry about. While we're at it, sizeof() and RESERVE_CONFIG_BUFFER() really don't combine well, which is why md5sum has been reading and processing data 4 bytes at a time. I suspect that the existence of CONFIG_MD5_SIZE_VS_SPEED to do loop unrolling and such in the algorithm was an attempt to work around that bug.
* Fiddling with llist to make memory management easier. Specifically, theRob Landley2006-05-081-2/+2
| | | | | option to delete the contents of the list when we delete the list is a good thing.
* Not quite compiler independent, but we've never tried to be gcc independentRob Landley2006-05-041-6/+0
| | | | | anyway. This is at least less ugly than what was there before, and fixes building all sources at once.
* - patch from Denis Vlasenko to add and use bb_xopen3()Bernhard Reutner-Fischer2006-04-131-0/+1
|
* - patch from Denis Vlasenko to add and use bb_xchdir()Bernhard Reutner-Fischer2006-04-121-0/+1
|
* - patch from Denis Vlasenko to add bb_xbind() and bb_xlisten()Bernhard Reutner-Fischer2006-04-121-0/+2
|
* - patch from Denis Vlasenko to add and use bb_xdaemon()Bernhard Reutner-Fischer2006-04-121-0/+1
|
* - patch from Denis Vlasenko to add and use bb_xsocket() and to useBernhard Reutner-Fischer2006-04-121-0/+1
| | | | | bb_xopen some more while at it. Also use shorter boilerplate while at it.
* - add and use bb_opendir(), bb_xopendir().Bernhard Reutner-Fischer2006-04-121-0/+3
| | | | | | | | text data bss dec hex filename 889445 9392 1035784 1934621 1d851d busybox.gcc-4.2.orig 889297 9392 1035784 1934473 1d8489 busybox.gcc-4.2 889009 9820 1037860 1936689 1d8d31 busybox.gcc-4.1.orig 888817 9820 1037860 1936497 1d8c71 busybox.gcc-4.1
* - include netinet/in.h for struct sockaddr_in.Bernhard Reutner-Fischer2006-04-111-0/+1
| | | | Closes bug #735
* Robert P. J. Day writes: even in the header file, make it clear that the ↵Mike Frysinger2006-04-111-0/+3
| | | | routine depends on __uClinux__
* Patch from Rob Sullivan to consolidate crc32 table generation.Rob Landley2006-04-101-0/+2
|
* - move buffer allocation schemes to libbb.hBernhard Reutner-Fischer2006-04-031-0/+18
| | | | - include the correct headers: applets need busybox.h while lib* need libbb.h
* - typos: s/compatability/compatibility/g;s/compatable/compatible/g;Bernhard Reutner-Fischer2006-04-021-1/+1
|
* Patch from Denis Vlasenko to add xstat() and use it.Rob Landley2006-03-131-0/+2
|
* Fixup to the previous (portability) patch. Linux actually does needRob Landley2006-03-091-1/+0
| | | | arpa/inet.h rather than netinet/in.h, otherwise we get warnings.
* Portability patch from rfelker. The bb_asprintf.c thing needs an eventualRob Landley2006-03-091-0/+1
| | | | | follow up in platform.h to set the #ifdef, but the workaround works for everybody, so...
* Missed one in the get_line_from_file() update...Rob Landley2006-02-241-1/+1
|
* Patch from Devin Bayer to split up hash_fd.c into md5.c and sha1.c. (I tweakedRob Landley2006-02-211-3/+23
| | | | md5_sha1_sum.c to convert some #ifdef CONFIG to if(ENABLE).)
* remove #undef strlen, use #define strlen always but without ↵"Vladimir N. Oleynik"2006-02-201-0/+2
| | | | xfunc/BB_STRLEN_IMPLEMENTATION
* - add platform.h.Bernhard Reutner-Fischer2006-01-221-35/+8
| | | | - use shorter boilerplate while at it.
* - shared libbusybox.Bernhard Reutner-Fischer2006-01-151-1/+1
| | | | | - IMA compilation option (aka IPO, IPA,..) Please holler if i broke something..
* Tito writes:Mike Frysinger2006-01-081-1/+1
| | | | | | | | | | | | | | | Somehow while applying the bb_do_delay patch a change slipped in libbb.h that broke compilation. libbb.h Line 355 extern char bb_path_mtab_file[]; This conflicts with mtab_file.c #if defined(CONFIG_FEATURE_MTAB_SUPPORT) const char bb_path_mtab_file[] = "/etc/mtab"; #else const char bb_path_mtab_file[] = "/proc/mounts"; #endif