[OpenAFS-devel] Re: AFS on NT - compilation problems - Help!
Dave Bailey
D.Bailey@bristol.ac.uk
Wed, 28 Mar 2001 11:48:35 +0100
Hi,
Here's a patch for the warnings in src/util/fileutil.c
Dave
*** src/util/fileutil.c~ Sat Nov 4 10:06:04 2000
--- src/util/fileutil.c Wed Mar 28 11:34:55 2001
***************
*** 18,23 ****
--- 18,24 ----
#ifdef AFS_NT40_ENV
#include <windows.h>
+ #include <io.h>
#include "errmap_nt.h"
#else
#include <unistd.h>
***************
*** 105,118 ****
bufio_p BufioOpen(char *path, int oflag, int mode)
{
bufio_p bp;
- BUFIO_FD fd;
bp = (bufio_p)malloc(sizeof(bufio_t));
if (bp == NULL) {
return NULL;
}
!
bp->fd = open(path, oflag, mode);
if (bp->fd == BUFIO_INVALID_FD) {
free(bp);
return NULL;
--- 106,121 ----
bufio_p BufioOpen(char *path, int oflag, int mode)
{
bufio_p bp;
bp = (bufio_p)malloc(sizeof(bufio_t));
if (bp == NULL) {
return NULL;
}
! #ifdef AFS_NT40_ENV
! bp->fd = _open(path, oflag, mode);
! #else
bp->fd = open(path, oflag, mode);
+ #endif
if (bp->fd == BUFIO_INVALID_FD) {
free(bp);
return NULL;
***************
*** 144,150 ****
--- 147,157 ----
len = bp->len;
while (1) {
if (pos >= len) {
+ #ifdef AFS_NT40_ENV
+ rc = _read(bp->fd, bp->buf, BUFIO_BUFSIZE);
+ #else
rc = read(bp->fd, bp->buf, BUFIO_BUFSIZE);
+ #endif
if (rc < 0) {
bp->eof = 1;
return -1;
***************
*** 190,196 ****
--- 197,207 ----
}
fd = bp->fd;
free(bp);
+ #ifdef AFS_NT40_ENV
+ rc = _close(fd);
+ #else
rc = close(fd);
+ #endif
return rc;
}
-----Original Message-----
From: Derrick J Brashear [mailto:shadow@dementia.org]
Sent: 27 March 2001 21:06
To: Kangesh Gunaseelan
Cc: openafs-devel@openafs.org
Subject: Re: [OpenAFS-devel] Re: AFS on NT - compilation problems -
Help!
On Tue, 27 Mar 2001, Kangesh Gunaseelan wrote:
>
>
> Hi,
>
> I am trying to compile openafs-1.0.3 on NT using MSVC 5.0. I am seeing
> quite a lot of warnings and a linker error so far. I have attached a
file
> that contains part of the output from nmake. Has anyone successfully
> compiled OpenAFS on NT using VC5.0 or VC6.0? I am having to touch quite a
> few files in order to remove some of the major warnings. It will be great
> if someone can point me in the right direction to compile OpenAFS on NT.
I
> checked the openafs-devel and openafs-info archives but couldn't find any
> postings that addresses these issues.
Yours was the first report. It is hopefully now fixed in CVS
> Creating library
> o:\projects\openafs-1.0.3\DEST\root.server\usr\afs\bin\kaserver.lib and
> object o:\projects\openafs-1.0.3\DEST\root.server\usr\afs\bin\kaserver.exp
> krb_udp.obj : error LNK2001: unresolved external symbol _snprintf
> o:\projects\openafs-1.0.3\DEST\root.server\usr\afs\bin\kaserver.exe :
fatal
> error LNK1120: 1 unresolved externals
-D
_______________________________________________
OpenAFS-devel mailing list
OpenAFS-devel@openafs.org
https://lists.openafs.org/mailman/listinfo.cgi/openafs-devel