summaryrefslogtreecommitdiffstats
path: root/src/util
Commit message (Collapse)AuthorAgeFilesLines
...
* profile code never destroys its per-file mutexesKen Raeburn2005-01-142-6/+12
| | | | | | | | | | * prof_file.c (profile_free_file_data): Destroy mutex before freeing containing structure. ticket: new target_version: 1.4 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17029 dc483132-0cff-0310-8789-dd5450dbe970
* * threads.c (krb5int_mutex_lock_update_stats,Ken Raeburn2005-01-052-0/+24
| | | | | | | krb5int_mutex_unlock_update_stats, krb5int_mutex_report_stats) [_WIN32 && !DEBUG_THREADS_STATS]: Define empty versions for Windows. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16997 dc483132-0cff-0310-8789-dd5450dbe970
* run "make depend"Ken Raeburn2004-12-305-101/+118
| | | | | | | | In most library directories, this just affects where the line breaks are. In most other directories, it's just dropping a trailing blank line. One or two files really do have updated dependencies. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16987 dc483132-0cff-0310-8789-dd5450dbe970
* Do the target object file name hacking in "make depend" earlier, before theKen Raeburn2004-12-303-6/+29
| | | | | | | | | | | | | | | | | line breaks are recomputed, instead of after. This will result in lots of whitespace changes in dependencies in directories that build library object files, but the final output is nicer (fewer long lines), and running "make depend" uses one fewer invocation of sed (balancing out the extra one I added in another checkin earlier today). * config/post.in (.depend): Don't do target name munging here. (.depfix2.sed): Pass extra value $(STLIBOBJS). * util/depfix.sed: Don't change foo.o to $(OUTPRE)foo.$(OBJEXT) here. * util/depgen.sed: Add new argument for STLIBOBJS. Do the OUTPRE/OBJEXT substitution here, and if STLIBOBJS is non-empty, add foo.so and foo.po while we're at it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16986 dc483132-0cff-0310-8789-dd5450dbe970
* * def-check.pl: Check for PRIVATE or INTERNAL annotations in defsTom Yu2004-12-212-1/+13
| | | | | | | | | | file. ticket: 2796 version_reported: 1.4 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16976 dc483132-0cff-0310-8789-dd5450dbe970
* 2004-12-15 Jeffrey Altman <jaltman@mit.edu>Jeffrey Altman2004-12-152-2/+6
| | | | | | | | rename krb5support_32.dll to k5sprt32.dll ticket: 2804 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16934 dc483132-0cff-0310-8789-dd5450dbe970
* insufficient locking in profile re-reading caseKen Raeburn2004-12-152-1/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If profiles are open and iterators in use while the on-disk file is being modified (see tests/threads/prof1.c), the re-reading of the file can cause data to be freed up. The iterator code does no locking and assumes that the profile node tree won't be touched. During our Monday meeting we discussed changing the iterator code to "snapshot" the current state of the file if it were modified, so that a more consistent picture could be returned, essentially by bumping a reference count for the life of the iterator object. The reference count I was thinking of turns out to be used for a different purpose; we'd have to add another layer of indirection, another ref count, and another mutex to accomplish this. There might be a more reasonable way to go about it, but I don't want to tackle it for 1.4 when we're already shipping beta releases. This patch just adds locking to the current iterator code so that the file data can't be replaced while the iterator is being processed. The inconsistent-view issue remains. * prof_tree.c (profile_node_iterator): When the iterator has a current file, lock it, and unlock it before changing it or returning. ticket: new status: resolved target_version: 1.4 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16932 dc483132-0cff-0310-8789-dd5450dbe970
* * libkrb5support.exports: Add krb5int_in6addr_anyKen Raeburn2004-12-062-0/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16914 dc483132-0cff-0310-8789-dd5450dbe970
* hooks for recording statistics on locking behaviorKen Raeburn2004-12-064-0/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Finish the hooks (left disabled by default) for logging somewhere the recorded timing behavior relating to the use of locks in the krb5 code. Currently, "reporting" means writing to /dev/tty or stderr, and the data is the number of times a mutex is locked, file and line where it was created, min/avg/max/stddev wait times to acquire the lock and hold times, and stats are only written out for locks that were locked a certain minimum number of times and with a minimum average wait time. The criteria are all controlled in threads.c, and k5-thread.h just has the hooks for gathering data. So turning on/off the data gathering requires a full rebuild, but tweaking the reporting is mostly just a relinking pass. (May also require adding a dependence on the math library to the support library; for a static build that may impact a lot of makefiles.) * include/k5-thread.h [DEBUG_THREADS_STATS]: Include string.h and inttypes.h. (get_current_time) [DEBUG_THREADS_STATS]: Define as inline. (k5_mutex_init_stats) [DEBUG_THREADS_STATS]: Save away current time as creation time. (k5_mutex_stats_tmp): New typedef, k5_debug_time_t if recording stats, dummy int otherwise. (k5_mutex_stats_start): New macro, get current time if recording, zero otherwise. (krb5int_mutex_lock_update_stats, krb5int_mutex_unlock_update_stats, krb5int_mutex_report_stats) [DEBUG_THREADS_STATS]: Declare. (krb5int_mutex_report_stats) [! DEBUG_THREADS_STATS]: New macro, does nothing. (k5_mutex_lock_update_stats, k5_mutex_unlock_update_stats): New macros, map to krb5int_ functions if recording, dummy statements otherwise. (k5_mutex_destroy): Call krb5int_mutex_report_stats. (k5_mutex_lock, k5_mutex_lock_1): Call k5_mutex_stats_start and k5_mutex_lock_update_stats. (k5_mutex_unlock_1): Call k5_mutex_unlock_update_stats. * util/support/threads.c [DEBUG_THREADS_STATS]: Include stdio.h. (stats_logfile) [DEBUG_THREADS_STATS]: New variable. (krb5int_thread_support_init) [DEBUG_THREADS_STATS]: Set it to point to a file on /dev/tty or stderr. (krb5int_thread_support_fini) [DEBUG_THREADS_STATS]: Flush it. (k5_mutex_lock_update_stats, krb5int_mutex_unlock_update_stats, get_stddev, krb5int_mutex_report_stats) [DEBUG_THREADS_STATS]: New functions. * util/support/libkrb5support.exports: Add krb5int_mutex_*_stats. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16913 dc483132-0cff-0310-8789-dd5450dbe970
* * fake-addrinfo.c (HAVE_GETADDRINFO, HAVE_GETNAMEINFO)[_WIN32]: Don't defineKen Raeburn2004-11-192-8/+15
| | | | | | | | | here. (protoname): Handle IPPROTO_IGMP. (debug_dump_addrinfo_args): Update for current interfaces to socktypename and familyname. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16893 dc483132-0cff-0310-8789-dd5450dbe970
* make dependKen Raeburn2004-11-162-7/+12
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16875 dc483132-0cff-0310-8789-dd5450dbe970
* 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
* * et_h.awk: Declare initialize_*_error_table as taking no arguments.Ken Raeburn2004-11-053-2/+8
| | | | | | | | | * et_h.pl: Regenerated. ticket: 2770 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16865 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_init.c, profile.hin: added profile_is_modified and ↵Alexandra Ellwood2004-11-043-0/+41
| | | | | | | | profile_is_writable so that callers can check to see if profile_release() will fail before calling it ticket: 2751 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16860 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_set.c: profile calls which set values should not fail if file is not ↵Alexandra Ellwood2004-11-042-3/+7
| | | | | | | | writable. You can now write to a different file with profile_flush_to_file() or buffer with profile_flush_to_buffer() ticket: 2750 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16858 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
* fix mkrel's RELTAIL handlingTom Yu2004-10-312-4/+10
| | | | | | | | | | | * mkrel: Rework quoting for RELTAIL check. Don't check RELTAIL if doing a "-current" snapshot. ticket: new target_version: 1.4 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16850 dc483132-0cff-0310-8789-dd5450dbe970
* call stat less often on krb5.confKen Raeburn2004-10-303-0/+37
| | | | | | | | | | | | | | | | | | | | Changes suggested by lxs to reduce stat frequency to once per second. In parallel loops creating and destroying krb5 contexts on Mac OS X, this seems to improve performance by 10%, though it's hard to be sure because the times are variable. * prof_int.h (STAT_ONCE_PER_SECOND): Define. (struct _prf_data_t) [STAT_ONCE_PER_SECOND]: New field LAST_STAT. * prof_file.c (scan_shared_trees_locked, scan_shared_trees_unlocked): Redefine to do nothing for now. (profile_update_file_data) [STAT_ONCE_PER_SECOND]: If the current time is the same time as the last stat of the file, just return; otherwise, save away the current time. ticket: new status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16847 dc483132-0cff-0310-8789-dd5450dbe970
* Permit exporting profile file data into a bufferKen Raeburn2004-10-279-32/+215
| | | | | | | | | | | | | | | | | | | | | * prof_file.c (profile_flush_file_data_to_buffer): New function. * profi_init.c (profile_flush_to_buffer, profile_free_buffer): New functions. * prof_parse.c (output_quoted_string): Use a callback instead of stdio calls. (dump_profile): Renamed from dump_profile_to_file. Use a callback instead of stdio calls. (dump_profile_to_file_cb): New function. (profile_write_tree_file): Updated to new internal interface. (struct prof_buf): New type. (add_data_to_buffer, dump_profile_to_buffer_cb, profile_write_tree_to_buffer): New functions. * prof_int.h (profile_write_tree_to_buffer, profile_flush_file_data_to_buffer): Declare. * profile.hin (profile_flush_to_buffer, profile_free_buffer): Declare. * libprofile.exports: Export profile_flush_to_buffer and profile_free_buffer. * profile.swg (profile_flush_to_buffer): Declare. * profile_tcl.c: Regenerated. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16838 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
* * prof_file.c (profile_update_file_data): When resetting flags, preserve SHAREDKen Raeburn2004-10-223-25/+75
| | | | | | | | | | flag. (scan_shared_trees_locked, scan_shared_trees_unlocked): Convert to macros, so line numbers reported by assert will be useful. * prof_test1 (test2): Run new test of modifications with other existing open profile handles. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16834 dc483132-0cff-0310-8789-dd5450dbe970
* * libprofile.exports: Add profile_flush_to_fileKen Raeburn2004-10-192-0/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16830 dc483132-0cff-0310-8789-dd5450dbe970
* Allow profile library caller to write the modified data to a differentKen Raeburn2004-10-188-28/+122
| | | | | | | | | | | | | | | | | | | | file than was originally read. * prof_file.c (write_data_to_file): New function, split out from profile_flush_file_data. Add argument can_create indicating whether the old file should already exist or not. (profile_flush_file_data): Call it. (profile_flush_file_data_to_file): New function. * prof_int.h (profile_flush_file_data_to_file): Declare it. (profile_flush_file_to_file): New macro. * prof_init.c (profile_flush_to_file): New function. * profile.hin (profile_flush_to_file): Declare. * profile.swg (profile_flush_to_file): Declare. * profile_tcl.c: Regenerated. * prof_test1: Use profile_flush_to_file instead of profile_flush, and reload from the new filename. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16825 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_file.c, prof_int.h, prof_set.c: Remove support for non-SHARE_TREE_DATAKen Raeburn2004-10-155-73/+107
| | | | | | | | | | | | | | | | | | | | case. * prof_int.h (struct _prf_data_t): Change filespec to a trailing char array. Add a length field for the filespec. (profile_make_prf_data): Declare. (profile_lock_global, profile_unlock_global): Prototypes need argument lists. * prof_file.c: Include stddef.h. (scan_shared_trees_locked, scan_shared_trees_unlocked): New functions. (r_access, rw_access): Now take const_profile_filespec_t arg. (profile_make_prf_data): New function. (profile_open_file): Scan trees at beginning and end. Use profile_make_prf_data to allocate and initialize storage. (profile_dereference_data, profile_free_file_data): Scan trees. (profile_ser_size, profile_ser_externalize): Filespec is never null. * prof_set.c (rw_setup): Use profile_make_prf_data to allocate and initialize storage. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16822 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_file.c (profile_library_initializer, profile_library_finalizer): ↵Alexandra Ellwood2004-10-132-0/+10
| | | | | | | | | Added macros to avoid adding error tables on platforms that don't use them (ie: OSX) ticket: 2741 version_fixed: 1.4 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16818 dc483132-0cff-0310-8789-dd5450dbe970
* Need prototypes for profile_lock_global and profile_unlock_globalAlexandra Ellwood2004-10-132-0/+8
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16817 dc483132-0cff-0310-8789-dd5450dbe970
* Fix small memory leak in repeated krb5 context creation and deletion:Ken Raeburn2004-10-133-2/+8
| | | | | | | | * prof_init.c (profile_init): Don't add error table here. * prof_file.c (profile_library_initializer): Add it here. (profile_library_finalizer): Remove it here. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16815 dc483132-0cff-0310-8789-dd5450dbe970
* * et_c.awk, et_h.awk: Fix off-by-one error.Tom Yu2004-10-075-4/+11
| | | | | | * et_c.pl, et_h.pl: Regenerated. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16813 dc483132-0cff-0310-8789-dd5450dbe970
* * et_c.awk, et_h.awk: Complain if the error table is too large.Ken Raeburn2004-10-075-14/+41
| | | | | | * et_c.pl, et_h.pl: Regenerated. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16811 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_file.c (profile_dereference_data_locked): New function.Ken Raeburn2004-09-284-2/+18
| | | | | | | | (profile_dereference_data): Call it. * prof_set.c (rw_setup): Likewise. * prof_int.h (profile_dereference_data_locked): Declare it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16792 dc483132-0cff-0310-8789-dd5450dbe970
* * Makefile.in (check-unix-tcl-ok): Use KRB5_RUN_ENVTom Yu2004-09-263-1/+9
| | | | | | * configure.in: Use KRB5_RUN_FLAGS. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16791 dc483132-0cff-0310-8789-dd5450dbe970
* Make patchlevel.h be the master version fileTom Yu2004-09-254-15/+72
| | | | | | | ticket: 1345 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16790 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_tree.c (struct profile_node): Add new bitfield DELETED.Ken Raeburn2004-09-236-13/+109
| | | | | | | | | | | | | | | | (profile_add_node): Move variable CMP into inner block where it's used. Clear deleted flag. (profile_find_node): Skip deleted nodes. (profile_remove_node): Just set the deleted flag, don't modify the tree. * Makefile.in (profile_tcl.c): Target should be in srcdir. (profile_tcl.o): Depend on profile.h. (DO_TCL): New variable. (check-unix-tcl-, check-unix-tcl-ok): New targets. (check-unix): Depend on one of them, based on DO_TCL. * configure.in: Set and substitute DO_TCL. * prof_test1: New file. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16784 dc483132-0cff-0310-8789-dd5450dbe970
* regeneratedKen Raeburn2004-09-231-6/+8
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16783 dc483132-0cff-0310-8789-dd5450dbe970
* * profile.swg: Only include tclsh.i if building for Tcl.Ken Raeburn2004-09-232-3/+26
| | | | | | | | | (Tcl_SetResult, my_tcl_setresult): Compile hack only if building for Tcl. (%typemap SWIGTYPE *OUTPUT): Initialization is not specific to the scripting language. Add Python code. (%typemap errcode_t, errcode_t*): Add placeholders for Python support. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16782 dc483132-0cff-0310-8789-dd5450dbe970
* Better support for using libutil on systems that need it for variousTom Yu2004-09-222-0/+7
| | | | | | pty-related functions. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16777 dc483132-0cff-0310-8789-dd5450dbe970
* * reconf: Export ACLOCAL=true to environmentKen Raeburn2004-09-152-0/+9
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16757 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_file.c (profile_open_file): If an error occurs while updating from theKen Raeburn2004-08-282-0/+8
| | | | | | input file, destroy the mutex only if we're not sharing file data. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16698 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_parse.c (parse_std_line): Rewrite handling of whitespace in and afterKen Raeburn2004-08-282-6/+20
| | | | | | | | | | | | | | tag, to strip trailing whitespace (per current locale, not just ASCII space characters), and prohibit any internal space characters in tag names. (This is not the patch supplied in the bug report; that patch changed the tag handling to allow spaces in tag names, which we haven't previously allowed. On the other hand, we haven't specifically disallowed internal tabs or other whitespace, either, and this patch does so.) ticket: 2614 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16697 dc483132-0cff-0310-8789-dd5450dbe970
* * profile_tcl.c: New file, generated from profile.swg, but checked in to avoidKen Raeburn2004-08-272-0/+2084
| | | | | | requiring swig in order to generate the test program. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16692 dc483132-0cff-0310-8789-dd5450dbe970
* * profile.swg: New file.Ken Raeburn2004-08-274-4/+266
| | | | | | | | | | | * configure.in: Look for Tcl. * Makefile.in (profile_tcl, profile_tcl.c, profile_tcl.o): New targets, not built by default. (PROG_LIBPATH, PROG_RPATH, LOCALINCLUDES): Add Tcl options. (DEFINES): Define. (clean-unix): Delete profile_tcl. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16691 dc483132-0cff-0310-8789-dd5450dbe970
* * run.test (getnwords): Run data through "cat -v", because at least one versionKen Raeburn2004-08-272-1/+11
| | | | | | | of Debian Linux has an English dictionary with Latin-1 characters and a "rev" that seems to default to some sort of Unicode. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16690 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_int.h (struct _prf_data_t): Add a mutex.Ken Raeburn2004-08-275-50/+142
| | | | | | | | | | | | | | * prof_file.c (profile_open_file): Initialize data mutex. (profile_update_file_data, profile_flush_file_data): Lock it while manipulating file data. (profile_lock_global, profile_unlock_global): New functions. * prof_set.c (rw_setup): Acquire global lock while checking flags and adjusting ref count. (profile_update_relation, profile_rename_section, profile_add_relation): Lock data mutex while manipulating profile data. * prof_tree.c (profile_node_iterator): Do more magic number tests. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16689 dc483132-0cff-0310-8789-dd5450dbe970
* whitespaceKen Raeburn2004-08-211-10/+10
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16677 dc483132-0cff-0310-8789-dd5450dbe970
* * run.test (getnwords): Rewrite to drop blank lines before counting lines, ↵Ken Raeburn2004-08-152-1/+6
| | | | | | not after git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16665 dc483132-0cff-0310-8789-dd5450dbe970
* * run.test (getnwords): New function. Uses sed to get N words from $DICT asKen Raeburn2004-08-122-11/+21
| | | | | | | other functions did before, but discards blank lines. (test1, test2, test12, test13, test20): Call getnwords. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16660 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
* * configure.in: Only sanity-check setutent() API if there is noTom Yu2004-07-302-16/+23
| | | | | | | | | utmpx.h, since some setutent() implementations aren't sysV-derived, e.g., NetBSD. ticket: 2432 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16633 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