1 /* 2 * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 11 * 2. Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in 13 * the documentation and/or other materials provided with the 14 * distribution. 15 * 16 * 3. The name "Carnegie Mellon University" must not be used to 17 * endorse or promote products derived from this software without 18 * prior written permission. For permission or any legal 19 * details, please contact 20 * Carnegie Mellon University 21 * Center for Technology Transfer and Enterprise Creation 22 * 4615 Forbes Avenue 23 * Suite 302 24 * Pittsburgh, PA 15213 25 * (412) 268-7393, fax: (412) 268-7395 26 * innovation@andrew.cmu.edu 27 * 28 * 4. Redistributions of any form whatsoever must retain the following 29 * acknowledgment: 30 * "This product includes software developed by Computing Services 31 * at Carnegie Mellon University (http://www.cmu.edu/computing/)." 32 * 33 * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO 34 * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 35 * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE 36 * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 37 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN 38 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 39 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 40 * 41 * Copyright 1988 by the Student Information Processing Board of the 42 * Massachusetts Institute of Technology. 43 * 44 * For copyright info, see mit-sipb-copyright.h. 45 */ 46 47 #ifndef _ET_H 48 49 /* This directory doesn't really know about the krb5 world. The following 50 windows defines are usually hidden in k5-config.h. For now I'll just 51 place here what is needed from that file. Later we may decide to do 52 it differently. 53 */ 54 #ifdef _WINDOWS 55 #define INTERFACE __far __export __pascal 56 #define INTERFACE_C __far __export __cdecl 57 #define sys_nerr _sys_nerr 58 #define sys_errlist _sys_errlist 59 int __far __pascal MessageBox (void __far *, const char __far*, const char __far*, unsigned int); 60 #define MB_ICONEXCLAMATION 0x0030 61 #else 62 #define INTERFACE 63 #define INTERFACE_C 64 #include <errno.h> 65 #endif 66 67 struct error_table { 68 char const * const * msgs; 69 long base; 70 int n_msgs; 71 }; 72 struct et_list { 73 struct et_list *next; 74 const struct error_table *table; 75 }; 76 extern struct et_list * _et_list; 77 78 #define ERRCODE_RANGE 8 /* # of bits to shift table number */ 79 #define BITS_PER_CHAR 6 /* # bits to shift per character in name */ 80 81 #if defined(__STDC__) || defined(KRB5_PROVIDE_PROTOTYPES) || defined(_WINDOWS) 82 extern const char *error_table_name (long); 83 #else 84 extern const char *error_table_name (); 85 #endif 86 87 #define _ET_H 88 #endif 89