History log of /netbsd-src/lib/libc/gen/ftok.c (Results 1 – 12 of 12)
Revision Date Author Comments
# 21d1b523 26-Jul-2018 kamil <kamil@NetBSD.org>

Avoid undefined behavior in ftok(3)

Do not change the signedness bit with a left shift operation.
Cast to unsigned integer to prevent this.

ftok.c:56:10, left shift of 123456789 by 24 places cannot

Avoid undefined behavior in ftok(3)

Do not change the signedness bit with a left shift operation.
Cast to unsigned integer to prevent this.

ftok.c:56:10, left shift of 123456789 by 24 places cannot be represented in type 'int'
ftok.c:56:10, left shift of 4160 by 24 places cannot be represented in type 'int'

Detected with micro-UBSan in the user mode.

show more ...


# cf884af3 20-Mar-2012 matt <matt@NetBSD.org>

Use C89 definitions.
Remove use of __P


# 2fa09966 15-Sep-2004 hubertf <hubertf@NetBSD.org>

Change copyright to 2-clause BSD-copyright.
Changed with explicit permission of Thorsten Lockert (tholo sigmasoft com)


# 60549036 22-Jan-2000 mycroft <mycroft@NetBSD.org>

Delint.
Remove trailing ; from uses of __weak_alias(). The macro inserts this if
needed.


# d8962612 20-Sep-1999 lukem <lukem@NetBSD.org>

back out the #ifdef _DIAGNOSTIC argument checks; too many people complained.
_DIAGASSERT() is still retained.


# b48252f3 16-Sep-1999 lukem <lukem@NetBSD.org>

* use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
and attemp

* use _DIAGASSERT() to check pointer arguments against NULL and file
descriptors against -1 (as appropriate).
* add actual checks which to detect stuff that would trigger_DIAGASSERT(),
and attempt to return a sane error condition.
* knf some code
* remove some `register' decls.

the first two items result in the addition of code similar to the
following in various functions:

_DIAGASSERT(path != NULL)
#ifdef _DIAGNOSTIC
if (path == NULL) {
errno = EFAULT;
return (-1);
}
#endif

show more ...


# 7ffe9279 12-Nov-1998 christos <christos@NetBSD.org>

Change the signature of ftok from (const char *, char) to (const char *, int)
Document that only the 8 least significant bits are used in the key generation
and that the return value is (key_t)-1
[th

Change the signature of ftok from (const char *, char) to (const char *, int)
Document that only the 8 least significant bits are used in the key generation
and that the return value is (key_t)-1
[this is to fix K&R vs. ansi compilation and lint warnings]

show more ...


# 43fa6fe3 21-Jul-1997 jtc <jtc@NetBSD.org>

If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore. The library will

If port provides __weak_alias(), provide an Standard C and POSIX pure
identifier namespace by renaming non standard functions and variables
such that they have a leading underscore. The library will use those
names internally. Weak aliases are used to provide the original names
to the API.

This is only the first part of this change. It is most of the functions
which are implemented in C for all NetBSD ports. Subsequent changes are
to add the same support to the remaining C files, to assembly files, and
to the automagically generated assembly source used for system calls.
When all of the above is done, ports with weak alias support should add
a definition for __weak_alias to <sys/cdefs.h>.

show more ...


# 26cc2d4f 13-Jul-1997 christos <christos@NetBSD.org>

Fix RCSID's


# 72c46b1c 27-Feb-1995 cgd <cgd@NetBSD.org>

merge with Lite, keeping local changes. Also use new Id format.


# c9f8f01b 26-Jun-1994 jtc <jtc@NetBSD.org>

Moved RCS ID into static variable rcsid


# 288ce51d 26-Jun-1994 jtc <jtc@NetBSD.org>

Ftok() routine, needed by most programs that use SysV IPC.