summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2006-08-22 11:29:46 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2006-08-22 11:29:46 -0700
commite11b861fcf3a295e5cb390cbac3a44d8ce4fad4f (patch)
tree02cf0d4fcff52a4df5fcb365d1acc0aa21c3afe9
parent049932c0171855aa6d55222947f4d47495b6f173 (diff)
Merge more fixes from Solaris xtrans
Convert sprintf -> snprintf Don't use fake readv/writev on Solaris x86.
-rw-r--r--Xtrans.c10
-rw-r--r--Xtransint.h4
2 files changed, 8 insertions, 6 deletions
diff --git a/Xtrans.c b/Xtrans.c
index 82ab729..00391a0 100644
--- a/Xtrans.c
+++ b/Xtrans.c
@@ -1070,7 +1070,8 @@ TRANS(MakeAllCOTSServerListeners) (char *port, int *partial, int *count_ret,
if (trans->flags&TRANS_ALIAS || trans->flags&TRANS_NOLISTEN)
continue;
- sprintf(buffer,"%s/:%s", trans->TransName, port ? port : "");
+ snprintf(buffer, sizeof(buffer), "%s/:%s",
+ trans->TransName, port ? port : "");
PRMSG (5,"MakeAllCOTSServerListeners: opening %s\n",
buffer, 0, 0);
@@ -1182,7 +1183,8 @@ TRANS(MakeAllCLTSServerListeners) (char *port, int *partial, int *count_ret,
if (trans->flags&TRANS_ALIAS || trans->flags&TRANS_NOLISTEN)
continue;
- sprintf(buffer,"%s/:%s", trans->TransName, port ? port : "");
+ snprintf(buffer, sizeof(buffer), "%s/:%s",
+ trans->TransName, port ? port : "");
PRMSG (5,"MakeAllCLTSServerListeners: opening %s\n",
buffer, 0, 0);
@@ -1306,7 +1308,7 @@ static int TRANS(WriteV) (XtransConnInfo ciptr, struct iovec *iov, int iovcnt)
#endif /* CRAY */
-#if (defined(SYSV) && defined(i386) && !defined(__SCO__)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__)
+#if (defined(SYSV) && defined(i386) && !defined(__SCO__) && !defined(sun)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__)
/*
* emulate readv
@@ -1338,7 +1340,7 @@ static int TRANS(ReadV) (XtransConnInfo ciptr, struct iovec *iov, int iovcnt)
#endif /* SYSV && i386 || WIN32 || __sxg__ */
-#if (defined(SYSV) && defined(i386) && !defined(__SCO__)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__)
+#if (defined(SYSV) && defined(i386) && !defined(__SCO__) && !defined(sun)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__)
/*
* emulate writev
diff --git a/Xtransint.h b/Xtransint.h
index 43d6da8..663c689 100644
--- a/Xtransint.h
+++ b/Xtransint.h
@@ -383,7 +383,7 @@ typedef struct _Xtransport_table {
* systems, so they may be emulated.
*/
-#if defined(CRAY) || (defined(SYSV) && defined(i386) && !defined(__SCO__)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__)
+#if defined(CRAY) || (defined(SYSV) && defined(i386) && !defined(__SCO__) && !defined(sun)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__)
#define READV(ciptr, iov, iovcnt) TRANS(ReadV)(ciptr, iov, iovcnt)
@@ -400,7 +400,7 @@ static int TRANS(ReadV)(
#endif /* CRAY || (SYSV && i386) || WIN32 || __sxg__ || */
-#if defined(CRAY) || (defined(SYSV) && defined(i386) && !defined(__SCO__)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__)
+#if defined(CRAY) || (defined(SYSV) && defined(i386) && !defined(__SCO__) && !defined(sun)) || defined(WIN32) || defined(__sxg__) || defined(__UNIXOS2__)
#define WRITEV(ciptr, iov, iovcnt) TRANS(WriteV)(ciptr, iov, iovcnt)