History log of /freebsd-current/usr.bin/which/which.c
Revision Date Author Comments
# 8268a31b 10-Feb-2024 Collin Funk <collin.funk1@gmail.com>

which: Use size_t instead of ssize_t for pathlen

The "pathlen" variable is the return value of strlen(3) and is then
passed as an argument to malloc(3) and memcpy(3). The size_t type
matches the prototype for these functions. The size_t type is unsigned
so it can fit larger $PATH values than ssize_t. However, in practice
ssize_t should be larger enough so this change is just for clarity.

Signed-off-by: Collin Funk <collin.funk1@gmail.com>

MFC after: 1 week
Pull Request: https://github.com/freebsd/freebsd-src/pull/1113


# e5d258c9 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line .c pattern

Remove /^#include\s+<sys/cdefs.h>.*$\n\s+__FBSDID\("\$FreeBSD\$"\);\n/


# 1de7b4b8 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

various: general adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

No functional change intended.


# d481fdf2 19-Apr-2017 Enji Cooper <ngie@FreeBSD.org>

which(1): sort #includes

No functional change [intended].

MFC after: 7 weeks
Sponsored by: Dell EMC Isilon


# a6b1979b 19-Apr-2017 Enji Cooper <ngie@FreeBSD.org>

Clean up trailing whitespace

No functional changes

MFC after: 1 week
Sponsored by: Dell EMC Isilon


# 94cd9385 06-Nov-2011 Ed Schouten <ed@FreeBSD.org>

Mark global functions and/or variables in which(1) static where possible.

This allows compilers and static analyzers to more thorough analysis.


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# b7a311f2 10-Feb-2005 Ruslan Ermilov <ru@FreeBSD.org>

Require at least one argument.


# 721da592 30-Jun-2002 Tim J. Robbins <tjr@FreeBSD.org>

Handle relative and absolute pathnames (anything with a `/' in it) in the same
way as execve(2), and the old perl which(1).

PR: 35718


# 8c821782 29-Jun-2002 Tim J. Robbins <tjr@FreeBSD.org>

Treat empty PATH elements as "." for tradition and consistency with the
old Perl which(1) script.

PR: 35719


# f2c819bf 09-Mar-2002 Wolfram Schneider <wosch@FreeBSD.org>

Off by one error in checking max file name length.


# 1c6cde4b 11-Dec-2001 Mark Murray <markm@FreeBSD.org>

Use FBSDID(), WARNS=2 fix.

Mkaefile does not use WARNS=2 beacuse this will be made default.


# cc70d84c 29-Aug-2000 Brian Feldman <green@FreeBSD.org>

Use a C version of which(1).

Submitted by: Dan Papasian <bugg@bugg.strangled.net>
Reviewed by: jhb