* Makefile.in: Fix rebuild rules et_?.perl -> et_?.pl. Also,
strip the "#!" line.
* error_table.h: Fix mac conditional, due to _et_list declaration
moving from et_c.awk
* et_c.perl, et_h.perl: Remove.
* et_c.pl, et_h.pl: Generate.
[porting some 1-2-2-branch changes]
* com_err.h: Windows should include <win-mac.h> as opposed
to <Kerberos5/win-mac.h>
* et_c.perl, et_h.perl:
Renamed to et_c.pl and et_h.pl because the extension is used
as a newline separator heuristic in MacPerl parser
* et_c.perl, et_h.perl:
Removed #! from the first line to avoid confusing MacPerl
* com_err.h, error_message.c, et.pbexp, et_c.awk, et_h.awk:
conditionalized com_err so it doesn't need to export et_list
on Mac OS X
[pullups from 1-2-2-branch]
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14599
dc483132-0cff-0310-8789-
dd5450dbe970
+2002-07-03 Tom Yu <tlyu@mit.edu>
+
+ * Makefile.in: Fix rebuild rules et_?.perl -> et_?.pl. Also,
+ strip the "#!" line.
+
+ * error_table.h: Fix mac conditional, due to _et_list declaration
+ moving from et_c.awk
+
+ * et_c.perl, et_h.perl: Remove.
+
+ * et_c.pl, et_h.pl: Generate.
+
+2002-07-03 Danilo Almeida <dalmeida@mit.edu>
+
+ * com_err.h: Windows should include <win-mac.h> as opposed
+ to <Kerberos5/win-mac.h>
+ [pullup from 1-2-2-branch]
+
+2002-07-03 Miro Jurisic <meeroh@mit.edu>
+
+ * et_c.perl, et_h.perl:
+ Renamed to et_c.pl and et_h.pl because the extension is used
+ as a newline separator heuristic in MacPerl parser
+
+ * et_c.perl, et_h.perl:
+ Removed #! from the first line to avoid confusing MacPerl
+
+ [pullups from 1-2-2-branch]
+
+2002-07-03 Alexandra Ellwood <lxs@mit.edu>
+
+ * com_err.h, error_message.c, et.pbexp, et_c.awk, et_h.awk:
+ conditionalized com_err so it doesn't need to export et_list
+ on Mac OS X
+ [pullup from 1-2-2-branch]
+
2001-10-05 Ken Raeburn <raeburn@mit.edu>
* com_err.h (KRB5_EXPORTVAR): Don't define.
rebuild: rebuild-c rebuild-h
rebuild-c:
- a2p < $(srcdir)/et_c.awk > $(srcdir)/et_c.tmp
- mv -f $(srcdir)/et_c.tmp $(srcdir)/et_c.perl
+ a2p < $(srcdir)/et_c.awk | awk 'NR != 1 || $$0 !~ /^\043!/{print;}' > $(srcdir)/et_c.tmp
+ mv -f $(srcdir)/et_c.tmp $(srcdir)/et_c.pl
rebuild-h:
- a2p < $(srcdir)/et_h.awk > $(srcdir)/et_h.tmp
- mv -f $(srcdir)/et_h.tmp $(srcdir)/et_h.perl
+ a2p < $(srcdir)/et_h.awk | awk 'NR != 1 || $$0 !~ /^\043!/{print;}' > $(srcdir)/et_h.tmp
+ mv -f $(srcdir)/et_h.tmp $(srcdir)/et_h.pl
clean-unix::
$(RM) compile_et
#ifndef __COM_ERR_H
#if defined(_WIN32) || defined(macintosh)
+#ifdef _WIN32
#include <win-mac.h>
+#else
+#include <Kerberos5/win-mac.h>
+#endif
+#if defined(macintosh) && defined(__CFM68K__) && !defined(__USING_STATIC_LIBS__)
+#pragma import on
+#endif
#endif
#ifndef KRB5_CALLCONV
(const struct error_table *)
/*@modifies internalState@*/;
-#if !defined(_WIN32) && !defined(macintosh)
+#if !defined(_WIN32) && !defined(macintosh) && !defined(__MACH__)
/*
* The display routine should be application specific. A global hook,
* may cause inappropriate display procedures to be called between
}
#endif
+#if defined(macintosh) && defined(__CFM68K__) && !defined(__USING_STATIC_LIBS__)
+#pragma import reset
+#endif
+
#define __COM_ERR_H
#endif /* ! defined(__COM_ERR_H) */
#include "com_err.h"
#include "error_table.h"
-#ifdef macintosh
-#include <ErrorLib.h>
+#if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__))
+ #include <KerberosSupport/KerberosSupport.h>
+ #include <KerberosSupport/ErrorLib.h>
#endif
#if defined(_WIN32)
static char buffer[ET_EBUFSIZ];
-#if (defined(_WIN32) || defined(macintosh))
+#if (defined(_WIN32) || defined(macintosh) || (defined(__MACH__) && defined(__APPLE__)))
/*@null@*/ static struct et_list * _et_list = (struct et_list *) NULL;
#else
/* Old interface compatibility */
oops:
-#if defined(macintosh)
+#if TARGET_OS_MAC
{
/* This may be a Mac OS Toolbox error or an MIT Support Library Error. Ask ErrorLib */
if (GetErrorLongString(code, buffer, ET_EBUFSIZ - 1) == noErr) {
return buffer;
}
+
+#if TARGET_API_MAC_OSX
+ /* ComErr and ErrorLib don't know about this error, ask the system */
+ /* Of course there's no way to tell if it knew what error it got */
+ return (strerror (code));
+#endif
+
}
#endif
/*@dependent@*//*@null@*/ struct et_list *next;
/*@dependent@*//*@null@*/ const struct error_table *table;
};
-#if !defined(_WIN32) && !defined(macintosh)
+#if !defined(_WIN32) && !defined(macintosh) && !(defined(__MACH__) && defined(__APPLE__))
/*@null@*//*@dependent@*/ extern struct et_list * _et_list;
#endif
--- /dev/null
+#
+# comerr library Macintosh export file
+#
+# $Header$
+
+_com_err
+_com_err_va
+_error_message
+_add_error_table
+_remove_error_table
print "# include \"win-mac.h\"" > outfile
print "#endif" > outfile
print "" > outfile
+ print "#if !defined(_WIN32) && !defined(macintosh) && !(defined(__MACH__) && defined(__APPLE__))" > outfile
print "extern void initialize_" table_name "_error_table (void);" > outfile
+ print "#endif" > outfile
print "" > outfile
print "/* Lclint doesn't handle null annotations on arrays" > outfile
print " properly, so we need this typedef in each" > outfile
print " 0" > outfile
print "};" > outfile
print "" > outfile
+ print "#if !defined(_WIN32) && !defined(macintosh) && !(defined(__MACH__) && defined(__APPLE__))" > outfile
print "#include <com_err.h>" > outfile
+ print "#endif" > outfile
print "" > outfile
if (tab_base_high == 0) {
print "const struct error_table et_" table_name "_error_table = { text, " \
tab_base_low, table_item_count) > outfile
}
print "" > outfile
- print "#if !defined(_WIN32) && !defined(macintosh)" > outfile
+ print "#if !defined(_WIN32) && !defined(macintosh) && !(defined(__MACH__) && defined(__APPLE__))" > outfile
print "void initialize_" table_name "_error_table (void)" > outfile
print " /*@modifies internalState@*/" > outfile
print "{" > outfile
-#!/usr/athena/bin/perl
eval 'exec /usr/athena/bin/perl -S $0 ${1+"$@"}'
if $running_under_some_shell;
# this emulates #! processing on NIH machines.
(print $fh '#endif');
&Pick('>', $outfile) &&
(print $fh '');
+ &Pick('>', $outfile) &&
+ (print $fh
+
+ '#if !defined(_WIN32) && !defined(macintosh) && !(defined(__MACH__) && defined(__APPLE__))');
&Pick('>', $outfile) &&
(print $fh 'extern void initialize_' . $table_name .
'_error_table (void);');
+ &Pick('>', $outfile) &&
+ (print $fh '#endif');
&Pick('>', $outfile) &&
(print $fh '');
&Pick('>', $outfile) &&
(print $fh '};');
&Pick('>', $outfile) &&
(print $fh '');
+&Pick('>', $outfile) &&
+ (print $fh
+
+ '#if !defined(_WIN32) && !defined(macintosh) && !(defined(__MACH__) && defined(__APPLE__))');
&Pick('>', $outfile) &&
(print $fh '#include <com_err.h>');
+&Pick('>', $outfile) &&
+ (print $fh '#endif');
&Pick('>', $outfile) &&
(print $fh '');
if ($tab_base_high == 0) {
&Pick('>', $outfile) &&
(print $fh
- '#if !defined(_WIN32) && !defined(macintosh)');
+ '#if !defined(_WIN32) && !defined(macintosh) && !(defined(__MACH__) && defined(__APPLE__))');
&Pick('>', $outfile) &&
(print $fh 'void initialize_' . $table_name . '_error_table (void)');
&Pick('>', $outfile) &&
print " * This file is automatically generated; please do not edit it." > outfile
print " */" > outfile
print "" > outfile
+ print "#if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__))" > outfile
+ print "#include <KerberosComErr/KerberosComErr.h>" > outfile
+ print "#else" > outfile
print "#include <com_err.h>" > outfile
+ print "#endif" > outfile
print "" > outfile
}
print "" > outfile
print "extern struct error_table et_" table_name "_error_table;" > outfile
print "" > outfile
- print "#if !defined(_WIN32) && !defined(macintosh)" > outfile
+ print "#if !defined(_WIN32) && !defined(macintosh) && !(defined(__MACH__) && defined(__APPLE__))" > outfile
print "/* for compatibility with older versions... */" > outfile
print "extern void initialize_" table_name "_error_table () /*@modifies internalState@*/;" > outfile
print "#define init_" table_name "_err_tbl initialize_" table_name "_error_table" > outfile
-#!/usr/athena/bin/perl
eval 'exec /usr/athena/bin/perl -S $0 ${1+"$@"}'
if $running_under_some_shell;
# this emulates #! processing on NIH machines.
(print $fh ' */');
&Pick('>', $outfile) &&
(print $fh '');
+ &Pick('>', $outfile) &&
+ (print $fh
+
+ '#if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__))');
+ &Pick('>', $outfile) &&
+ (print $fh '#include <KerberosComErr/KerberosComErr.h>');
+ &Pick('>', $outfile) &&
+ (print $fh '#else');
&Pick('>', $outfile) &&
(print $fh '#include <com_err.h>');
+ &Pick('>', $outfile) &&
+ (print $fh '#endif');
&Pick('>', $outfile) &&
(print $fh '');
}
&Pick('>', $outfile) &&
(print $fh
- '#if !defined(_WIN32) && !defined(macintosh)');
+ '#if !defined(_WIN32) && !defined(macintosh) && !(defined(__MACH__) && defined(__APPLE__))');
&Pick('>', $outfile) &&
(print $fh '/* for compatibility with older versions... */');
&Pick('>', $outfile) &&