summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2012-01-28Missing MIN(a, b) macroIgor Pashev1-0/+4
2012-01-28Fixed getpeereid() : struct ucred_t is not publicIgor Pashev1-5/+10
2012-01-28"Ported" fpurge()Igor Pashev1-4/+0
2012-01-28flock() by fcntl()Igor Pashev1-0/+44
2012-01-28"Ported" src/fgetln.cIgor Pashev1-4/+0
2012-01-28Use regular getopt()Igor Pashev1-5/+1
2011-06-08Constify bsd_getopt(3) argumentsGuillem Jover1-1/+1
This matches the standard declaration for getopt(3).
2011-05-29Remove blank lines at EOFGuillem Jover3-3/+0
2011-05-28Map getopt to bsd_getopt if we are using the overlayGuillem Jover1-1/+5
This will ensure the code can safely and correctly use optreset transparently.
2011-05-16Abort compilation if fgetln cannot be wrappedGuillem Jover1-1/+3
2011-05-16Add fpurge functionGuillem Jover1-0/+68
2011-05-14Conditionalize temporary compatibility inclusionsGuillem Jover1-0/+1
These inclusions were in place for backward compatibility purposes, when the headers were split so that code using them would not break. Make it possible for applications to disable them by defining LIBBSD_CLEAN_INCLUDES so that buildability can be tested and fixed before they get removed in a subsequent release.
2011-05-14Correct library name in man pagesGuillem Jover2-2/+4
2011-05-14Update libbsd header references in man pagesGuillem Jover19-19/+19
Point to the namespaced path for libbsd specific headers.
2011-05-14Add support for transparent compilationGuillem Jover5-6/+4
This means that software being ported should not need to be modified in the usual case, as the libbsd headers will take over the standard namespace and fill the missing gaps, and include the system headers. To use this the new libbsd-transparent.pc file can be used through pkg-config, which should end up doing the right thing.
2011-05-14Initialize __progname to program_invocation_short_nameGuillem Jover1-1/+7
As we do not have cooperation from the crt0 code to set __progname, we have to set it ourselves from getprogname() in case it's NULL. On GNU systems we can use program_invocation_short_name which is actually set on crt0.
2011-05-14Add new radixsort and sradixsort functionsGuillem Jover3-0/+488
Taken from FreeBSD.
2011-05-14Add man pages for heapsort and mergesortGuillem Jover2-0/+208
Taken from FreeBSD, originally as qsort.3 but qsort references stripped.
2011-05-14Add new mergesort functionGuillem Jover1-0/+351
Taken from FreeBSD.
2011-05-14Add getpeereid functionGuillem Jover2-0/+270
2011-02-23Add reallocf functionAurelien Jarno2-0/+155
2010-01-30Fix setprogname to strip leading paths from prognameGuillem Jover1-2/+10
2010-01-21Make setprogname and getprogname arguments and return value constGuillem Jover1-4/+5
This is more correct as the strings are not going to be changed, and it matches the function signatures on other BSDs. Suggested-by: Aurelien Jarno <aurel32@debian.org>
2010-01-10Reformat code to KNFGuillem Jover4-34/+35
2010-01-10Add vis and unvis man pagesGuillem Jover2-0/+519
Taken from OpenBSD.
2010-01-10Add dehumanize_number man page linkGuillem Jover1-0/+1
2010-01-10Update vis and unvis modules from OpenBSDGuillem Jover2-16/+8
2010-01-10Update strlcat and strlcpy from OpenBSDGuillem Jover3-99/+48
2010-01-10Add arc4random_buf and arc4random_uniform functionsGuillem Jover4-63/+162
Update arc4random module from FreeBSD.
2010-01-10Replace setproctitle dummy macro with a function stubGuillem Jover1-0/+33
This way we can replace it later on with a real implementation so that applications can immediately benefit from it w/o the need to recompile them.
2010-01-10Add pidfile functionsGuillem Jover2-0/+509
Taken from FreeBSD. Remove MAXPATHLEN from ‘struct pidfh’ and allocate pf_path dynamically, as some systems do not have such limits. Use dev_t instead of __dev_t. Replace EDOOFUS with EINVAL.
2010-01-10Add flopen functionGuillem Jover2-0/+207
Taken from FreeBSD.
2010-01-10Move man pages to the same directory as the source codeGuillem Jover16-0/+1617
This matches BSD style source tree, and makes it easier to see what's missing.
2009-12-10Expand on API guarantee for fgetlnThorsten Glaser1-0/+1
OpenBSD has begun using the API guarantee that *len is not 0 if the fgetln(3) return value is not NULL; document this explicitly in the manpage and add a comment to the function implementation that this doesn’t need to be checked because getdelim/getline have similar guarantees. Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
2009-12-10Add readpassphrase functionGuillem Jover1-0/+187
Taken from OpenBSD.
2009-12-10Add dehumanize_number functionGuillem Jover1-0/+114
Taken from NetBSD.
2009-10-24Add strnvis and strnunvis functionsGuillem Jover2-2/+100
Taken from OpenBSD.
2009-10-24Add strtonum functionGuillem Jover1-0/+68
Taken from FreeBSD.
2009-08-30Fix typos in M32R local-elf.h endian definitionsHirokazu Takata1-2/+2
2009-07-17Fix typos in AVR32 and SH local-elf.h endian definitionsNobuhiro Iwamatsu1-2/+2
2009-05-29Define N_SYMSIZE in case the system does not do itGuillem Jover1-0/+3
Fixes build failures on some non-Linux ports. Based-on-patch-by: Petr Salinger <Petr.Salinger@seznam.cz>
2009-05-25Use N_SYMSIZE instead of directly accessing ‘struct exec’Guillem Jover1-1/+1
On Linux alpha ‘struct exec’ does not have an a_syms member, and the N_SYMSIZE is mapped to 0.
2009-05-21Fix typos (‘ELFDATA2MSG’ → ‘ELFDATA2MSB’)Guillem Jover1-3/+3
2009-05-20Use UTF-8 copyright symbols for non-imported filesGuillem Jover5-6/+6
2009-05-20Add nlist functionGuillem Jover2-0/+616
2009-05-20Add strmode functionGuillem Jover1-0/+149
2009-05-15Fix buffer leaks in fgetlnGuillem Jover1-2/+2
Cache the size and the buffer allocated by getline as static variables.
2009-05-15Change fgetln to return the correct length valueGuillem Jover1-8/+9
Set len to 0 on error conditions to mimmic FreeBSD behaviour, and return the amount of read characters on success, instead of the allocated size by getline. Reported-by: Jief L. <jief1.l@gmail.com>
2008-07-12Use sigprocmask instead of _sigprocmaskGuillem Jover1-2/+2
2008-07-09Add new setmode and getmode functions from FreeBSDGuillem Jover1-0/+444