History log of /netbsd-current/lib/libc/stdlib/reallocarray.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.12 28-Oct-2022 wiz

put reallocarray() in the public namespace

reallocarray() will be part of the next POSIX release, see
https://austingroupbugs.net/view.php?id=1218

adapt an errno value to match POSIX expectations

As discussed on tech-userlevel


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
# 1.11 26-Feb-2021 christos

arrange for tools build


Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.10 04-Jan-2018 kamil

Add bunch of missing includes of namespace.h in libc

The NetBSD Standard C Library uses internally some of its functions with
a mangled symbol name, usually "_symbol". The internal functions shall not
use the global (public) symbols.

This change eliminates usage of the global changes of the following symbols:
- strlcat -> _strlcat
- sysconf -> __sysconf
- closedir -> _closedir
- fparseln -> _fparseln
- kill -> _kill
- mkstemp -> _mkstemp
- reallocarr -> _reallocarr
- strcasecmp -> _strcasecmp
- strncasecmp -> _strncasecmp
- strptime -> _strptime
- strtok_r -> _strtok_r
- sysctl -> _sysctl
- dlopen -> __dlopen
- dlclose -> __dlclose
- dlsym -> __dlsym

Sponsored by <The NetBSD Foundation>


# 1.9 07-Oct-2017 christos

remove recallocarray


# 1.8 07-Oct-2017 christos

add recallocarray


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.7 06-Apr-2016 roy

Revert prior, no idea why it was causing me problems, but it no longer does.


# 1.6 05-Apr-2016 roy

Stop calling reallocarr and just do the same bounds checking but without
messing around with copying pointers which was causing ssh to crash.


# 1.5 26-Jul-2015 kamil

reallocarray(3) cleanup

Add missing NetBSD CVS Id
Don't define twice _OPENBSD_SOURCE


# 1.4 10-Mar-2015 christos

Behave in an OpenBSD compatible way for 0.


# 1.3 17-Feb-2015 christos

use reallocarr()


# 1.2 17-Feb-2015 joerg

Move reallocarray under _OPENBSD_SOURCE where it belongs.


# 1.1 05-Feb-2015 christos

Add and use reallocarray() to prevent a multiplication overflow in allocation.
Reported by Guido Vranken, thanks!


# 1.11 26-Feb-2021 christos

arrange for tools build


Revision tags: netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.10 04-Jan-2018 kamil

Add bunch of missing includes of namespace.h in libc

The NetBSD Standard C Library uses internally some of its functions with
a mangled symbol name, usually "_symbol". The internal functions shall not
use the global (public) symbols.

This change eliminates usage of the global changes of the following symbols:
- strlcat -> _strlcat
- sysconf -> __sysconf
- closedir -> _closedir
- fparseln -> _fparseln
- kill -> _kill
- mkstemp -> _mkstemp
- reallocarr -> _reallocarr
- strcasecmp -> _strcasecmp
- strncasecmp -> _strncasecmp
- strptime -> _strptime
- strtok_r -> _strtok_r
- sysctl -> _sysctl
- dlopen -> __dlopen
- dlclose -> __dlclose
- dlsym -> __dlsym

Sponsored by <The NetBSD Foundation>


# 1.9 07-Oct-2017 christos

remove recallocarray


# 1.8 07-Oct-2017 christos

add recallocarray


Revision tags: netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 netbsd-8-0-RELEASE netbsd-8-0-RC2 netbsd-8-0-RC1 matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.7 06-Apr-2016 roy

Revert prior, no idea why it was causing me problems, but it no longer does.


# 1.6 05-Apr-2016 roy

Stop calling reallocarr and just do the same bounds checking but without
messing around with copying pointers which was causing ssh to crash.


# 1.5 26-Jul-2015 kamil

reallocarray(3) cleanup

Add missing NetBSD CVS Id
Don't define twice _OPENBSD_SOURCE


# 1.4 10-Mar-2015 christos

Behave in an OpenBSD compatible way for 0.


# 1.3 17-Feb-2015 christos

use reallocarr()


# 1.2 17-Feb-2015 joerg

Move reallocarray under _OPENBSD_SOURCE where it belongs.


# 1.1 05-Feb-2015 christos

Add and use reallocarray() to prevent a multiplication overflow in allocation.
Reported by Guido Vranken, thanks!


# 1.10 04-Jan-2018 kamil

Add bunch of missing includes of namespace.h in libc

The NetBSD Standard C Library uses internally some of its functions with
a mangled symbol name, usually "_symbol". The internal functions shall not
use the global (public) symbols.

This change eliminates usage of the global changes of the following symbols:
- strlcat -> _strlcat
- sysconf -> __sysconf
- closedir -> _closedir
- fparseln -> _fparseln
- kill -> _kill
- mkstemp -> _mkstemp
- reallocarr -> _reallocarr
- strcasecmp -> _strcasecmp
- strncasecmp -> _strncasecmp
- strptime -> _strptime
- strtok_r -> _strtok_r
- sysctl -> _sysctl
- dlopen -> __dlopen
- dlclose -> __dlclose
- dlsym -> __dlsym

Sponsored by <The NetBSD Foundation>


# 1.9 07-Oct-2017 christos

remove recallocarray


# 1.8 07-Oct-2017 christos

add recallocarray


Revision tags: matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.7 06-Apr-2016 roy

Revert prior, no idea why it was causing me problems, but it no longer does.


# 1.6 05-Apr-2016 roy

Stop calling reallocarr and just do the same bounds checking but without
messing around with copying pointers which was causing ssh to crash.


# 1.5 26-Jul-2015 kamil

reallocarray(3) cleanup

Add missing NetBSD CVS Id
Don't define twice _OPENBSD_SOURCE


# 1.4 10-Mar-2015 christos

Behave in an OpenBSD compatible way for 0.


# 1.3 17-Feb-2015 christos

use reallocarr()


# 1.2 17-Feb-2015 joerg

Move reallocarray under _OPENBSD_SOURCE where it belongs.


# 1.1 05-Feb-2015 christos

Add and use reallocarray() to prevent a multiplication overflow in allocation.
Reported by Guido Vranken, thanks!


# 1.9 07-Oct-2017 christos

remove recallocarray


# 1.8 07-Oct-2017 christos

add recallocarray


Revision tags: perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.7 06-Apr-2016 roy

Revert prior, no idea why it was causing me problems, but it no longer does.


# 1.6 05-Apr-2016 roy

Stop calling reallocarr and just do the same bounds checking but without
messing around with copying pointers which was causing ssh to crash.


# 1.5 26-Jul-2015 kamil

reallocarray(3) cleanup

Add missing NetBSD CVS Id
Don't define twice _OPENBSD_SOURCE


# 1.4 10-Mar-2015 christos

Behave in an OpenBSD compatible way for 0.


# 1.3 17-Feb-2015 christos

use reallocarr()


# 1.2 17-Feb-2015 joerg

Move reallocarray under _OPENBSD_SOURCE where it belongs.


# 1.1 05-Feb-2015 christos

Add and use reallocarray() to prevent a multiplication overflow in allocation.
Reported by Guido Vranken, thanks!


Revision tags: pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.7 06-Apr-2016 roy

Revert prior, no idea why it was causing me problems, but it no longer does.


# 1.6 05-Apr-2016 roy

Stop calling reallocarr and just do the same bounds checking but without
messing around with copying pointers which was causing ssh to crash.


# 1.5 26-Jul-2015 kamil

reallocarray(3) cleanup

Add missing NetBSD CVS Id
Don't define twice _OPENBSD_SOURCE


# 1.4 10-Mar-2015 christos

Behave in an OpenBSD compatible way for 0.


# 1.3 17-Feb-2015 christos

use reallocarr()


# 1.2 17-Feb-2015 joerg

Move reallocarray under _OPENBSD_SOURCE where it belongs.


# 1.1 05-Feb-2015 christos

Add and use reallocarray() to prevent a multiplication overflow in allocation.
Reported by Guido Vranken, thanks!