aboutsummaryrefslogtreecommitdiff
path: root/src/util/et/com_err.c
AgeCommit message (Collapse)AuthorFilesLines
2024-05-22Fix more non-prototype functionsArjun1-2/+2
Add "void" designations to more function declarations and definitions not changed by commits 3ae9244cd021a75eba909d872a92c25db490714d and 4b9d7f7c107f01a61600fddcd8cde3812d0366a2. [ghudson@mit.edu: change additional functions; split into two commits; rewrote commit message]
2013-05-14Assume mutex locking cannot failGreg Hudson1-9/+5
Locking and unlocking a non-recursive mutex is a simple memory operation and should not fail on any reasonable platform with correct usage. A pthread mutex can return EDEADLK on lock or EPERM on unlock, or EINVAL if the mutex is uninitialized, but all of these conditions would reflect serious bugs in the calling code. Change the k5_mutex_lock and k5_mutex_unlock wrappers to return void and adjust all call sites. Propagate this change through k5_cc_mutex_lock and k5_cc_mutex_unlock as well.
2012-03-09Avoid side effects in assert expressionsGreg Hudson1-4/+8
asserts may be compiled out with -DNDEBUG, so it's wrong to use an assert expression with an important side effect. (We also have scores of side-effecting asserts in test programs, but those are less important and can be dealt with separately.) ticket: 7105 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25760 dc483132-0cff-0310-8789-dd5450dbe970
2009-12-07Mark and reindent util, with some exceptionsTom Yu1-77/+78
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23455 dc483132-0cff-0310-8789-dd5450dbe970
2009-10-31make mark-cstyleTom Yu1-2/+2
make reindent git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
2007-03-27All Windows apps were popping MessageBoxes when stderr is redirected. ↵Kevin Koch1-3/+11
Console apps shouldn't and no longer do that. Added isGuiApp, which tests gui resource usage Removed duplicate nested tests for _WIN32. Ticket: 5446 Status: resolved Target_Version: 1.6.1 Tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19292 dc483132-0cff-0310-8789-dd5450dbe970
2006-03-27build and export set/reset_com_err_hook on windowsKen Raeburn1-2/+0
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17781 dc483132-0cff-0310-8789-dd5450dbe970
2004-06-03Oops. Fixes last night's test failures in last night's build..Ken Raeburn1-0/+1
* com_err.c (com_err_va): In success case, don't then fall through into error case. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16402 dc483132-0cff-0310-8789-dd5450dbe970
2004-06-03The com_err library is now probably as thread-safe as it's going to get, onKen Raeburn1-7/+49
UNIX; Windows still needs work.... * com_err.c: Include stdlib.h. (com_err_hook_lock): New mutex. (com_err_lock_hook_handle): New function. (com_err_va, set_com_err_hook, reset_com_err_hook): Call com_err_finish_init, and grab the lock. * error_message.c: Don't include k5-thread.h. (com_err_finish_init): New function. (com_err_initialize): Initialize the new mutex. * error_table.h: Include k5-thread.h. (com_err_hook_lock, com_err_finish_init): Declare. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16394 dc483132-0cff-0310-8789-dd5450dbe970
2003-03-06* com_err.c, com_err.h, error_message.c, et_c.awk, et_h.awk: Removed Mac OS ↵Alexandra Ellwood1-95/+2
9-specific code. * et_h.awk: define compat macro for init_foo_err_table so that it gets defined to nothing on the Mac git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15238 dc483132-0cff-0310-8789-dd5450dbe970
2002-09-02* com_err.c (default_com_err_proc, com_err_va, set_com_err_hook): Define ↵Ken Raeburn1-16/+8
with prototype syntax git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14809 dc483132-0cff-0310-8789-dd5450dbe970
2001-10-06Danilo also says we can get rid of _MSDOS (Win16) tests, and explicit ↵Ken Raeburn1-12/+12
FAR/NEAR specs git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13786 dc483132-0cff-0310-8789-dd5450dbe970
2001-10-04Danilo says we can get rid of the DLLIMP stuff nowKen Raeburn1-2/+2
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13775 dc483132-0cff-0310-8789-dd5450dbe970
2000-12-06Remove a bunch of macro definitions we don't use.Ken Raeburn1-15/+2
Run lclint on t_com_err test case; tune options; more annotations. Use <com_err.h> instead of duplicated definitions in generated files. Rebuild Perl versions of awk scripts for generating files. Dump K&R C support, assume C89/C++. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12880 dc483132-0cff-0310-8789-dd5450dbe970
2000-11-08Test out lclint and its4 on com_err library. One lclint error left on Solaris,Ken Raeburn1-3/+4
due to deficiencies in lclint. Its4 chokes in parser. * com_err.h (struct error_table): Annotate MSGS as pointing to 'shared' data. (error_message): Returned data is 'observer' and 'dependent'; modifies internal state. * com_err.c (default_com_err_proc): Cast various return values to void. (reset_com_err_hook): Use NULL, not 0. (com_err_hook): Annotate as 'null'. * error_table.h (_et_list): Annotate as 'null' and 'dependent'. (struct et_list): Annotate NEXT as 'dependent' and 'null', and TABLE as 'dependent'. (struct dynamic_et_list): Duplicate et_list definition, except NEXT is annotated as 'only' instead of 'dependent'. (error_table_name, error_table_name_r): Annotate for lclint. * et_h.awk: Add lclint annotations for initialize_* functions. * error_message.c (_et_list): Can be 'null'. (error_message): Explicitly compare against zero. Cast strerror arg to int. (et_list_dynamic): New variable, for dynamically allocated list elements; _et_list is now for statically allocated elements only. (add_error_table, remove_error_table): Check both lists. * et_name.c (error_table_name, error_table_name_r): Annotate for lclint. * init_et.c (et_add_error_table): Change "link" to "e" to avoid confusion with C library function in analysis tools. * et1.et, et2.et, t_com_err.c: New files. Exercise addition and removal of error tables from list, using both interfaces. * Makefile.in (LCLINT, LCLINTOPTS, ITS4, ITS4OPTS): New variables. (do-lclint, do-its4, et1.o, et2.o, t_com_err.o, t_com_err): New targets. Not automatically invoked at present. (FILES): Updated. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12855 dc483132-0cff-0310-8789-dd5450dbe970
2000-06-23merge from krb5-1-2-beta4Ken Raeburn1-4/+7
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12426 dc483132-0cff-0310-8789-dd5450dbe970
1999-09-24copyright notice updates from 1.1 branchKen Raeburn1-0/+3
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11853 dc483132-0cff-0310-8789-dd5450dbe970
1998-07-17Replaced preprocessor symbol _MACINTOSH with macintosh, since macintosh is ↵Miro Jurisic1-6/+6
the standard symbol defined by all Mac compiler (oh, sure, it doesn't have _. but at least it's always there) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10653 dc483132-0cff-0310-8789-dd5450dbe970
1998-07-14Mac: now calling NewCWindow when possible; changed GetNextEvent to WaitNextEventMiro Jurisic1-3/+10
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10635 dc483132-0cff-0310-8789-dd5450dbe970
1998-07-02com_err.c (MacMessageBox): Change TextBox to TETextBox to match upTheodore Tso1-1/+1
with CodeWarrior changes. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10617 dc483132-0cff-0310-8789-dd5450dbe970
1997-03-03 * error_message.c: Don't declare sys_nerr on MacintoshEzra Peisach1-1/+1
* com_err.c: Fix MacMessageBox prototype. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9996 dc483132-0cff-0310-8789-dd5450dbe970
1997-03-01* com_err.c: Back out last change; it's not needed. Also, removeSam Hartman1-4/+3
debugging cruft. * com_err.h: Do not declare com_err_hook extern if you declare it static in the source. [383] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9992 dc483132-0cff-0310-8789-dd5450dbe970
1997-03-01Remove static from declaration of com_err_hookSam Hartman1-3/+4
to work around NetBSD/Gcc bug. [383] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9991 dc483132-0cff-0310-8789-dd5450dbe970
1997-02-22* Make shared libs work on AIXSam Hartman1-1/+1
* Do not use #ifdef unix git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9954 dc483132-0cff-0310-8789-dd5450dbe970
1997-02-15Removed V2 experimental API previously checked-in.Richard Basch1-122/+36
Added new routines: add_error_table & remove_error_table for registering error tables. Except on Unix, the _et_list variable and com_err_hook routines/variables are now private to the comerr library. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9866 dc483132-0cff-0310-8789-dd5450dbe970
1997-02-14com_err.c: Only check if stderr is a tty under Win32; Win16 does notRichard Basch1-0/+2
even declare stderr. (win16/win32) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9864 dc483132-0cff-0310-8789-dd5450dbe970
1997-02-11com_err.c: display the error via stderr if it is a character deviceRichard Basch1-1/+10
(win32 console apps) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9854 dc483132-0cff-0310-8789-dd5450dbe970
1997-02-11Fix broken Windows 16 declaration. (Should be KRB5_CALLCONV, andTheodore Tso1-1/+1
using ET_P) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9839 dc483132-0cff-0310-8789-dd5450dbe970
1997-02-08compile_et.c: Change the emitted name of the struct error_tableTheodore Tso1-9/+7
to be et_XXX_error_table, instead of it being a static variable named "et". (This change has already been made in the awk versions of compile_et.) com_err.h, com_err.c: Remove the void *priv argument from com_err_va() and et_com_err() experimental API's. (That was a braino; the private data pointer should come from the hook_func_data field.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9821 dc483132-0cff-0310-8789-dd5450dbe970
1997-02-08com_err.[ch]: Define old com_err_va interfaceRichard Basch1-1/+10
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9818 dc483132-0cff-0310-8789-dd5450dbe970
1997-02-06New V2 API + Win16/Win32 supportRichard Basch1-152/+226
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9782 dc483132-0cff-0310-8789-dd5450dbe970
1996-06-12com_err.h:Theodore Tso1-9/+9
error_table.h: Add Windows-32 ifdefs. Change use of INTERFACE to KRB5_CALLCONV and KRB5_DLLIMP. See ChangeLog entries for src/include/krb5.hin for more information. vfprintf.c, internal.h, compile_et.c, et_c.awk, com_err.c: Change _WINDOWS to _MSDOS, and add check for _WIN32. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@8319 dc483132-0cff-0310-8789-dd5450dbe970
1995-09-24Change password for the MacKeith Vetter1-1/+17
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6845 dc483132-0cff-0310-8789-dd5450dbe970
1995-09-11Mac Beta 1 submissionKeith Vetter1-0/+62
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6749 dc483132-0cff-0310-8789-dd5450dbe970
1995-07-06Changes for Macintosh implementationKeith Vetter1-1/+1
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6229 dc483132-0cff-0310-8789-dd5450dbe970
1995-04-14Windows global stuff:Keith Vetter1-3/+3
o removed INTERFACE from non-api functions o add FAR to pointers visible to the world o made the tests for __STDC__ also check for _WINDOWS o creates GSSAPI.DLL & GSSAPI.LIB as per spec. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5354 dc483132-0cff-0310-8789-dd5450dbe970
1995-03-24Fixed breakage introduced by windows port. com_err() is supposed toTheodore Tso1-0/+3
print a newline at after printing the error message! git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5206 dc483132-0cff-0310-8789-dd5450dbe970
1995-03-22Fixed problem in com_err.c due to the fact that the PC doesn't use autoconf andKeith Vetter1-1/+1
com_err.c doesn't include k5-config.h. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5199 dc483132-0cff-0310-8789-dd5450dbe970
1995-03-22Fixed bugs in the com_err library so that it's callable from windows programsKeith Vetter1-3/+3
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5180 dc483132-0cff-0310-8789-dd5450dbe970
1995-03-19* com_err.c, com_err.h: Use HAVE_STDARG_H, not STDARG_PROTOTYPES.John Gilmore1-1/+1
* configure.in: Use AC_CHECK_HEADERS(stdarg.h), not CHECK_STDARG. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5170 dc483132-0cff-0310-8789-dd5450dbe970
1995-03-17Ported the error table stuff to the PCKeith Vetter1-11/+17
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5135 dc483132-0cff-0310-8789-dd5450dbe970
1994-09-30Let configure take care of removing const with AC_CONSTTheodore Tso1-0/+12
internal.h: Use autoconf to determin whether or not declare perror() compile_et.c: Add declaration of error_message manully. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4409 dc483132-0cff-0310-8789-dd5450dbe970
1994-09-09Reversed order of \n\r to make jik happyTheodore Tso1-1/+1
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4210 dc483132-0cff-0310-8789-dd5450dbe970
1994-08-18stamp out rcs keywordsMark Eichin1-4/+0
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4186 dc483132-0cff-0310-8789-dd5450dbe970
1994-06-16make stdarg consistentMark Eichin1-4/+1
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3834 dc483132-0cff-0310-8789-dd5450dbe970
1994-06-10real Makefile.in, aix tweeks for malloc decl, eliminate use of krb5.hMark Eichin1-1/+1
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3728 dc483132-0cff-0310-8789-dd5450dbe970
1993-06-03Portability changesTheodore Tso1-11/+6
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2608 dc483132-0cff-0310-8789-dd5450dbe970
1993-04-13*** empty log message ***Theodore Tso1-0/+133
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2533 dc483132-0cff-0310-8789-dd5450dbe970