mirror of
https://github.com/opnsense/src.git
synced 2026-07-05 23:37:40 -04:00
Back in 2015 when I reimplemented these functions to use an AVL tree, I was annoyed by the weakness of the typing of these functions. Both tree nodes and keys are represented by 'void *', meaning that things like the documentation for these functions are an absolute train wreck. To make things worse, users of these functions need to cast the return value of tfind()/tsearch() from 'void *' to 'type_of_key **' in order to access the key. Technically speaking such casts violate aliasing rules. I've observed actual breakages as a result of this by enabling features like LTO. I've filed a bug report at the Austin Group. Looking at the way the bug got resolved, they made a pretty good step in the right direction. A new type 'posix_tnode' has been added to correspond to tree nodes. It is still defined as 'void' for source-level compatibility, but in the very far future it could be replaced by a proper structure type containing a key pointer. MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D8205 |
||
|---|---|---|
| .. | ||
| arpa | ||
| gssapi | ||
| protocols | ||
| rpc | ||
| rpcsvc | ||
| xlocale | ||
| _ctype.h | ||
| a.out.h | ||
| ar.h | ||
| assert.h | ||
| bitstring.h | ||
| complex.h | ||
| cpio.h | ||
| ctype.h | ||
| db.h | ||
| dirent.h | ||
| dlfcn.h | ||
| elf-hints.h | ||
| elf.h | ||
| err.h | ||
| fmtmsg.h | ||
| fnmatch.h | ||
| fstab.h | ||
| fts.h | ||
| ftw.h | ||
| getopt.h | ||
| glob.h | ||
| grp.h | ||
| gssapi.h | ||
| hesiod.h | ||
| iconv.h | ||
| ieeefp.h | ||
| ifaddrs.h | ||
| inttypes.h | ||
| iso646.h | ||
| kenv.h | ||
| langinfo.h | ||
| libgen.h | ||
| limits.h | ||
| link.h | ||
| locale.h | ||
| Makefile | ||
| Makefile.depend | ||
| malloc.h | ||
| malloc_np.h | ||
| memory.h | ||
| mk-osreldate.sh | ||
| monetary.h | ||
| mpool.h | ||
| mqueue.h | ||
| ndbm.h | ||
| netconfig.h | ||
| netdb.h | ||
| nl_types.h | ||
| nlist.h | ||
| nss.h | ||
| nsswitch.h | ||
| paths.h | ||
| printf.h | ||
| proc_service.h | ||
| pthread.h | ||
| pthread_np.h | ||
| pwd.h | ||
| ranlib.h | ||
| readpassphrase.h | ||
| regex.h | ||
| res_update.h | ||
| resolv.h | ||
| runetype.h | ||
| search.h | ||
| semaphore.h | ||
| setjmp.h | ||
| signal.h | ||
| spawn.h | ||
| stab.h | ||
| stdalign.h | ||
| stdbool.h | ||
| stddef.h | ||
| stdio.h | ||
| stdlib.h | ||
| stdnoreturn.h | ||
| string.h | ||
| stringlist.h | ||
| strings.h | ||
| sysexits.h | ||
| tar.h | ||
| termios.h | ||
| tgmath.h | ||
| time.h | ||
| timeconv.h | ||
| timers.h | ||
| ttyent.h | ||
| uchar.h | ||
| ulimit.h | ||
| unistd.h | ||
| unwind.h | ||
| utime.h | ||
| utmpx.h | ||
| uuid.h | ||
| varargs.h | ||
| wchar.h | ||
| wctype.h | ||
| wordexp.h | ||
| xlocale.h | ||