summaryrefslogtreecommitdiffstats
path: root/src/util/support
Commit message (Collapse)AuthorAgeFilesLines
...
* Make static linking not require -lsocket, -lnsl, etc.Ken Raeburn2004-11-156-106/+217
| | | | | | | | | | | | | | | | | | | | | Don't duplicate macro definitions. Header files and comments still need some cleanup. * cache-addrinfo.h, init-addrinfo.c: New files, split out from fake-addrinfo.c. * fake-addrinfo.c: Include cache-addrinfo.h. (FAI_CACHE, struct face, struct fac): Moved to cache-addrinfo.h. (krb5int_fac, krb5int_init_fac, krb5int_fini_fac): Moved to init-addrinfo.c. (addrinfo, struct addrinfo): Don't define. (AI_* and NI_* and EAI_* macros): Don't define. * threads.c: Include cache-addrinfo.h. (krb5int_init_fac, krb5int_fini_fac): Don't declare. * Makefile.in (SRCS, STLIBOBJS, LIBOBJS): Updated. ticket: 2761 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16867 dc483132-0cff-0310-8789-dd5450dbe970
* move getaddrinfo hacks into support lib for easier maintenanceKen Raeburn2004-11-033-8/+1361
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the cache on Mac OS X, and likely to be enabled eventually on other platforms, this is going to wind up being a non-trivial amount of code on most platforms, and updating the cache code to work on other configurations is likely to take a few rounds. Rather than recompile the world and add a bunch of code to each object file doing name lookups, moving the code into the support library that already defines the static data (list head, mutex) should make things simpler. (TODO: Fix calling conventions for Windows?) * include/fake-addrinfo.h: Move most of code content into util/support/fake-addrinfo.c. (krb5int_getaddrinfo, krb5int_freeaddrinfo, krb5int_getnameinfo, krb5int_gai_strerror): Declare. (getaddrinfo, freeaddrinfo, getnameinfo, gai_strerror): Define as macros mapping to the krb5int_ function names. * util/support/fake-addrinfo.c: Import most of the contents of include/fake-addrinfo.h, so we only compile it once. (krb5int_getaddrinfo, krb5int_freeaddrinfo, krb5int_getnameinfo, krb5int_gai_strerror): New functions, always defined and exported. * util/support/libkrb5support.exports: Export the new functions, not the old _fac symbols. ticket: new status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16854 dc483132-0cff-0310-8789-dd5450dbe970
* * libkrb5support.exports: Export krb5int_fac, _lock_fac, _unlock_facKen Raeburn2004-10-252-0/+8
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16835 dc483132-0cff-0310-8789-dd5450dbe970
* * threads.c (GET_NO_PTHREAD_TSD) [!HAVE_PRAGMA_WEAK_REF]: Macro result typeKen Raeburn2004-08-082-1/+6
| | | | | | should be pointer to tsd_block. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16648 dc483132-0cff-0310-8789-dd5450dbe970
* * threads.c (krb5int_thread_support_init): Do finish initialization after ↵Ken Raeburn2004-07-312-2/+10
| | | | | | key creation in POSIX case git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16635 dc483132-0cff-0310-8789-dd5450dbe970
* Add a mutex to protect the per-process fake-getaddrinfo data cache.Ken Raeburn2004-07-233-8/+61
| | | | | | | | | | | | | | | | | | | | | | Currently it gets locked while a name lookup is in progress, which is not very efficient. That should be changed, after the code is fixed up so that the cache works on other platforms. * include/fake-addrinfo.h: Include k5-thread.h. (struct fac): Add a mutex. (plant_face, find_face): Check that mutex is already locked. (krb5int_lock_fac, krb5int_unlock_fac): Declare. (fai_add_hosts_by_name): Use them to lock and unlock the mutex. * util/support/fake-addrinfo.c (krb5int_fac): Initialize the mutex. (krb5int_init_fac, krb5int_fini_fac): New functions; finish initializing or destroy the mutex. (krb5int_lock_fac, krb5int_unlock_fac): New functions; lock the mutex after calling krb5int_call_thread_support_init, or unlock it. * util/support/threads.c (krb5int_call_thread_support_init): New function. (krb5int_init_fac, krb5int_fini_fac): Declare. (krb5int_thread_support_init, krb5int_thread_support_fini): Call them. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16622 dc483132-0cff-0310-8789-dd5450dbe970
* * fake-addrinfo.c: New file.Ken Raeburn2004-07-193-3/+60
| | | | | | * Makefile.in (STLIBOBJS, LIBOBJS, SRCS): Add it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16614 dc483132-0cff-0310-8789-dd5450dbe970
* Make thread-specific data support build under Windows (but don't enable it yet)Ken Raeburn2004-07-072-2/+11
| | | | | | | | * threads.c (struct tsd_block) [_WIN32]: Define. (k5_setspecific) [_WIN32]: Don't fill in a 'next' field. Fix variable reference for TSD key. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16551 dc483132-0cff-0310-8789-dd5450dbe970
* typo in last changeKen Raeburn2004-06-241-1/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16512 dc483132-0cff-0310-8789-dd5450dbe970
* * threads.c: Reorganize code: One definition of each function, withKen Raeburn2004-06-242-181/+177
| | | | | | | per-platform conditional tests inside, instead of per-platform definitions for each function. Combine common aspects of each function across platforms. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16511 dc483132-0cff-0310-8789-dd5450dbe970
* * threads.c (key_lock): Change to a k5_mutex_t.Ken Raeburn2004-06-212-21/+72
| | | | | | | | | | | | | | | (k5_key_register): Use k5_ lock routines. (pthread_getspecific, pthread_setspecific, pthread_key_create, pthread_key_delete) [HAVE_PRAGMA_WEAK_REF]: Declare weak. (tsd_if_single) [HAVE_PRAGMA_WEAK_REF]: New variable. (krb5int_thread_support_init): Do pthread key creation only if pthread code is loaded. (krb5int_thread_support_fini): Do pthread key deletion only if pthread code is loaded. (k5_key_register, k5_getspecific, k5_setspecific): Use tsd_if_single when pthread code is not loaded. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16502 dc483132-0cff-0310-8789-dd5450dbe970
* * Makefile.in (BUILDTOP, LIBNAME, XTRA, OBJFILE): Define for Windows.Ken Raeburn2004-06-183-2/+126
| | | | | | | | | | | | | (LIBOBJS): Define. ($(BUILDTOP)/include/krb5/autoconf.h): Disable rule on Windows. * threads.c (tls_idx, key_lock, destructors, destructors_set): New variables for Windows. (krb5int_thread_support_init, krb5int_thread_support_fini, k5_key_register, k5_getspecific, k5_setspecific, k5_key_delete, krb5int_thread_detach_hook): New functions for Windows. Some are just placeholders. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16482 dc483132-0cff-0310-8789-dd5450dbe970
* * libkrb5support.exports: Drop krb5int_foreach_localaddrKen Raeburn2004-06-142-1/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16444 dc483132-0cff-0310-8789-dd5450dbe970
* Run make dependSam Hartman2004-06-081-4/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16424 dc483132-0cff-0310-8789-dd5450dbe970
* Change all uses of LIB in UNIX makefiles to LIBBASE, for better WindowsKen Raeburn2004-06-042-1/+5
| | | | | | | | | compatibility. (Windows nmake exports make variables into the environment, and LIB is treated by the Windows linker as a search path for libraries, thus breaking the linking on Windows of anything needing libraries from the search path in directories where we build libraries on UNIX.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16411 dc483132-0cff-0310-8789-dd5450dbe970
* * threads.c (krb5int_thread_support_fini) [!ENABLE_THREADS]: Provide a dummyKen Raeburn2004-05-062-0/+8
| | | | | | function for now. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16320 dc483132-0cff-0310-8789-dd5450dbe970
* * fake-addrinfo.c: DeletedKen Raeburn2004-05-063-12/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16319 dc483132-0cff-0310-8789-dd5450dbe970
* build dependenciesKen Raeburn2004-05-051-4/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16313 dc483132-0cff-0310-8789-dd5450dbe970
* * foreachaddr.c: Deleted. Code moved to lib/krb5/os/localaddr.c.Ken Raeburn2004-05-053-840/+7
| | | | | | * Makefile.in (SRCS, STLIBOBJS): Updated. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16309 dc483132-0cff-0310-8789-dd5450dbe970
* * Makefile.in (SHLIB_EXPLIBS): Include $(LIBS).Ken Raeburn2004-05-052-2/+4
| | | | | | (SHLIB_RDIRS): Use $(KRB5_LIBDIR), for lack of anything better. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16307 dc483132-0cff-0310-8789-dd5450dbe970
* * threads.c (k5_key_register, destructors, k5_setspecific) [!ENABLE_THREADS]:Ken Raeburn2004-05-052-3/+7
| | | | | | Update to fit declarations. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16305 dc483132-0cff-0310-8789-dd5450dbe970
* exports listKen Raeburn2004-05-052-0/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16302 dc483132-0cff-0310-8789-dd5450dbe970
* * foreachaddr.c: New file, based on include/foreachaddr.cKen Raeburn2004-05-053-2/+841
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16301 dc483132-0cff-0310-8789-dd5450dbe970
* fix lib name; add fini funcKen Raeburn2004-05-041-2/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16300 dc483132-0cff-0310-8789-dd5450dbe970
* * New directory.Ken Raeburn2004-05-044-0/+315
* Makefile.in: New file. * threads.c: New file. Thread-specific data support. * fake-addrinfo.c: New file. Placeholder. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16299 dc483132-0cff-0310-8789-dd5450dbe970