Port to amd64

Submitted by:	maintainer
This commit is contained in:
Kris Kennaway 2004-04-05 00:39:58 +00:00
parent 91c1053d41
commit b5ea715f9f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=106158
7 changed files with 125 additions and 7 deletions

View File

@ -32,13 +32,7 @@ CFLAGS+= -static
MAN1= webjob.1
.include <bsd.port.pre.mk>
.if ${ARCH} == "amd64"
BROKEN= "Configure fails on amd64"
.endif
post-install:
@${STRIP_CMD} ${PREFIX}/bin/webjob
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View File

@ -0,0 +1,17 @@
diff -urP webjob-1.3.0/configure webjob-1.3.0.amd64/configure
--- configure.orig Fri Jul 25 18:19:17 2003
+++ configure Sun Apr 4 23:52:02 2004
@@ -1413,6 +1413,13 @@
_ACEOF
;;
+amd64*)
+
+cat >>confdefs.h <<\_ACEOF
+#define K_CPU_AMD64 1
+_ACEOF
+
+ ;;
ia64*)
cat >>confdefs.h <<\_ACEOF

View File

@ -0,0 +1,13 @@
diff -urP webjob-1.3.0/configure.in webjob-1.3.0.amd64/configure.in
--- configure.in.orig Thu Jun 26 14:01:14 2003
+++ configure.in Sun Apr 4 23:47:36 2004
@@ -87,6 +87,9 @@
alpha*)
AC_DEFINE(K_CPU_ALPHA, 1, Define to 1 if the host cpu is alpha.)
;;
+amd64*)
+ AC_DEFINE(K_CPU_AMD64, 1, Define to 1 if the host cpu is amd64.)
+ ;;
ia64*)
AC_DEFINE(K_CPU_IA64, 1, Define to 1 if the host cpu is ia64.)
;;

View File

@ -0,0 +1,13 @@
diff -urP webjob-1.3.0/src/config.h.in webjob-1.3.0.amd64/src/config.h.in
--- src/config.h.in.orig Fri Jul 25 18:19:19 2003
+++ src/config.h.in Sun Apr 4 23:52:03 2004
@@ -161,6 +161,9 @@
/* Define to 1 if the host cpu is alpha. */
#undef K_CPU_ALPHA
+/* Define to 1 if the host cpu is amd64. */
+#undef K_CPU_AMD64
+
/* Define to 1 if the host cpu is iX86. */
#undef K_CPU_I386

View File

@ -0,0 +1,57 @@
diff -urP webjob-1.3.0/src/http.c webjob-1.3.0.amd64/src/http.c
--- src/http.c.orig Wed Jul 23 15:16:07 2003
+++ src/http.c Sun Apr 4 23:49:52 2004
@@ -144,7 +144,7 @@
sprintf(pcRequest, "%s %s%s%s HTTP/1.1\r\n"
"Host: %s:%d\r\n"
"Content-Type: application/octet-stream\r\n"
-#if defined(K_CPU_ALPHA) || defined(K_CPU_IA64)
+#if defined(K_CPU_ALPHA) || defined(K_CPU_IA64) || defined(K_CPU_AMD64)
"Content-Length: %u\r\n"
#else
"Content-Length: %lu\r\n"
@@ -166,7 +166,7 @@
sprintf(pcRequest, "%s %s%s%s HTTP/1.1\r\n"
"Host: %s:%d\r\n"
"Content-Type: application/octet-stream\r\n"
-#if defined(K_CPU_ALPHA) || defined(K_CPU_IA64)
+#if defined(K_CPU_ALPHA) || defined(K_CPU_IA64) || defined(K_CPU_AMD64)
"Content-Length: %u\r\n"
#else
"Content-Length: %lu\r\n"
@@ -1283,7 +1283,7 @@
*/
if (ui32ContentLength > (K_UINT32) HTTP_MAX_MEMORY_SIZE)
{
-#if defined(K_CPU_ALPHA) || defined(K_CPU_IA64)
+#if defined(K_CPU_ALPHA) || defined(K_CPU_IA64) || defined(K_CPU_AMD64)
snprintf(pcError, MESSAGE_SIZE, "%s: Content-Length = [%u] > [%u]: Length exceeds internally defined limit.",
#else
snprintf(pcError, MESSAGE_SIZE, "%s: Content-Length = [%lu] > [%lu]: Length exceeds internally defined limit.",
@@ -1339,7 +1339,7 @@
}
if (ui32Offset != ui32ContentLength)
{
-#if defined(K_CPU_ALPHA) || defined(K_CPU_IA64)
+#if defined(K_CPU_ALPHA) || defined(K_CPU_IA64) || defined(K_CPU_AMD64)
snprintf(pcError, MESSAGE_SIZE, "%s: Actual-Length = [%u] != [%u]: Actual-Length vs Content-Length Mismatch.",
#else
snprintf(pcError, MESSAGE_SIZE, "%s: Actual-Length = [%lu] != [%lu]: Actual-Length vs Content-Length Mismatch.",
@@ -1409,7 +1409,7 @@
}
if (ui32Offset != ui32ContentLength)
{
-#if defined(K_CPU_ALPHA) || defined(K_CPU_IA64)
+#if defined(K_CPU_ALPHA) || defined(K_CPU_IA64) || defined(K_CPU_AMD64)
snprintf(pcError, MESSAGE_SIZE, "%s: Actual-Length = [%u] != [%u]: Actual-Length vs Content-Length Mismatch.",
#else
snprintf(pcError, MESSAGE_SIZE, "%s: Actual-Length = [%lu] != [%lu]: Actual-Length vs Content-Length Mismatch.",
@@ -2164,7 +2164,7 @@
*/
if (psURL->ui32DownloadLimit != 0 && psResponseHeader->ui32ContentLength > psURL->ui32DownloadLimit)
{
-#if defined(K_CPU_ALPHA) || defined(K_CPU_IA64)
+#if defined(K_CPU_ALPHA) || defined(K_CPU_IA64) || defined(K_CPU_AMD64)
snprintf(pcError, MESSAGE_SIZE, "%s: Content-Length = [%u] > [%u]: Length exceeds user defined limit.",
#else
snprintf(pcError, MESSAGE_SIZE, "%s: Content-Length = [%lu] > [%lu]: Length exceeds user defined limit.",

View File

@ -0,0 +1,12 @@
diff -urP webjob-1.3.0/src/ktypes.h webjob-1.3.0.amd64/src/ktypes.h
--- src/ktypes.h.orig Sun Jun 15 22:49:21 2003
+++ src/ktypes.h Sun Apr 4 23:50:01 2004
@@ -11,7 +11,7 @@
*/
#if defined(UNIX)
- #if defined(K_CPU_ALPHA) || defined(K_CPU_IA64)
+ #if defined(K_CPU_ALPHA) || defined(K_CPU_IA64) || defined(K_CPU_AMD64)
typedef char K_INT08;
typedef unsigned char K_UINT08;
typedef short K_INT16;

View File

@ -0,0 +1,12 @@
diff -urP webjob-1.3.0/src/webjob.c webjob-1.3.0.amd64/src/webjob.c
--- src/webjob.c.orig Thu Jul 24 23:05:17 2003
+++ src/webjob.c Sun Apr 4 23:50:08 2004
@@ -1478,7 +1478,7 @@
return ER;
}
-#if defined(K_CPU_ALPHA) || defined(K_CPU_IA64)
+#if defined(K_CPU_ALPHA) || defined(K_CPU_IA64) || defined(K_CPU_AMD64)
sprintf(acQuery, "VERSION=%s&SYSTEM=%s&CLIENTID=%s&FILENAME=%s&RUNTYPE=%s&STDOUT_LENGTH=%u&STDERR_LENGTH=%u&STDENV_LENGTH=%u",
#else
sprintf(acQuery, "VERSION=%s&SYSTEM=%s&CLIENTID=%s&FILENAME=%s&RUNTYPE=%s&STDOUT_LENGTH=%lu&STDERR_LENGTH=%lu&STDENV_LENGTH=%lu",