summaryrefslogtreecommitdiffstats
path: root/src/include/win-mac.h
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>2002-06-15 01:58:35 +0000
committerTom Yu <tlyu@mit.edu>2002-06-15 01:58:35 +0000
commit6da1baf8d7277d1fb497063ed40e5997ab763643 (patch)
tree349b5161b39f95db46c7a0e4bfaf588e975bad54 /src/include/win-mac.h
parent6e9e84a58cd612c1e167d6c35b5df811f2d71c9d (diff)
downloadkrb5-6da1baf8d7277d1fb497063ed40e5997ab763643.tar.gz
krb5-6da1baf8d7277d1fb497063ed40e5997ab763643.tar.xz
krb5-6da1baf8d7277d1fb497063ed40e5997ab763643.zip
* win-mac.h: Since this file is now only Win32, remove non-Win32
stuff to make it easier to read. Never used __declspec(dllexport) so that we do not accidentally export symbols. * win-mac.h: Add KRB5_CALLCONV_WRONG. [pullups from 1-2-2-branch] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14510 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include/win-mac.h')
-rw-r--r--src/include/win-mac.h116
1 files changed, 18 insertions, 98 deletions
diff --git a/src/include/win-mac.h b/src/include/win-mac.h
index 0e46f10603..b6cf96dfa5 100644
--- a/src/include/win-mac.h
+++ b/src/include/win-mac.h
@@ -1,4 +1,8 @@
/*
+ * This file is now only used on Windows
+ */
+
+/*
* type functions split out of here to make things look nicer in the
* various include files which need these definitions, as well as in
* the util/ directories.
@@ -7,11 +11,7 @@
#ifndef _KRB5_WIN_MAC_H
#define _KRB5_WIN_MAC_H
-#if defined(_WIN32)
-/*
- * Machine-type definitions: PC Clone 386 running Microloss Windows
- */
-/* Windows 32 specific */
+#ifdef _WIN32
#define ID_READ_PWD_DIALOG 10000
#define ID_READ_PWD_PROMPT 10001
@@ -23,7 +23,7 @@
#define APSTUDIO_HIDDEN_SYMBOLS
#include <windows.h>
-#else
+#else /* ! RES_ONLY */
#define SIZEOF_INT 4
#define SIZEOF_SHORT 2
@@ -36,6 +36,15 @@
#ifndef KRB5_CALLCONV
# define KRB5_CALLCONV __stdcall
# define KRB5_CALLCONV_C __cdecl
+
+/*
+ * Use this to mark an incorrect calling convention that has been
+ * "immortalized" because it was incorrectly exported in a previous
+ * release.
+ */
+
+# define KRB5_CALLCONV_WRONG KRB5_CALLCONV_C
+
#endif /* !KRB5_CALLCONV */
#ifndef KRB5_SYSTYPES__
@@ -126,31 +135,6 @@ typedef unsigned char u_char;
#include <fcntl.h>
#include <io.h>
#include <process.h>
-#define THREEPARAMOPEN(x,y,z) open(x,y,z)
-#ifndef _WIN32
-#define O_RDONLY _O_RDONLY
-#define O_WRONLY _O_WRONLY
-#define O_RDWR _O_RDWR
-#define O_APPEND _O_APPEND
-#define O_CREAT _O_CREAT
-#define O_TRUNC _O_TRUNC
-#define O_EXCL _O_EXCL
-#define O_TEXT _O_TEXT
-#define O_BINARY _O_BINARY
-#define O_NOINHERIT _O_NOINHERIT
-#define stat _stat
-#define unlink _unlink
-#define lseek _lseek
-#define write _write
-#define open _open
-#define close _close
-#define read _read
-#define fstat _fstat
-#define mktemp _mktemp
-#define dup _dup
-
-#define getpid _getpid
-#endif
#ifdef NEED_SYSERROR
/* Only needed by util/et/error_message.c but let's keep the source clean */
@@ -170,77 +154,13 @@ HINSTANCE get_lib_instance(void);
#endif /* _WIN32 */
-#ifdef macintosh
-
-#define USE_LOGIN_LIBRARY
-
-#define KRB5_CALLCONV
-#define KRB5_CALLCONV_C
-
-#define SIZEOF_INT 4
-#define SIZEOF_SHORT 2
-#define HAVE_SRAND
-#define NO_PASSWORD
-#define HAVE_LABS
-/*#define ENOMEM 12*/
-#include <unix.h>
-#include <ctype.h>
-
-#ifdef NEED_LOWLEVEL_IO
-#include <fcntl.h>
-#endif
-
-/*
- * Which encryption routines libcrypto will provide is controlled by
- * mac/libraries/KerberosHeaders.h.
- */
-
-/* there is no <stat.h> for mpw */
-#ifndef __MWERKS__
-typedef unsigned long size_t;
-typedef unsigned long mode_t;
-typedef unsigned long ino_t;
-typedef unsigned long dev_t;
-typedef short nlink_t;
-typedef unsigned long uid_t;
-typedef unsigned long gid_t;
-typedef long off_t;
-
-struct stat
-{
- mode_t st_mode; /* File mode; see #define's below */
- ino_t st_ino; /* File serial number */
- dev_t st_dev; /* ID of device containing this file */
- nlink_t st_nlink; /* Number of links */
- uid_t st_uid; /* User ID of the file's owner */
- gid_t st_gid; /* Group ID of the file's group */
- dev_t st_rdev; /* Device type */
- off_t st_size; /* File size in bytes */
- unsigned long st_atime; /* Time of last access */
- unsigned long st_mtime; /* Time of last data modification */
- unsigned long st_ctime; /* Time of last file status change */
- long st_blksize; /* Optimal blocksize */
- long st_blocks; /* blocks allocated for file */
-};
-
-int stat(const char *path, struct stat *buf);
-#endif
-
-int fstat(int fildes, struct stat *buf);
-
-#define EFBIG 1000
-
-#define NOFCHMOD 1
-#define NOCHMOD 1
-#define _MACSOCKAPI_
-
-#define THREEPARAMOPEN(x,y,z) open(x,y)
-#else /* macintosh */
#define THREEPARAMOPEN(x,y,z) open(x,y,z)
-#endif /* macintosh */
#ifndef KRB5_CALLCONV
#define KRB5_CALLCONV
+#endif
+
+#ifndef KRB5_CALLCONV_C
#define KRB5_CALLCONV_C
#endif