diff --git a/cf/roken-frag.m4 b/cf/roken-frag.m4 index e1909bb98..479f755c6 100644 --- a/cf/roken-frag.m4 +++ b/cf/roken-frag.m4 @@ -21,6 +21,8 @@ AC_REQUIRE([AC_PROG_LIBTOOL]) AC_REQUIRE([AC_MIPS_ABI]) +AC_DEFINE(rk_PATH_DELIM, '/', [Path name delimiter]) + dnl C characteristics AC_REQUIRE([AC_C___ATTRIBUTE__]) diff --git a/include/krb5-types.cross b/include/krb5-types.cross index 1e0d84142..5170e533c 100644 --- a/include/krb5-types.cross +++ b/include/krb5-types.cross @@ -13,4 +13,6 @@ typedef socklen_t krb5_socklen_t; #include typedef ssize_t krb5_ssize_t; +typedef int krb5_socket_t; + #endif /* __krb5_types_h__ */ diff --git a/lib/asn1/asn1-common.h b/lib/asn1/asn1-common.h index fd5762e19..8ab97761d 100644 --- a/lib/asn1/asn1-common.h +++ b/lib/asn1/asn1-common.h @@ -2,9 +2,7 @@ #include #include -#ifndef HAVE_INT32_T #include -#endif #ifndef __asn1_common_definitions__ #define __asn1_common_definitions__ diff --git a/lib/com_err/compile_et.c b/lib/com_err/compile_et.c index 199ef94be..11beaeba4 100644 --- a/lib/com_err/compile_et.c +++ b/lib/com_err/compile_et.c @@ -32,6 +32,9 @@ */ #undef ROKEN_RENAME + +#include "config.h" + #include "compile_et.h" #include @@ -219,19 +222,7 @@ main(int argc, char **argv) err(1, "%s", filename); - p = strrchr(filename, '/'); -#ifdef BACKSLASH_PATH_DELIM - { - char * bs = strrchr(filename, '\\'); - - if (p) { - if (p < bs) - p = bs; - } else { - p = bs; - } - } -#endif + p = strrchr(filename, rk_PATH_DELIM); if(p) p++; else diff --git a/lib/editline/edit_locl.h b/lib/editline/edit_locl.h index 178f57ac0..427f493d5 100644 --- a/lib/editline/edit_locl.h +++ b/lib/editline/edit_locl.h @@ -33,10 +33,6 @@ typedef struct direct DIRENTRY; #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) #endif /* !defined(S_ISDIR) */ -#ifndef HAVE_CHAR -typedef unsigned char CHAR; -#endif - #define MEM_INC 64 #define SCREEN_INC 256 diff --git a/lib/hcrypto/ui.c b/lib/hcrypto/ui.c index f5a197358..de7d0fc9a 100644 --- a/lib/hcrypto/ui.c +++ b/lib/hcrypto/ui.c @@ -145,8 +145,8 @@ read_string(const char *preprompt, const char *prompt, #else /* CONIO_H */ static int -read_string_conio(const char *preprompt, const char *prompt, - char *buf, size_t len, int echo) +read_string(const char *preprompt, const char *prompt, + char *buf, size_t len, int echo) { int of = 0; int c; @@ -183,8 +183,6 @@ read_string_conio(const char *preprompt, const char *prompt, return 0; } -#define read_string read_string_conio - #endif int diff --git a/lib/hx509/ks_dir.c b/lib/hx509/ks_dir.c index 1ba4cdd10..0d07aa95c 100644 --- a/lib/hx509/ks_dir.c +++ b/lib/hx509/ks_dir.c @@ -113,7 +113,7 @@ dir_iter_start(hx509_context context, free(d); return errno; } -#ifdef HAVE_DIRFD +#ifndef _WIN32 rk_cloexec(dirfd(d->dir)); #endif d->certs = NULL; diff --git a/lib/hx509/softp11.c b/lib/hx509/softp11.c index 241f32cc7..98ab500d9 100644 --- a/lib/hx509/softp11.c +++ b/lib/hx509/softp11.c @@ -813,14 +813,14 @@ get_config_file_for_user(void) char *fn = NULL, *home = NULL; #ifndef _WIN32 - if (getuid() == geteuid()) { + if (!issuid()) { fn = getenv("SOFTPKCS11RC"); if (fn) fn = strdup(fn); home = getenv("HOME"); } if (fn == NULL && home == NULL) { - struct passwd *pw = getpwuid(getuid()); + struct passwd *pw = getpwuid(getuid()); if(pw != NULL) home = pw->pw_dir; }