o 64bit fixes are back, tested on i386, alpha, sparc64 (more archs work now

than before)
o add the 'cm mv file* dir/.' fix from current
o we do not use zlib in this tree, remove an irrelevent patch accordingly
This commit is contained in:
todd 2002-09-04 16:21:43 +00:00
parent 02c74db0ad
commit ad8c2e31b3
33 changed files with 1182 additions and 1473 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-base_src_client_WorkSpace_c,v 1.1 2002/08/28 22:23:29 todd Exp $
$OpenBSD: patch-base_src_client_WorkSpace_c,v 1.2 2002/09/04 16:21:43 todd Exp $
--- base/src/client/WorkSpace.c.orig Mon Aug 5 20:07:37 2002
+++ base/src/client/WorkSpace.c Wed Aug 28 14:26:39 2002
+++ base/src/client/WorkSpace.c Tue Sep 3 23:34:47 2002
@@ -193,7 +193,6 @@ ws_Init(struct command *cmd, const char
*/
@ -253,7 +253,42 @@ $OpenBSD: patch-base_src_client_WorkSpace_c,v 1.1 2002/08/28 22:23:29 todd Exp $
}
static OC_bool
@@ -843,7 +864,8 @@ ws_Rename(WorkSpace *ws, const char *old
@@ -784,19 +805,14 @@ void
ws_Rename(WorkSpace *ws, const char *old, const char *new)
{
StrVec *fsvec;
-
-#if 0
- WsEntity *wse;
- const char *orig_old = old;
-#endif
const char *orig_new = new;
/* Don't allow user to rename config dir! (... or any
* contents thereof, for that matter) */
- if (nmequal(path_car(path_cdr(old)), CM_CONFIG_DIR))
+ if (path_cdr(old) && nmequal(path_car(path_cdr(old)), CM_CONFIG_DIR))
THROW(ExBadValue, "Can't move the config directory or its contents!");
- if (nmequal(path_car(path_cdr(new)), CM_CONFIG_DIR))
+ if (path_cdr(new) && nmequal(path_car(path_cdr(new)), CM_CONFIG_DIR))
THROW(ExBadValue, "Don't try to move a file into the config directory!");
/* There are three cases to handle:
@@ -820,9 +836,9 @@ ws_Rename(WorkSpace *ws, const char *old
format("File/directory \"%s\" not found", old));
/* Make sure we won't overwrite something. Note that if the target
- is a directory name this will prevent the directory overwrite: */
- if ( pendingchange_FindEntity(ws->pc, new) ||
- ws_hasFsDir(ws, new) || path_exists(new) )
+ is a directory name then "old" will be moved into "target". */
+ if (pendingchange_FindEntity(ws->pc, new) || ws_hasFsDir(ws, new) ||
+ (!path_isdir(new) && path_exists(new)) )
THROW(ExObjectExists,
format("Rename would clobber \"%s\"", orig_new));
@@ -843,7 +859,8 @@ ws_Rename(WorkSpace *ws, const char *old
non-OpenCM files as well as workspace entities, and it's quite
astonishing how many ways there are for these to collide. */
@ -263,7 +298,7 @@ $OpenBSD: patch-base_src_client_WorkSpace_c,v 1.1 2002/08/28 22:23:29 todd Exp $
strvec_sort(fsvec);
/* First, go through the OpenCM workspace entries: */
@@ -1034,7 +1056,7 @@ ws_Commit(WorkSpace *ws, StrVec *names)
@@ -1034,7 +1051,7 @@ ws_Commit(WorkSpace *ws, StrVec *names)
*/
pendingchange_addNote(ws->pc, opt_Message);
@ -272,7 +307,7 @@ $OpenBSD: patch-base_src_client_WorkSpace_c,v 1.1 2002/08/28 22:23:29 todd Exp $
/* Smash opt_Message to point to the result of the combination in
* order to preserve the silent commit behavior:
@@ -1232,7 +1254,6 @@ ws_Commit(WorkSpace *ws, StrVec *names)
@@ -1232,7 +1249,6 @@ ws_Commit(WorkSpace *ws, StrVec *names)
ws->pc->isSorted = FALSE;
SER_MODIFIED(ws->pc);
@ -280,7 +315,7 @@ $OpenBSD: patch-base_src_client_WorkSpace_c,v 1.1 2002/08/28 22:23:29 todd Exp $
}
void
@@ -1278,7 +1299,6 @@ ws_Update(WorkSpace *ws)
@@ -1278,7 +1294,6 @@ ws_Update(WorkSpace *ws)
ws->pc->baseCmtInfoName = topChange->commitInfoTrueName;
SER_MODIFIED(ws->pc);

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-base_src_common_ChannelSSL_c,v 1.3 2002/09/04 16:21:43 todd Exp $
--- base/src/common/ChannelSSL.c.orig Sun Aug 4 11:51:37 2002
+++ base/src/common/ChannelSSL.c Tue Sep 3 23:34:47 2002
@@ -117,7 +117,7 @@ chan_alisten_ssl(ChannelCompletionFn fn,
}
static void
-report_ssl_error(int level, unsigned long errcode)
+report_ssl_error(int level, u_int32_t errcode)
{
if(errcode == 0)
report(level, "No OpenSSL error reported (!)\n");

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-base_src_common_Channel_c,v 1.1 2002/09/04 16:21:43 todd Exp $
--- base/src/common/Channel.c.orig Tue Jul 30 10:19:00 2002
+++ base/src/common/Channel.c Tue Sep 3 23:34:47 2002
@@ -40,7 +40,7 @@
#include <opencm.h>
-static unsigned int global_connection_counter = 0;
+static u_int32_t global_connection_counter = 0;
int chan_SetNonblocking(Channel *c);
int chan_connect(Channel *c, URI *uri);

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-base_src_common_Channel_h,v 1.1 2002/09/04 16:21:43 todd Exp $
--- base/src/common/Channel.h.orig Thu Jul 18 20:30:46 2002
+++ base/src/common/Channel.h Tue Sep 3 23:34:47 2002
@@ -124,7 +124,7 @@ struct Channel {
OC_bool check_idleness;
time_t max_idle_time;
time_t last_activity;
- unsigned int connection_id;
+ u_int32_t connection_id;
};
/* Constructors for a Channel: */

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-base_src_common_EntityCache_c,v 1.3 2002/09/04 16:21:43 todd Exp $
--- base/src/common/EntityCache.c.orig Mon Jul 29 22:48:38 2002
+++ base/src/common/EntityCache.c Tue Sep 3 23:34:47 2002
@@ -61,8 +61,8 @@ struct EcacheNode {
};
struct EntityCache {
- unsigned long sz;
- unsigned long max;
+ u_int32_t sz;
+ u_int32_t max;
rbtree *tree;
EcacheNode *oldest; /* pointer to oldest */

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-base_src_common_Entity_h,v 1.3 2002/09/04 16:21:43 todd Exp $
--- base/src/common/Entity.h.orig Thu Jul 18 20:30:51 2002
+++ base/src/common/Entity.h Tue Sep 3 23:34:47 2002
@@ -58,7 +58,7 @@ struct Entity {
*/
const char *contentTrueName;
- unsigned long length; /* length of object */
+ u_int32_t length; /* length of object */
/* Miscellaneous per-entity meta information. Much of this is
* contained in the Change record, but it isn't accessable to the
@@ -72,7 +72,7 @@ struct Entity {
unsigned char entityType; /* type of content */
- unsigned long entityPerms; /* permissions flags */
+ u_int32_t entityPerms; /* permissions flags */
const char *parent; /* preceding Entity (on same Branch) */
const char *mergeParent; /* merged, preceding Entity (if any) */

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-base_src_common_Mutable_c,v 1.1 2002/09/04 16:21:43 todd Exp $
--- base/src/common/Mutable.c.orig Mon Jul 29 22:48:34 2002
+++ base/src/common/Mutable.c Tue Sep 3 23:34:47 2002
@@ -79,7 +79,7 @@ mutable_VerifySignature(Mutable *m)
SDR_stream *strm;
URI *uri;
int result = 0;
- unsigned int siglen;
+ u_int32_t siglen;
unsigned char *sigbuf = hex_decode(m->signature, &siglen);
/* Need to extract origin from uri */

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-base_src_common_ObDict_h,v 1.3 2002/09/04 16:21:43 todd Exp $
--- base/src/common/ObDict.h.orig Wed Jul 17 23:27:55 2002
+++ base/src/common/ObDict.h Tue Sep 3 23:34:47 2002
@@ -44,7 +44,7 @@
typedef struct ObDictEntry ObDictEntry;
struct ObDictEntry {
const char *trueName; /* of the object */
- unsigned long tnHash; /* hash of the truename for quick compare */
+ u_int32_t tnHash; /* hash of the truename for quick compare */
unsigned w; /* aux word */
void *value;

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-base_src_common_Revision_c,v 1.3 2002/09/04 16:21:43 todd Exp $
--- base/src/common/Revision.c.orig Mon Jul 29 22:48:34 2002
+++ base/src/common/Revision.c Tue Sep 3 23:34:47 2002
@@ -47,8 +47,8 @@ revision_show(const void *vp)
xprintf("mutURI: %s\n", r->mutURI);
xprintf("Seq Num: 0x%08x%08x\n",
- (unsigned long) (r->seq_number >> 32),
- (unsigned long) (r->seq_number));
+ (u_int32_t) (r->seq_number >> 32),
+ (u_int32_t) (r->seq_number));
xprintf("ReviseTime: %s\n", r->reviseTime);
xprintf("Revisor: %s\n", r->revisor);
xprintf("NewObject: %s\n", r->newObject);

View File

@ -1,7 +1,47 @@
$OpenBSD: patch-base_src_common_SDR_c,v 1.2 2002/08/28 22:23:29 todd Exp $
$OpenBSD: patch-base_src_common_SDR_c,v 1.3 2002/09/04 16:21:43 todd Exp $
--- base/src/common/SDR.c.orig Mon Jul 29 22:48:31 2002
+++ base/src/common/SDR.c Wed Aug 28 14:26:40 2002
@@ -116,13 +116,15 @@ file_stream_putc(SDR_stream *s, int c)
+++ base/src/common/SDR.c Tue Sep 3 23:34:47 2002
@@ -39,6 +39,7 @@
*/
#include <opencm.h>
+#include <sys/types.h>
#define BUFBSZ 1024
#define STRING_GROW_UNIT 1024
@@ -76,14 +77,14 @@ struct SDR_stream {
struct serializer {
void (*onCreate)(SDR_stream *);
- void (*w_u8)(const char *, SDR_stream *, unsigned char);
- unsigned char (*r_u8)(const char *, SDR_stream *);
+ void (*w_u8)(const char *, SDR_stream *, u_int8_t);
+ u_int8_t (*r_u8)(const char *, SDR_stream *);
- void (*w_u16)(const char *, SDR_stream *, unsigned short);
- unsigned short (*r_u16)(const char *, SDR_stream *);
+ void (*w_u16)(const char *, SDR_stream *, u_int16_t);
+ u_int16_t (*r_u16)(const char *, SDR_stream *);
- void (*w_u32)(const char *, SDR_stream *, unsigned long);
- unsigned long (*r_u32)(const char *, SDR_stream *);
+ void (*w_u32)(const char *, SDR_stream *, u_int32_t);
+ u_int32_t (*r_u32)(const char *, SDR_stream *);
void (*w_u64)(const char *, SDR_stream *,
oc_uint64_t);
@@ -92,8 +93,8 @@ struct serializer {
void (*w_buffer)(const char *elem, SDR_stream *, const Buffer*);
Buffer * (*r_buffer)(const char *elem, SDR_stream *, ocmoff_t len);
- void (*w_bytes)(const char *, SDR_stream *, unsigned long len, const void *);
- void * (*r_bytes)(const char *, SDR_stream *, unsigned long len);
+ void (*w_bytes)(const char *, SDR_stream *, u_int32_t len, const void *);
+ void * (*r_bytes)(const char *, SDR_stream *, u_int32_t len);
void (*w_string)(const char *, SDR_stream *, const char *);
char * (*r_string)(const char *, SDR_stream *);
@@ -116,13 +117,15 @@ file_stream_putc(SDR_stream *s, int c)
s->pos++;
s->len++;
s->bound++;
@ -19,7 +59,7 @@ $OpenBSD: patch-base_src_common_SDR_c,v 1.2 2002/08/28 22:23:29 todd Exp $
s->pos += wlen;
s->len += wlen;
s->bound += wlen;
@@ -142,7 +144,7 @@ file_stream_getc(SDR_stream *s)
@@ -142,7 +145,7 @@ file_stream_getc(SDR_stream *s)
{
int c;
@ -28,7 +68,7 @@ $OpenBSD: patch-base_src_common_SDR_c,v 1.2 2002/08/28 22:23:29 todd Exp $
s->pos++;
return c;
}
@@ -150,7 +152,7 @@ file_stream_getc(SDR_stream *s)
@@ -150,7 +153,7 @@ file_stream_getc(SDR_stream *s)
static ocmoff_t
file_stream_gets(SDR_stream *s, void *vp, ocmoff_t len)
{
@ -37,7 +77,7 @@ $OpenBSD: patch-base_src_common_SDR_c,v 1.2 2002/08/28 22:23:29 todd Exp $
s->pos += rlen;
return rlen;
@@ -161,8 +163,8 @@ file_stream_reread(SDR_stream *s)
@@ -161,8 +164,8 @@ file_stream_reread(SDR_stream *s)
{
assert(s->state);
@ -48,7 +88,7 @@ $OpenBSD: patch-base_src_common_SDR_c,v 1.2 2002/08/28 22:23:29 todd Exp $
s->pos = 0;
s->mode = MODE_RSTREAM;
@@ -175,7 +177,7 @@ static void
@@ -175,7 +178,7 @@ static void
file_stream_close(SDR_stream *s)
{
if (s->state) {
@ -57,7 +97,108 @@ $OpenBSD: patch-base_src_common_SDR_c,v 1.2 2002/08/28 22:23:29 todd Exp $
xfclose((FILE *) s->state);
}
s->state = 0;
@@ -1028,7 +1030,7 @@ stream_autodetect_format(SDR_stream *str
@@ -568,8 +571,8 @@ stream_ungetc(SDR_stream *strm, int c)
size_t
stream_vprintf(SDR_stream *s, const char *fmt, va_list ap)
{
- unsigned long len;
- unsigned long width = 0;
+ u_int32_t len;
+ u_int32_t width = 0;
OC_bool sign;
OC_bool rightAdjust;
char fillchar;
@@ -584,7 +587,7 @@ stream_vprintf(SDR_stream *s, const char
continue;
}
- /* largest thing we might convert fits in 20 digits (unsigned long
+ /* largest thing we might convert fits in 20 digits (u_int32_t
* long as decimal */
pend = &buf[20];
@@ -647,7 +650,7 @@ stream_vprintf(SDR_stream *s, const char
case 'd':
{
long l;
- unsigned long ul;
+ u_int32_t ul;
l = va_arg(ap, long);
@@ -661,7 +664,7 @@ stream_vprintf(SDR_stream *s, const char
ul = (l < 0) ? (unsigned) -l : (unsigned) l;
if (l == LONG_MIN)
- ul = ((unsigned long) LONG_MAX) + 1ul;
+ ul = ((u_int32_t) LONG_MAX) + 1ul;
while(ul) {
*(--p) = '0' + (ul % 10);
@@ -675,9 +678,9 @@ stream_vprintf(SDR_stream *s, const char
}
case 'u':
{
- unsigned long ul;
+ u_int32_t ul;
- ul = va_arg(ap, unsigned long);
+ ul = va_arg(ap, u_int32_t);
if (ul == 0) {
*(--p) = '0';
@@ -692,11 +695,11 @@ stream_vprintf(SDR_stream *s, const char
}
case 'x':
{
- unsigned long ul;
+ u_int32_t ul;
char *hexout = "0123456789abcdef";
- ul = va_arg(ap, unsigned long);
+ ul = va_arg(ap, u_int32_t);
if (ul == 0) {
*(--p) = '0';
@@ -826,7 +829,7 @@ stream_scanf(SDR_stream *s, const char *
case 'u':
case 'U':
{
- unsigned long ull = 0;
+ u_int32_t ull = 0;
do {
c = stream_getc(s);
@@ -852,10 +855,10 @@ stream_scanf(SDR_stream *s, const char *
--input_count;
if (*fmt == 'u') {
- unsigned long *ulp;
+ u_int32_t *ulp;
- ulp = va_arg(ap, unsigned long *);
- *ulp = (unsigned long) ull;
+ ulp = va_arg(ap, u_int32_t *);
+ *ulp = (u_int32_t) ull;
assert(ull <= ULONG_MAX);
}
else {
@@ -869,10 +872,10 @@ stream_scanf(SDR_stream *s, const char *
}
case 'x':
{
- unsigned long ul = 0;
- unsigned long *ulp;
+ u_int32_t ul = 0;
+ u_int32_t *ulp;
- ulp = va_arg(ap, unsigned long *);
+ ulp = va_arg(ap, u_int32_t *);
do {
c = stream_getc(s);
@@ -1028,7 +1031,7 @@ stream_autodetect_format(SDR_stream *str
/* Texty format starts with TEXTY\n
*
* The newline isn't really necessary, but otherwise the file
@ -66,7 +207,7 @@ $OpenBSD: patch-base_src_common_SDR_c,v 1.2 2002/08/28 22:23:29 todd Exp $
*/
const char* expecting = "EXTY\n";
@@ -1046,6 +1048,26 @@ stream_autodetect_format(SDR_stream *str
@@ -1046,6 +1049,26 @@ stream_autodetect_format(SDR_stream *str
break;
}
@ -93,7 +234,248 @@ $OpenBSD: patch-base_src_common_SDR_c,v 1.2 2002/08/28 22:23:29 todd Exp $
default:
{
THROW(ExMalformed,
@@ -2125,6 +2147,11 @@ isSafeChar(unsigned char c)
@@ -1317,13 +1340,13 @@ sdr_show(const void *ob)
/* GENERIC WRAPPERS */
void
-sdr_w_u8(const char *elem, SDR_stream *strm, unsigned char u)
+sdr_w_u8(const char *elem, SDR_stream *strm, u_int8_t u)
{
assert(sermodes[strm->format].w_u8);
sermodes[strm->format].w_u8(elem, strm, u);
}
-unsigned char
+u_int8_t
sdr_r_u8(const char *elem, SDR_stream *strm)
{
assert(sermodes[strm->format].r_u8);
@@ -1331,13 +1354,13 @@ sdr_r_u8(const char *elem, SDR_stream *s
}
void
-sdr_w_u16(const char *elem, SDR_stream *strm, unsigned short u)
+sdr_w_u16(const char *elem, SDR_stream *strm, u_int16_t u)
{
assert(sermodes[strm->format].w_u16);
sermodes[strm->format].w_u16(elem, strm, u);
}
-unsigned short
+u_int16_t
sdr_r_u16(const char *elem, SDR_stream *strm)
{
assert(sermodes[strm->format].r_u16);
@@ -1345,13 +1368,13 @@ sdr_r_u16(const char *elem, SDR_stream *
}
void
-sdr_w_u32(const char *elem, SDR_stream *strm, unsigned long u)
+sdr_w_u32(const char *elem, SDR_stream *strm, u_int32_t u)
{
assert(sermodes[strm->format].w_u32);
sermodes[strm->format].w_u32(elem, strm, u);
}
-unsigned long
+u_int32_t
sdr_r_u32(const char *elem, SDR_stream *strm)
{
assert(sermodes[strm->format].r_u32);
@@ -1387,14 +1410,14 @@ sdr_r_buffer(const char *elem, SDR_strea
}
void
-sdr_w_bytes(const char *elem, SDR_stream *strm, unsigned long len, const void *v)
+sdr_w_bytes(const char *elem, SDR_stream *strm, u_int32_t len, const void *v)
{
assert(sermodes[strm->format].w_bytes);
sermodes[strm->format].w_bytes(elem, strm, len, v);
}
void *
-sdr_r_bytes(const char *elem, SDR_stream *strm, unsigned long len)
+sdr_r_bytes(const char *elem, SDR_stream *strm, u_int32_t len)
{
assert(sermodes[strm->format].r_bytes);
return sermodes[strm->format].r_bytes(elem, strm, len);
@@ -1450,16 +1473,16 @@ bin_onCreate(SDR_stream * strm)
}
static void
-bin_w_u8(const char *elem, SDR_stream *strm, unsigned char u)
+bin_w_u8(const char *elem, SDR_stream *strm, u_int8_t u)
{
if (stream_write(strm, &u, sizeof(u)) < sizeof(u))
THROW(ExTruncated, "Serialization write error");
}
-static unsigned char
+static u_int8_t
bin_r_u8(const char *elem, SDR_stream *strm)
{
- unsigned char u;
+ u_int8_t u;
if (stream_read(strm, &u, sizeof(u)) < sizeof(u))
THROW(ExTruncated, "Serialization read error");
@@ -1468,7 +1491,7 @@ bin_r_u8(const char *elem, SDR_stream *s
}
static void
-bin_w_u16(const char *elem, SDR_stream *strm, unsigned short u)
+bin_w_u16(const char *elem, SDR_stream *strm, u_int16_t u)
{
int i;
unsigned char bytes[sizeof(u)];
@@ -1482,11 +1505,11 @@ bin_w_u16(const char *elem, SDR_stream *
THROW(ExTruncated, "Serialization write error");
}
-static unsigned short
+static u_int16_t
bin_r_u16(const char *elem, SDR_stream *strm)
{
int i;
- unsigned short u;
+ u_int16_t u;
unsigned char bytes[sizeof(u)];
if (stream_read(strm, bytes, sizeof(u)) < sizeof(u))
@@ -1496,7 +1519,7 @@ bin_r_u16(const char *elem, SDR_stream *
u = 0;
do {
- unsigned long bu;
+ u_int32_t bu;
i--;
u = u << 8;
@@ -1508,7 +1531,7 @@ bin_r_u16(const char *elem, SDR_stream *
}
static void
-bin_w_u32(const char *elem, SDR_stream *strm, unsigned long u)
+bin_w_u32(const char *elem, SDR_stream *strm, u_int32_t u)
{
int i;
unsigned char bytes[sizeof(u)];
@@ -1522,11 +1545,11 @@ bin_w_u32(const char *elem, SDR_stream *
THROW(ExTruncated, "Serialization write error");
}
-static unsigned long
+static u_int32_t
bin_r_u32(const char *elem, SDR_stream *strm)
{
int i;
- unsigned long u;
+ u_int32_t u;
unsigned char bytes[sizeof(u)];
if (stream_read(strm, bytes, sizeof(u)) < sizeof(u))
@@ -1536,7 +1559,7 @@ bin_r_u32(const char *elem, SDR_stream *
u = 0;
do {
- unsigned long bu;
+ u_int32_t bu;
i--;
u = u << 8;
@@ -1589,7 +1612,7 @@ bin_r_u64(const char *elem, SDR_stream *
/* Note that these do NOT read/write the actual length! */
static void
-bin_w_bytes(const char *elem, SDR_stream *strm, unsigned long len,
+bin_w_bytes(const char *elem, SDR_stream *strm, u_int32_t len,
const void *v)
{
const char *s = (const char *) v;
@@ -1599,7 +1622,7 @@ bin_w_bytes(const char *elem, SDR_stream
}
static void *
-bin_r_bytes(const char *elem, SDR_stream *strm, unsigned long len)
+bin_r_bytes(const char *elem, SDR_stream *strm, u_int32_t len)
{
char * s = (char *) GC_MALLOC_ATOMIC(sizeof(char) * (len+1));
s[len] = 0;
@@ -1921,41 +1944,41 @@ texty_get_field(const char *name, char t
}
static void
-texty_w_u8(const char *elem, SDR_stream *strm, unsigned char num)
+texty_w_u8(const char *elem, SDR_stream *strm, u_int8_t num)
{
texty_do_indent(strm);
stream_printf(strm, "%s I %u\n", elem, num);
}
static void
-texty_w_u16(const char *elem, SDR_stream *strm, unsigned short num)
+texty_w_u16(const char *elem, SDR_stream *strm, u_int16_t num)
{
texty_do_indent(strm);
stream_printf(strm, "%s I %u\n", elem, num);
}
static void
-texty_w_u32(const char *elem, SDR_stream *strm, unsigned long num)
+texty_w_u32(const char *elem, SDR_stream *strm, u_int32_t num)
{
texty_do_indent(strm);
stream_printf(strm, "%s I %u\n", elem, num);
}
-static unsigned char
+static u_int8_t
texty_r_u8(const char *elem, SDR_stream *strm)
{
texty_field *fld = texty_get_field(elem, 'I', strm);
return fld->value;
}
-static unsigned short
+static u_int16_t
texty_r_u16(const char *elem, SDR_stream *strm)
{
texty_field *fld = texty_get_field(elem, 'I', strm);
return fld->value;
}
-static unsigned long
+static u_int32_t
texty_r_u32(const char *elem, SDR_stream *strm)
{
texty_field *fld = texty_get_field(elem, 'I', strm);
@@ -1978,7 +2001,7 @@ texty_r_u64(const char *elem, SDR_stream
static void
texty_w_bytestring(const char *elem, SDR_stream *strm, const char ty,
- unsigned long len, const void *vp)
+ u_int32_t len, const void *vp)
{
texty_do_indent(strm);
@@ -2019,14 +2042,14 @@ texty_r_buffer(const char *elem, SDR_str
}
static void
-texty_w_bytes(const char *elem, SDR_stream *strm, unsigned long len,
+texty_w_bytes(const char *elem, SDR_stream *strm, u_int32_t len,
const void *obj)
{
texty_w_bytestring(elem, strm, 'B', len, obj);
}
static void *
-texty_r_bytes(const char *elem, SDR_stream *strm, unsigned long len)
+texty_r_bytes(const char *elem, SDR_stream *strm, u_int32_t len)
{
texty_field *fld = texty_get_field(elem, 'B', strm);
return fld->rep;
@@ -2125,6 +2148,11 @@ isSafeChar(unsigned char c)
return (isprint(c) && c != ENCODE_CHAR) || isspace(c);
}
@ -105,7 +487,16 @@ $OpenBSD: patch-base_src_common_SDR_c,v 1.2 2002/08/28 22:23:29 todd Exp $
static ocmoff_t
encodedLength(const void *vp, ocmoff_t len)
{
@@ -2207,7 +2234,6 @@ dtexty_get_field(const char *name, char
@@ -2169,7 +2197,7 @@ encodeString(const void *vp, ocmoff_t le
static void
dtexty_w_bytestring(const char *elem, SDR_stream *strm, const char ty,
- unsigned long len, const void *vp)
+ u_int32_t len, const void *vp)
{
ocmoff_t elen = len; /* encoded length */
const void *evp = vp; /* encoded string */
@@ -2207,7 +2235,6 @@ dtexty_get_field(const char *name, char
{
/* Do an in-place conversion to safe form on the string that came
back: */
@ -113,7 +504,7 @@ $OpenBSD: patch-base_src_common_SDR_c,v 1.2 2002/08/28 22:23:29 todd Exp $
unsigned char *base = fld->rep;
unsigned char *end = base + fld->value;
unsigned char *to = fld->rep;
@@ -2240,8 +2266,7 @@ dtexty_get_field(const char *name, char
@@ -2240,8 +2267,7 @@ dtexty_get_field(const char *name, char
THROW(ExMalformed, "Mis-encoded or malformed input string");
}
@ -123,7 +514,50 @@ $OpenBSD: patch-base_src_common_SDR_c,v 1.2 2002/08/28 22:23:29 todd Exp $
}
fld->value = to - base; /* len excludes terminating NUL */
@@ -2539,7 +2564,7 @@ static struct serializer sermodes[] = {
@@ -2291,7 +2317,7 @@ dtexty_get_field(const char *name, char
{
char* decoded;
char hex[2];
- unsigned int len = 2;
+ u_int32_t len = 2;
encoded_rep++;
hex[0] = *encoded_rep++;
hex[1] = *encoded_rep++;
@@ -2334,14 +2360,14 @@ dtexty_get_field(const char *name, char
#if 0
static void
dtexty_w_bytestring(const char *elem, SDR_stream *strm, const char ty,
- unsigned long len, const void *vp)
+ u_int32_t len, const void *vp)
{
texty_do_indent(strm);
if(vp)
{
const unsigned char* dat = (const unsigned char*)vp;
- unsigned int j;
+ u_int32_t j;
stream_printf(strm, "%s %c %u", elem, ty, len+1);
if (ty == 'N' || ty == 'O')
@@ -2415,14 +2441,14 @@ dtexty_r_buffer(const char *elem, SDR_st
dtexty_w_bytestring and dtexty_get_field. Yuck.
*/
static void
-dtexty_w_bytes(const char *elem, SDR_stream *strm, unsigned long len,
+dtexty_w_bytes(const char *elem, SDR_stream *strm, u_int32_t len,
const void *s)
{
dtexty_w_bytestring(elem, strm, 'B', len, s);
}
static void *
-dtexty_r_bytes(const char *elem, SDR_stream *strm, unsigned long len)
+dtexty_r_bytes(const char *elem, SDR_stream *strm, u_int32_t len)
{
texty_field *fld = dtexty_get_field(elem, 'B', strm);
return fld->rep;
@@ -2539,7 +2565,7 @@ static struct serializer sermodes[] = {
texty_w_obname, texty_r_obname,
texty_write, texty_read },
/* DTEXTY streams */

View File

@ -0,0 +1,50 @@
$OpenBSD: patch-base_src_common_SDR_h,v 1.3 2002/09/04 16:21:43 todd Exp $
--- base/src/common/SDR.h.orig Mon Jul 22 02:02:49 2002
+++ base/src/common/SDR.h Tue Sep 3 23:34:47 2002
@@ -64,7 +64,7 @@ SDR_stream* stream_createBuffer(unsig
SDR_stream* stream_create_sha1(void);
-SDR_stream* stream_fromfile(const char *fileName, unsigned formet);
+SDR_stream* stream_fromfile(const char *fileName, unsigned format);
SDR_stream* stream_fromMemory(const char *buffer, unsigned len, unsigned format);
SDR_stream* stream_fromBuffer(Buffer *buf, unsigned format);
@@ -95,26 +95,22 @@ size_t stream_scanf(SDR_stream*,
-void sdr_w_u8(const char *elem, SDR_stream *,
- unsigned char);
-unsigned char sdr_r_u8(const char *elem, SDR_stream *);
-
-void sdr_w_u16(const char *elem, SDR_stream *,
- unsigned short);
-unsigned short sdr_r_u16(const char *elem, SDR_stream *);
-
-void sdr_w_u32(const char *elem, SDR_stream *,
- unsigned long);
-unsigned long sdr_r_u32(const char *elem, SDR_stream *);
+void sdr_w_u8(const char *elem, SDR_stream *, u_int8_t);
+u_int8_t sdr_r_u8(const char *elem, SDR_stream *);
-void sdr_w_u64(const char *elem, SDR_stream *,
- oc_uint64_t);
+void sdr_w_u16(const char *elem, SDR_stream *, u_int16_t);
+u_int16_t sdr_r_u16(const char *elem, SDR_stream *);
+
+void sdr_w_u32(const char *elem, SDR_stream *, u_int32_t);
+u_int32_t sdr_r_u32(const char *elem, SDR_stream *);
+
+void sdr_w_u64(const char *elem, SDR_stream *, oc_uint64_t);
oc_uint64_t sdr_r_u64(const char *elem, SDR_stream *);
void sdr_w_bytes(const char *elem, SDR_stream *,
- unsigned long len, const void *);
+ u_int32_t len, const void *);
void * sdr_r_bytes(const char *elem, SDR_stream *,
- unsigned long len);
+ u_int32_t len);
void sdr_w_buffer(const char *elem, SDR_stream *, const Buffer*);
Buffer * sdr_r_buffer(const char *elem, SDR_stream *, ocmoff_t len);

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-base_src_common_Serializable_c,v 1.3 2002/09/04 16:21:43 todd Exp $
--- base/src/common/Serializable.c.orig Mon Jul 29 22:48:29 2002
+++ base/src/common/Serializable.c Tue Sep 3 23:34:47 2002
@@ -72,7 +72,7 @@ SerialType *serTypes[TY_ntypes] = {
#include "OBTYPES.def"
SerialType *
-ser_find_type(unsigned long t)
+ser_find_type(u_int32_t t)
{
unsigned u;

View File

@ -0,0 +1,34 @@
$OpenBSD: patch-base_src_common_Serializable_h,v 1.3 2002/09/04 16:21:43 todd Exp $
--- base/src/common/Serializable.h.orig Mon Jul 29 22:48:35 2002
+++ base/src/common/Serializable.h Tue Sep 3 23:34:47 2002
@@ -56,8 +56,8 @@ enum {
typedef struct DeserializeInfo DeserializeInfo;
struct DeserializeInfo {
struct SerialType *st;
- unsigned long tyConst; /* type constant as serialized */
- unsigned long ver; /* version number as serialized */
+ u_int32_t tyConst; /* type constant as serialized */
+ u_int32_t ver; /* version number as serialized */
};
#define OBTYPE(nm,prefix,abbrev,ver) \
@@ -76,8 +76,8 @@ struct DeserializeInfo {
canonicalize the internal representation before displaying the
object. */
struct SerialType {
- unsigned long typ; /* type constant for this object */
- unsigned long ver; /* version constant for this object */
+ u_int32_t typ; /* type constant for this object */
+ u_int32_t ver; /* version constant for this object */
const char * tyName; /* used in texty formats */
const char * prefix; /* used as first part of truename */
void * (*deserialize) (const DeserializeInfo *, SDR_stream *);
@@ -99,7 +99,7 @@ struct Serializable {
#define serTrueName ser.ser_trueName
#define serPrefix ser.ser_type->prefix
-SerialType *ser_find_type(unsigned long ty);
+SerialType *ser_find_type(u_int32_t ty);
void ser_init(void);
const char *ser_getTrueName(const void *);

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-base_src_common_ServerReply_c,v 1.1 2002/09/04 16:21:43 todd Exp $
--- base/src/common/ServerReply.c.orig Mon Jul 29 22:48:37 2002
+++ base/src/common/ServerReply.c Tue Sep 3 23:34:47 2002
@@ -96,7 +96,7 @@ reply_deserialize(const DeserializeInfo
}
Reply *
-reply_create(unsigned int reqid, Serializable *s)
+reply_create(u_int32_t reqid, Serializable *s)
{
Reply *r = (Reply *) GC_MALLOC(sizeof(Reply));

View File

@ -0,0 +1,20 @@
$OpenBSD: patch-base_src_common_ServerReply_h,v 1.1 2002/09/04 16:21:43 todd Exp $
--- base/src/common/ServerReply.h.orig Tue Jul 16 21:49:02 2002
+++ base/src/common/ServerReply.h Tue Sep 3 23:34:47 2002
@@ -44,14 +44,14 @@
typedef struct Reply {
Serializable ser;
- unsigned int reqID;
+ u_int32_t reqID;
Serializable *value;
/* This part is NOT serialized: */
Channel *channel;
} Reply;
-Reply *reply_create (unsigned int reqid, Serializable *s);
+Reply *reply_create (u_int32_t reqid, Serializable *s);
void reply_trace(const Reply*);

View File

@ -0,0 +1,30 @@
$OpenBSD: patch-base_src_common_ServerRequest_c,v 1.1 2002/09/04 16:21:43 todd Exp $
--- base/src/common/ServerRequest.c.orig Mon Jul 29 22:48:43 2002
+++ base/src/common/ServerRequest.c Tue Sep 3 23:34:47 2002
@@ -68,7 +68,7 @@ request_deserialize(const DeserializeInf
}
Request *
-request_create(unsigned int ocode, unsigned int reqid)
+request_create(u_int32_t ocode, u_int32_t reqid)
{
Request *p = (Request *) GC_MALLOC(sizeof(Request));
@@ -87,7 +87,7 @@ request_create(unsigned int ocode, unsig
void
request_show(const void *ob)
{
- unsigned int u;
+ u_int32_t u;
const Request *r = ob;
xprintf("Opcode: %u [%s]\n", r->opcode, opcodes[r->opcode].name);
@@ -103,7 +103,7 @@ request_show(const void *ob)
void
request_trace(const Request *r)
{
- unsigned int u;
+ u_int32_t u;
xprintf("Opcode: %u [%s]\n", r->opcode, opcodes[r->opcode].name);
xprintf("ReqId: %u\n", r->reqID);

View File

@ -0,0 +1,30 @@
$OpenBSD: patch-base_src_common_ServerRequest_h,v 1.3 2002/09/04 16:21:43 todd Exp $
--- base/src/common/ServerRequest.h.orig Tue Jul 16 21:49:02 2002
+++ base/src/common/ServerRequest.h Tue Sep 3 23:34:47 2002
@@ -41,13 +41,14 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-typedef unsigned long reqlen_t;
+/* future 64bit value (Jack Lloyd) */
+typedef u_int32_t reqlen_t;
typedef struct Request {
Serializable ser;
- unsigned int opcode;
- unsigned int reqID;
+ u_int32_t opcode;
+ u_int32_t reqID;
/* Some commands take arguments. Store
* any such arguments here:
@@ -59,7 +60,7 @@ typedef struct Request {
} Request;
-Request *request_create (unsigned int ocode, unsigned int reqid);
+Request *request_create (u_int32_t ocode, u_int32_t reqid);
void request_trace(const Request *);
/*

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-base_src_common_TrueName_h,v 1.3 2002/09/04 16:21:43 todd Exp $
--- base/src/common/TrueName.h.orig Wed Jul 17 23:27:56 2002
+++ base/src/common/TrueName.h Tue Sep 3 23:34:47 2002
@@ -49,7 +49,7 @@ const char *truename_NewName(void);
/* Generate an integer hash of the trueName suitable for use in hash
tables */
-typedef unsigned long tnhash_t;
+typedef u_int32_t tnhash_t;
tnhash_t truename_hash(const char *trueName);

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-base_src_common_User_c,v 1.1 2002/09/04 16:21:43 todd Exp $
--- base/src/common/User.c.orig Mon Jul 29 22:48:39 2002
+++ base/src/common/User.c Tue Sep 3 23:34:47 2002
@@ -185,7 +185,7 @@ user_GetFP(User *u)
const char *strkey;
void *tmpbuf;
long num = 0;
- unsigned int n;
+ u_int32_t n;
int j;
int offset = 0;
char *fp;

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-base_src_common_WireException_h,v 1.3 2002/09/04 16:21:43 todd Exp $
--- base/src/common/WireException.h.orig Mon Jul 8 16:31:00 2002
+++ base/src/common/WireException.h Tue Sep 3 23:34:47 2002
@@ -46,7 +46,7 @@ typedef struct WireException {
const char *name; /* exception name */
const char *fname; /* file where thrown (string) */
- unsigned long line; /* line number where thrown */
+ u_int32_t line; /* line number where thrown */
const char *str; /* explanation string */
} WireException;

View File

@ -0,0 +1,56 @@
$OpenBSD: patch-base_src_common_encode_c,v 1.3 2002/09/04 16:21:43 todd Exp $
--- base/src/common/encode.c.orig Mon Jul 8 16:31:06 2002
+++ base/src/common/encode.c Tue Sep 3 23:34:47 2002
@@ -64,7 +64,7 @@ b64_lookup(unsigned char c)
}
void *
-b64_decode(const char *s, unsigned int *inlen)
+b64_decode(const char *s, u_int32_t *inlen)
{
unsigned len = *inlen;
unsigned outlen = (len * 6) / 8;
@@ -119,7 +119,7 @@ b64_decode(const char *s, unsigned int *
}
char *
-b64_encode(const void *vp, unsigned int len)
+b64_encode(const void *vp, u_int32_t len)
{
unsigned const char *cp = vp;
unsigned outlen = (len*8 + 5) / 6;
@@ -127,12 +127,12 @@ b64_encode(const void *vp, unsigned int
char *pBuf = outbuf;
while (len) {
- unsigned long take = min(len, 3);
- unsigned long value = 0;
- unsigned long outlen = (take * 8 + 5) / 6;
+ u_int32_t take = min(len, 3);
+ u_int32_t value = 0;
+ u_int32_t outlen = (take * 8 + 5) / 6;
unsigned i;
- assert(sizeof(unsigned long) == 4);
+ assert(sizeof(u_int32_t) == 4);
if (take == 3) {
value = cp[2];
@@ -174,7 +174,7 @@ fromhex(char c)
/* Return decoded sequence of bytes along
* with length of that sequence in 'len'*/
void *
-hex_decode(const char *s, unsigned int *len)
+hex_decode(const char *s, u_int32_t *len)
{
unsigned char *b;
unsigned u, w;
@@ -205,7 +205,7 @@ hex_decode(const char *s, unsigned int *
/* Return encoded string that represents
* 'len' bytes beginning at buf: */
char *
-hex_encode(const void *vp, unsigned int len)
+hex_encode(const void *vp, u_int32_t len)
{
static char *hex_digits = "0123456789abcdef";
unsigned u, w;

View File

@ -0,0 +1,19 @@
$OpenBSD: patch-base_src_common_encode_h,v 1.1 2002/09/04 16:21:43 todd Exp $
--- base/src/common/encode.h.orig Mon Jul 8 16:31:07 2002
+++ base/src/common/encode.h Tue Sep 3 23:34:47 2002
@@ -41,11 +41,11 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-char *hex_encode(const void *, unsigned int len);
-void *hex_decode(const char *, unsigned int *len);
+char *hex_encode(const void *, u_int32_t len);
+void *hex_decode(const char *, u_int32_t *len);
-char *b64_encode(const void *, unsigned int len);
-void *b64_decode(const char *, unsigned int *len);
+char *b64_encode(const void *, u_int32_t len);
+void *b64_decode(const char *, u_int32_t *len);
#endif /* COMMON_ENCODE_H */

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-base_src_common_except_c,v 1.3 2002/09/04 16:21:43 todd Exp $
--- base/src/common/except.c.orig Mon Jul 8 16:31:09 2002
+++ base/src/common/except.c Tue Sep 3 23:34:47 2002
@@ -73,7 +73,7 @@ DEFEXCEPTION(ExUnspecified, "Unspecified
excpt_unwind *exit_unwind_list = 0;
void
-_throw(catch_t *_cb, const char *fname, unsigned long line,
+_throw(catch_t *_cb, const char *fname, u_int32_t line,
Exception ex, const char *s)
{
_curCatch = _cb;

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-base_src_common_except_h,v 1.3 2002/09/04 16:21:43 todd Exp $
--- base/src/common/except.h.orig Thu Jul 18 20:30:57 2002
+++ base/src/common/except.h Tue Sep 3 23:34:47 2002
@@ -57,7 +57,7 @@ struct catch {
jmp_buf jbuf; /* saved catch environment */
Exception excpt; /* thrown exception value */
const char *fname; /* file where thrown (string) */
- unsigned long line; /* line number where thrown */
+ u_int32_t line; /* line number where thrown */
const char *str; /* explanation string */
catch_t *up; /* next (upward) catch block */
OC_bool caught; /* whether this exception was handled */
@@ -107,7 +107,7 @@ extern catch_t *_curCatch;
debugger. */
extern void _throw(catch_t *,
const char *fname,
- unsigned long line,
+ u_int32_t line,
Exception,
const char *s) __attribute__ ((__noreturn__));

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-base_src_common_rbtree_c,v 1.3 2002/09/04 16:21:43 todd Exp $
--- base/src/common/rbtree.c.orig Mon Aug 5 21:21:38 2002
+++ base/src/common/rbtree.c Tue Sep 3 23:34:47 2002
@@ -99,7 +99,7 @@ rbtree_s_cmpkey(const rbnode *rn1, const
rbnode *
-rbnode_create(const void *kvp, unsigned long kw, const void *data)
+rbnode_create(const void *kvp, u_int32_t kw, const void *data)
{
rbnode *rbn = GC_MALLOC(sizeof(rbnode));
rbn->left = TREE_NIL;

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-base_src_common_rbtree_h,v 1.3 2002/09/04 16:21:43 todd Exp $
--- base/src/common/rbtree.h.orig Mon Jul 29 22:48:43 2002
+++ base/src/common/rbtree.h Tue Sep 3 23:34:47 2002
@@ -47,7 +47,7 @@
typedef struct rbkey rbkey;
struct rbkey {
const void *vp;
- unsigned long w;
+ u_int32_t w;
};
/* The rbnode and rbkey structures are exposed because it is sometimes
@@ -103,7 +103,7 @@ int rbtree_compare_node_to_key(rbtree*,
int rbtree_compare_nodes(rbtree*, rbnode *, rbnode *);
/* For situations where the rbnode itself is sufficient: */
-rbnode *rbnode_create(const void *kvp, unsigned long kw, const void *data);
+rbnode *rbnode_create(const void *kvp, u_int32_t kw, const void *data);
#ifndef NDEBUG
/* tree_validate() -- check the subtree of ROOT rooted at NODE for

View File

@ -0,0 +1,47 @@
$OpenBSD: patch-base_src_common_sxdelta_c,v 1.3 2002/09/04 16:21:43 todd Exp $
--- base/src/common/sxdelta.c.orig Mon Aug 5 16:03:05 2002
+++ base/src/common/sxdelta.c Tue Sep 3 23:34:47 2002
@@ -133,7 +133,7 @@
something using limits.h to choose the proper value. */
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
-typedef unsigned long uint32_t;
+typedef u_int32_t uint32_t;
#endif
typedef struct hashpos_t {
@@ -597,9 +597,9 @@ emit_finish(sxdelta_t *xd)
#define HT_SHA1 0
typedef struct xdirent_t {
- unsigned long insOffset; /* of start of insert pool list */
- unsigned long cmdOffset; /* of start of CMD list */
- unsigned long cmdLen; /* of CMD list */
+ u_int32_t insOffset; /* of start of insert pool list */
+ u_int32_t cmdOffset; /* of start of CMD list */
+ u_int32_t cmdLen; /* of CMD list */
unsigned const char *name; /* entry name */
} xdirent_t;
@@ -608,9 +608,9 @@ typedef struct XDeltaArchive_t {
unsigned short version; /* currently 1 */
unsigned short flags; /* currently 0 */
- unsigned long nDirent; /* number of entries */
- unsigned long maxDirent; /* allocated dir space */
- unsigned long nContent; /* number of stored deltas */
+ u_int32_t nDirent; /* number of entries */
+ u_int32_t maxDirent; /* allocated dir space */
+ u_int32_t nContent; /* number of stored deltas */
struct xdirent_t *dir;
Buffer *content; /* sequence of serialized xdeltas */
@@ -694,7 +694,7 @@ xda_rewriteWith(XDeltaArchive_t *xda, sx
unsigned u;
ocmoff_t contentLen = buffer_length(xda->content);
- unsigned long newLen = contentLen;
+ u_int32_t newLen = contentLen;
newLen += stream_length(xd->ins);
newLen += stream_length(xd->cmd);
xda->nContent = newLen;

View File

@ -0,0 +1,66 @@
$OpenBSD: patch-base_src_common_util_c,v 1.3 2002/09/04 16:21:43 todd Exp $
--- base/src/common/util.c.orig Mon Aug 5 16:03:07 2002
+++ base/src/common/util.c Tue Sep 3 23:34:47 2002
@@ -179,8 +179,8 @@ nmequal(const char *s1, const char *s2)
size_t
xprintf(const char *fmt, ...)
{
- unsigned long len;
- unsigned long width = 0;
+ u_int32_t len;
+ u_int32_t width = 0;
OC_bool sign;
OC_bool rightAdjust;
char fillchar;
@@ -199,7 +199,7 @@ xprintf(const char *fmt, ...)
continue;
}
- /* largest thing we might convert fits in 20 digits (unsigned long
+ /* largest thing we might convert fits in 20 digits (u_int32_t
* long as decimal */
pend = &buf[20];
@@ -263,7 +263,7 @@ xprintf(const char *fmt, ...)
case 'd':
{
long l;
- unsigned long ul;
+ u_int32_t ul;
l = va_arg(ap, long);
@@ -277,7 +277,7 @@ xprintf(const char *fmt, ...)
ul = (l < 0) ? (unsigned) -l : (unsigned) l;
if (l == LONG_MIN)
- ul = ((unsigned long) LONG_MAX) + 1ul;
+ ul = ((u_int32_t) LONG_MAX) + 1ul;
while(ul) {
*(--p) = '0' + (ul % 10);
@@ -288,9 +288,9 @@ xprintf(const char *fmt, ...)
}
case 'u':
{
- unsigned long ul;
+ u_int32_t ul;
- ul = va_arg(ap, unsigned long);
+ ul = va_arg(ap, u_int32_t);
if (ul == 0) {
*(--p) = '0';
@@ -305,10 +305,10 @@ xprintf(const char *fmt, ...)
}
case 'x':
{
- unsigned long ul;
+ u_int32_t ul;
static char *hex_digits = "0123456789abcdef";
- ul = va_arg(ap, unsigned long);
+ ul = va_arg(ap, u_int32_t);
if (ul == 0) {
*(--p) = '0';

View File

@ -1,11 +1,11 @@
$OpenBSD: patch-base_src_opencm-builddir_h,v 1.1 2002/08/28 22:23:29 todd Exp $
$OpenBSD: patch-base_src_opencm-builddir_h,v 1.2 2002/09/04 16:21:43 todd Exp $
--- base/src/opencm-builddir.h.orig Mon Aug 5 21:47:11 2002
+++ base/src/opencm-builddir.h Wed Aug 28 14:26:40 2002
+++ base/src/opencm-builddir.h Tue Sep 3 23:34:47 2002
@@ -43,6 +43,6 @@
/* Generated automatically from opencm-builddir.h.in by configure. */
-#define CM_BUILD_PWD "/home/opencm/WORK/base"
+#define CM_BUILD_PWD "/u/todd/src/cm/DEV/base"
+#define CM_BUILD_PWD "/mrl/tf/src/cm/portability/base"
#endif /* OPENCM_BUILDDIR_H */

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-base_src_repos_net_NetRepository_c,v 1.3 2002/09/04 16:21:43 todd Exp $
--- base/src/repos/net/NetRepository.c.orig Mon Jul 22 02:02:48 2002
+++ base/src/repos/net/NetRepository.c Tue Sep 3 23:34:47 2002
@@ -45,7 +45,7 @@ static unsigned long request_id = 0;
#define make_request(x) do_make_request(OP_##x)
static Request *
-do_make_request(unsigned int opcode)
+do_make_request(u_int32_t opcode)
{
return request_create(opcode, ++request_id);
}

View File

@ -0,0 +1,92 @@
$OpenBSD: patch-base_tools_cvsconvert_py,v 1.3 2002/09/04 16:21:43 todd Exp $
--- base/tools/cvsconvert.py.orig Mon Jul 29 22:48:41 2002
+++ base/tools/cvsconvert.py Tue Sep 3 23:34:47 2002
@@ -12,9 +12,9 @@ files = []
versions = []
commits = {}
-scratch_dir = "/tmp/scratchme.$$"
+scratch_dir = "$sd/workspace"
co_scratchfile = "%s.%d" % ("/tmp/cvscvt-coscratch", os.getpid())
-msg_scratchfile = "/tmp/cvscvt-msgscratch.$$"
+msg_scratchfile = "$sd/cvscvt-msgscratch.$$"
startup_dir = os.getcwd()
verbose = 0
@@ -202,6 +202,9 @@ class CvtSink:
# a branch was created and the file was immediately deleted on the
# branch.
v.operation = "I"
+ elif (v.state == "dead" and brstate[br] == "dead"):
+ # I dont know why this happened, but it exists in OpenBSD cvs.
+ v.operation = "D"
else:
raise "%s:%s: Unknown object state transition (%s -> %s)!" % (self.rcsname, v.revision, brstate[br], v.state)
@@ -554,7 +557,7 @@ class AppGui(Frame):
if len(adds) > 0:
avec = adds
while len(avec) > 0:
- self.text.insert(END, "${OPENCM} --flush-io -C %s add" % scratch_dir, "CMD")
+ self.text.insert(END, "cd %s && ${OPENCM} --flush-io add" % scratch_dir, "CMD")
map (lambda x, self=self: self.text.insert(END, " '%s'" % x.opencmname, "INPUT"), avec[0:10])
self.text.insert(END, "\n", "CMD")
self.text.insert(END, "checkstatus $? \"add failed\"\n", "CMD")
@@ -563,7 +566,7 @@ class AppGui(Frame):
if len(deletes) > 0:
dvec = deletes
while len(dvec) > 0:
- self.text.insert(END, "${OPENCM} --flush-io -C %s rm" % scratch_dir, "CMD")
+ self.text.insert(END, "cd %s && ${OPENCM} --flush-io rm" % scratch_dir, "CMD")
map (lambda x, self=self: self.text.insert(END, " '%s'" % x.opencmname, "INPUT"), dvec[0:10])
self.text.insert(END, "\n", "CMD")
self.text.insert(END, "checkstatus $? \"remove failed\"\n", "CMD")
@@ -578,7 +581,7 @@ class AppGui(Frame):
# Note: Following activity is illegal in 17 states.
avec = active
while len(avec) > 0:
- self.text.insert(END, "${OPENCM} --flush-io -C %s --force-hash status" % scratch_dir, "CMD")
+ self.text.insert(END, "cd %s && ${OPENCM} --flush-io --force-hash status" % scratch_dir, "CMD")
map (lambda x, self=self: self.text.insert(END, " %s" % x.opencmname, "INPUT"), avec[0:10])
self.text.insert(END, "\n", "CMD")
self.text.insert(END, "checkstatus $? \"status check failed\"\n", "CMD")
@@ -593,7 +596,7 @@ class AppGui(Frame):
# re_squote.sub("'\"'\"'", cmtmsg))
- self.text.insert(END, "${OPENCM} --flush-io -C %s commit --messagefile %s\n" %
+ self.text.insert(END, "cd %s && ${OPENCM} --flush-io commit --messagefile %s\n" %
(scratch_dir, msg_scratchfile), "CMD")
self.text.insert(END, "checkstatus $? \"commit failed\"\n", "CMD")
self.text.insert(END, "rm %s\n" % msg_scratchfile, "CMD")
@@ -636,9 +639,11 @@ class AppGui(Frame):
self.text.insert(END, "OPENCM=${OPENCM:-cm}\n", "CMD")
self.text.insert(END, "export OPENCM\n", "CMD")
+ self.text.insert(END, "TMPDIR=${TMPDIR:-/tmp}\n", "CMD")
+ self.text.insert(END, "sd=$(mktemp -d ${TMPDIR}/scratchme.XXXXXX)\n", "CMD")
self.text.insert(END, "\n")
- self.text.insert(END, "function checkstatus()\n");
+ self.text.insert(END, "checkstatus()\n");
self.text.insert(END, "{\n");
self.text.insert(END, " if [ $1 -ne 0 ]\n");
self.text.insert(END, " then\n");
@@ -647,7 +652,7 @@ class AppGui(Frame):
self.text.insert(END, " fi\n");
self.text.insert(END, "}\n");
self.text.insert(END, "\n")
- self.text.insert(END, "function process_cvsignore()\n");
+ self.text.insert(END, "process_cvsignore()\n");
self.text.insert(END, "{\n");
self.text.insert(END, " echo CONVERTING .cvsignore: $1 '->' $2\n");
self.text.insert(END, " sed 's/^/exclude /' $1 > $2\n");
@@ -660,7 +665,7 @@ class AppGui(Frame):
self.text.insert(END, "checkstatus $? \"create project failed\"\n", "CMD");
self.text.insert(END, "rm -rf %s\n" % scratch_dir, "CMD")
- self.text.insert(END, "mkdir %s\n" % scratch_dir, "CMD")
+ self.text.insert(END, "mkdir -p %s\n" % scratch_dir, "CMD")
self.text.insert(END, "\n")
self.text.insert(END, "# Check out empty project so we have something to work with\n", "COMMENT")
self.text.insert(END, "(cd %s;${OPENCM} checkout %s)\n" % (scratch_dir, self.petName.get()), "CMD")

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-base_zlib_Makefile,v 1.1 2002/08/28 22:23:29 todd Exp $
--- base/zlib/Makefile.orig Mon Aug 5 21:47:11 2002
+++ base/zlib/Makefile Wed Aug 28 14:26:40 2002
@@ -23,7 +23,7 @@ CFLAGS=-g
#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
# -Wstrict-prototypes -Wmissing-prototypes
-LDFLAGS=
+LDFLAGS=-L/usr/local/lib
LDSHARED=$(CC)
CPP=$(CC) -E