Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/external/cpl/trousers/dist/src/tspi/ps - add && defin...



details:   https://anonhg.NetBSD.org/src/rev/df0c32065abb
branches:  trunk
changeset: 773101:df0c32065abb
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Jan 28 02:09:08 2012 +0000

description:
- add && defined(__NetBSS__) where appropriate.
- we don't have <endian.h>, perhaps we should?

diffstat:

 crypto/external/cpl/trousers/dist/src/tspi/ps/tspps.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (42 lines):

diff -r f51bdebc6f80 -r df0c32065abb crypto/external/cpl/trousers/dist/src/tspi/ps/tspps.c
--- a/crypto/external/cpl/trousers/dist/src/tspi/ps/tspps.c     Sat Jan 28 02:08:11 2012 +0000
+++ b/crypto/external/cpl/trousers/dist/src/tspi/ps/tspps.c     Sat Jan 28 02:09:08 2012 +0000
@@ -25,7 +25,11 @@
 #if defined (HAVE_BYTEORDER_H)
 #include <sys/byteorder.h>
 #elif defined(HTOLE_DEFINED)
+#ifdef __NetBSD__
+#include <sys/endian.h>
+#else
 #include <endian.h>
+#endif
 #define LE_16 htole16
 #define LE_32 htole32
 #define LE_64 htole64
@@ -45,7 +49,7 @@
 
 static int user_ps_fd = -1;
 static MUTEX_DECLARE_INIT(user_ps_lock);
-#if (defined (__FreeBSD__) || defined (__OpenBSD__))
+#if (defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__))
 static MUTEX_DECLARE_INIT(user_ps_path);
 #endif
 static struct flock fl;
@@ -72,7 +76,7 @@
                *file = strdup(file_name);
                return (*file) ? TSS_SUCCESS : TSPERR(TSS_E_OUTOFMEMORY);
        }
-#if (defined (__FreeBSD__) || defined (__OpenBSD__))
+#if (defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__))
        MUTEX_LOCK(user_ps_path);
 #endif
 
@@ -99,7 +103,7 @@
                        return TSPERR(TSS_E_INTERNAL_ERROR);
                }
 
-#elif (defined (__FreeBSD__) || defined (__OpenBSD__))
+#elif (defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__))
                if ((pwp = getpwent()) == NULL) {
                        LogDebugFn("USER PS: Error getting path to home directory: getpwent: %s",
                                    strerror(rc));



Home | Main Index | Thread Index | Old Index