Commit Graph

18182 Commits

Author SHA1 Message Date
christos
a2eaeedb12 Remove empty callbacks (Ingo Schwartze) 2016-04-17 18:39:14 +00:00
roy
67f77b27fc Removed botched debug left over. 2016-04-12 20:40:43 +00:00
roy
4b95ed965b Fix pidfile location path rules to match prior version. 2016-04-12 20:36:35 +00:00
joerg
c75fe7b83c lib/50791: Instead of using sorting the arena chunks by address only,
sort by size of the longest run and address as tie break. Avoids long
linear searches for code heavy on medium sized allocations.
2016-04-12 18:07:08 +00:00
christos
20d5bea366 FIONREAD takes int as an argument (Ingo Schwarze) 2016-04-12 11:15:46 +00:00
christos
985c823c19 From Ingo Schwarze:
* Delete the stubs of the XK_EXE mechanism that was never implemented.
   From a security, stability, and simplicity perspective, i would
   consider implementing it a truly terrible idea, so let's better
   get rid of it.

 * Do not use the local variable "num" in el_wgets() alternately for
   two completely different purposes.  Only use it for the number
   of characters read, as stated in the comment (or -1 as long as
   that number is still unknown), not for the (more or less boolean)
   return value of read_getcmd().  Actually, there is no need at
   all to save the latter return value after testing it once.

 * The function read_getcmd() has very unusual return values:
   It returns -1 for success and 0 for EOF/error.  Switch that around
   to 0 for success and -1 for EOF/error to be less confusing, and
   get rid of the OKCMD preprocessor macro.

 * Get rid of one #ifdef section in el_wgets() by using
   el->el_chared.c_macro directly at the only place
   where it is used.

 * Delete the unused MIN() macro.
2016-04-12 00:16:06 +00:00
christos
39e1d6f1ed Fix indentation, Ingo Schwarze 2016-04-11 22:30:14 +00:00
christos
469d44f8e7 Get rid of private/public; keep protected (Ingo Schwarze) 2016-04-11 18:56:31 +00:00
christos
a75ea7b9c4 chartype cleanups from Ingo Schwarze:
- The file tokenizer.c no longer uses chartype.h,
   so don't include the header.

 - The dummy definitions of ct_{de,en}code_string() for the
   NARROWCHAR case are only used in history.c, so move them there.

 - Now the whole content of chartype.h is for the wide character
   case only.  So remove the NARROWCHAR ifdef and include the
   header only in the wide character case.

 - In chartype.h, move ct_encode_char() below the comment explaining it.

 - No more need for underscores before ct_{de,en}code_string().

 - Make the conversion buffer resize functions private.
   They are only called from the decoding and encoding functions
   inside chartype.c, and no need can possibly arise to call them
   from anywhere else.
2016-04-11 16:06:52 +00:00
christos
47c9654d15 make this work with pie binaries (subtract dli_fbase from addresses). 2016-04-11 15:30:18 +00:00
wiz
16a8980036 Add serial commas. Fix minus. Sort SEE ALSO. Fix xref. 2016-04-11 08:49:57 +00:00
roy
aae35f25ba Bump libutil for new pidfile functions. 2016-04-11 08:44:40 +00:00
christos
0594af8028 Char -> wchar_t from Ingo Schwarze. 2016-04-11 00:50:13 +00:00
christos
6b3f51ca99 there is no pflags, just flags. 2016-04-11 00:47:19 +00:00
christos
0aefc7f9ad more macro WIDECHAR undoing from Ingo Schwarze. 2016-04-11 00:22:48 +00:00
roy
6b9006e83c Implement pidfile_lock, pidfile_read and pidfile_clean.
Discussed on tech-net@, ok core@.
2016-04-10 19:05:50 +00:00
christos
2dd09931ab Change some 0's to NULL's from Pedro Giffuni 2016-04-09 18:47:05 +00:00
christos
fcf85103b4 More WIDECHAR elimination (Ingo Schwarze) 2016-04-09 18:43:17 +00:00
dholland
eb0c9743f2 _SC_PAGESIZE is not the page size; it's a symbolic code for retrieving
the page size.
2016-04-07 06:21:48 +00:00
christos
ee5f11c12c pretty-print link addresses. 2016-04-06 18:04:58 +00:00
roy
cdda39d7e5 Revert prior, no idea why it was causing me problems, but it no longer does. 2016-04-06 11:07:58 +00:00
wiz
54920d4dc7 Drop trailing whitespace. 2016-04-06 08:18:35 +00:00
christos
7ffce30f1b revert part of previous; not needed. 2016-04-06 04:09:10 +00:00
christos
a071bd3ff9 - clarify si_signo difference for waitid and wait6 as per POSIX.
- implement it.
- document WIFCONTINUED
2016-04-06 03:50:03 +00:00
dholland
3f5237a6a3 improve usage 2016-04-06 03:38:31 +00:00
roy
da98c8b8e3 Stop calling reallocarr and just do the same bounds checking but without
messing around with copying pointers which was causing ssh to crash.
2016-04-05 15:01:26 +00:00
christos
d6b67564a6 some ports need <sys/wait.h> 2016-04-04 22:14:38 +00:00
christos
cacc57bfc6 catch up with p_xstat split. 2016-04-04 21:08:44 +00:00
martin
53a4b022d2 For the benefit of compilers not using our native C runtime environment,
install a "sysident.o" file providing the note identifying NetBSD
executables (and marking the currently installed version).
2016-04-04 18:29:07 +00:00
wiz
386cb828c3 Use more markup, fix a typo. 2016-04-04 13:13:09 +00:00
christos
eb687c986e simplify 2016-04-03 01:49:51 +00:00
christos
aad157eb21 add idtype.h to mklintstub and say who generates it. 2016-04-03 00:48:29 +00:00
christos
406ebcd6ac userland bits for wait6/waitid. 2016-04-03 00:19:42 +00:00
christos
8b22ec00d4 - if we are freeing cur_term, set it to NULL.
- preserve and free "last" properly.

$ cat foo.c
#include <stdio.h>
#include <termcap.h>

int
main(void)
{
	tgetent(NULL, "dumb");
	tgetent(NULL, "network");
	tgetflag("so");
	return 0;
}
$ cc foo.c -lterminfo
$ MALLOC_OPTIONS=J ./a.out
Boom.

XXX: pullup-7
2016-04-01 19:59:08 +00:00
msaitoh
43e79b977e Add malloc.conf.5 (link to jemalloc.3). 2016-04-01 12:37:48 +00:00
martin
a13d81e5df No fenv for m68k with SOFTFLOAT for now - so at least it builds. 2016-03-30 07:44:06 +00:00
martin
a49d73fd0a Drop fixxfdi.c for m68k (where double == long double and this isn't needed
but causes duplicate symbols with softfloat, if compiling MKSOFTFLOAT=yes)
2016-03-30 07:25:33 +00:00
skrll
e4a98f388f crt0-common.c is miscompiled by gcc 5.3 on evbarm with -O2 so use -O1. Do
this for all non-x86 arches.
2016-03-29 21:23:05 +00:00
martin
60de583e7a Avoid warnings (signed/unsigned comparision and unused variable) 2016-03-29 18:42:29 +00:00
mrg
19cbd6805c distinguish between partial and failed read, so that "read 0xffffffff bytes failed"
is not output..
2016-03-29 06:51:40 +00:00
mrg
09a7b9833f add a hack for GCC 5 and non-x86 platforms:
build crtbeginS.o with -O1 as GCC tries to be very smart with the
__DTOR_LIST__ as it believes it knows the size of the array at
compile time (which is not true until link time).  on SPARC and
MIPS, the result was emitting a call to 0.

technically, i believe that GCC isn't "wrong" to make this choice,
as the array is declared with a well-known initialiser size in the
crtbegin.c compilation unit, and we have noticed that the libgcc
version of this code has some hacks added, most likely to avoid
being bitten by this optimisation.


this makes sshd work for me on earm and sparc with GCC 5.
2016-03-27 00:03:06 +00:00
martin
1d9390077f Do not store FP registers in softfloat userland 2016-03-26 11:57:32 +00:00
martin
6e8af743d4 Make sure to define __SOFT_FP__ when building a SOFTFLOAT userland 2016-03-26 07:31:11 +00:00
riastradh
bec9c2fe3c KNF 2016-03-25 22:13:23 +00:00
christos
4e541d85ca Start removing the WIDECHAR ifdefs; building without it has stopped working
anyway. (Ingo Schwarze)
2016-03-23 22:27:48 +00:00
christos
62666ab4cc put back NUL check (Ingo Schwarze) 2016-03-22 01:38:17 +00:00
christos
6b5dea1b27 Fix reversed condition in tty_end() (Ingo Schwarze)
Also don't succeed if calling setup twice.
2016-03-22 01:34:32 +00:00
wiz
1b0989ebef Sort errors. Improve markup. 2016-03-20 20:09:49 +00:00
skrll
3593a88925 Update {read,write}fpsr to work everywhere 2016-03-20 14:22:46 +00:00
christos
4f0a81a7d2 Save and restore all the registers we need instead of playing tricks and
"knowing" which registers the compiler clobbers. gcc-5.3 clobbers both
rcx and rdx...
2016-03-19 21:27:38 +00:00