Thread (28 messages) 28 messages, 2 authors, 2026-01-21

Re: History of const in C++, C89, and POSIX.1-1988 (was: [PATCH v1 02/19] man/man2/access.2: HISTORY: Specify different)

From: Alejandro Colomar <alx@kernel.org>
Date: 2026-01-20 13:59:43

On Tue, Jan 20, 2026 at 02:52:25PM +0100, Alejandro Colomar wrote:
For example, here's how qsort(3) was implemented in 4.3BSD (1986):
BTW, there's a git repository that includes all of the historic Unix
systems: <git@github.com:dspinellis/unix-history-repo.git>

I use it when I need to inspect old Unix sysmtems.  I have checked out
a few of them in separate git-worktree(1)'s:

	alx@devuan:~/src/unix/unix$ ls -a
	.  ..  .bare.git  4.3BSD  v3  v4  v5  v6  v7
	alx@devuan:~/src/unix/unix$ ls | xargs -I {} git -C {} status
	HEAD detached at BSD-4_3
	nothing to commit, working tree clean
	HEAD detached at Research-V3
	nothing to commit, working tree clean
	HEAD detached at Research-V4
	nothing to commit, working tree clean
	HEAD detached at Research-V5
	nothing to commit, working tree clean
	HEAD detached at Research-V6
	nothing to commit, working tree clean
	HEAD detached at Research-V7
	nothing to commit, working tree clean
	alx@devuan:~/src/unix/unix/4.3BSD$ cat ./usr/src/lib/libc/gen/qsort.c \
	| sed -n \
		-e '/^qsort/,/^{/p' \
		-e '/compar\>/p' \
		-e '/qcmp/p' \
		-e '/^}/{p;q}' \
	| uniq;
	static  int		(*qcmp)();		/* the comparison routine */
	qsort(base, n, size, compar)
		char	*base;
		int	n;
		int	size;
		int	(*compar)();
	{
		qcmp = compar;
			if (qcmp(j, lo) > 0)
			while (qcmp(hi -= qsz, min) > 0)
	}
-- 
<https://www.alejandro-colomar.es>

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help