1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-21 08:42:23 +00:00

- Add missing files from last commit.

This commit is contained in:
Wesley Shields 2009-06-28 01:40:02 +00:00
parent e89df9226f
commit 991ed39c89
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=236700
3 changed files with 82 additions and 0 deletions

View File

@ -0,0 +1,49 @@
--- libs/mod_tora/protocol.c.orig 2009-06-19 17:15:56.000000000 +0900
+++ libs/mod_tora/protocol.c 2009-06-19 17:17:33.000000000 +0900
@@ -37,7 +37,7 @@
cursor++; \
}
-static int pwrite( mcontext *c, const char *buf, int len ) {
+static int _pwrite( mcontext *c, const char *buf, int len ) {
while( len > 0 ) {
int k = send(c->sock,buf,len,MSG_NOSIGNAL);
if( k <= 0 ) return 0;
@@ -47,7 +47,7 @@
return 1;
}
-static int pread( mcontext *c, char *buf, int len ) {
+static int _pread( mcontext *c, char *buf, int len ) {
while( len > 0 ) {
int k = recv(c->sock,buf,len,MSG_NOSIGNAL);
if( k <= 0 ) return 0;
@@ -63,8 +63,8 @@
h[1] = (unsigned char)len;
h[2] = (unsigned char)(len >> 8);
h[3] = (unsigned char)(len >> 16);
- pwrite(c,(char*)h,4);
- pwrite(c,str,len);
+ _pwrite(c,(char*)h,4);
+ _pwrite(c,str,len);
}
static void psend( mcontext *c, proto_code code, const char *str ) {
@@ -329,7 +329,7 @@
int buflen = BUFSIZE;
*exc = 0;
while( true ) {
- if( !pread(c,header,4) )
+ if( !_pread(c,header,4) )
ABORT("Connection Closed");
len = header[1] | (header[2] << 8) | (header[3] << 16);
if( buflen <= len ) {
@@ -338,7 +338,7 @@
free(buf);
buf = (char*)malloc(buflen);
}
- if( !pread(c,buf,len) )
+ if( !_pread(c,buf,len) )
ABORT("Connection Closed");
buf[len] = 0;
switch( *header ) {

View File

@ -0,0 +1,11 @@
--- libs/std/process.c.orig 2009-06-19 00:08:00.000000000 +0900
+++ libs/std/process.c 2009-06-19 00:08:06.000000000 +0900
@@ -23,7 +23,7 @@
# include <unistd.h>
# include <errno.h>
# ifndef NEKO_MAC
-# include <wait.h>
+# include <sys/wait.h>
# endif
#endif

View File

@ -0,0 +1,22 @@
--- libs/std/sys.c.orig 2009-06-19 00:08:19.000000000 +0900
+++ libs/std/sys.c 2009-06-19 00:11:42.000000000 +0900
@@ -35,7 +35,9 @@
# include <termios.h>
# include <sys/time.h>
# include <sys/times.h>
+#ifndef __FreeBSD__
# include <xlocale.h>
+#endif
#endif
#ifdef NEKO_MAC
@@ -123,6 +125,9 @@
<doc>Set the locale for LC_TIME, returns true on success</doc>
**/
static value set_time_locale( value l ) {
+#ifdef __FreeBSD__
+#undef NEKO_POSIX
+#endif
#ifdef NEKO_POSIX
locale_t lc, old;
val_check(l,string);