mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 06:50:12 +00:00
afscp: build for windows
attempt windows support for afscp Change-Id: I61cb1349466f24558b320bc40e3fae42ce654810 Reviewed-on: http://gerrit.openafs.org/4424 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
de0c72bf7c
commit
d534981073
@ -508,7 +508,7 @@ client_osi: license
|
||||
$(NTMAKE)
|
||||
$(CD) ..\..\..
|
||||
|
||||
afsd: client_osi
|
||||
afsd: client_osi libafscp
|
||||
@echo ***** $@
|
||||
$(DOCD) $(SRC)\WINNT\$@
|
||||
$(CD) $(SRC)\WINNT\$@
|
||||
@ -676,6 +676,13 @@ rpctestlib: fsint libafsrpc
|
||||
$(NTMAKE)
|
||||
$(CD) ..\..
|
||||
|
||||
libafscp: util afs volser vlserver rx auth fsint afsdobjs
|
||||
@echo ***** $@
|
||||
$(DOCD) $(SRC)\$@
|
||||
$(CD) $(SRC)\$@
|
||||
$(NTMAKE)
|
||||
$(CD) ..\..
|
||||
|
||||
extra: netidmgr_plugin rpctestlib
|
||||
! IF EXIST($(SRC)\WINNT\extra) && EXIST($(SRC)\WINNT\extra\NTMakefile)
|
||||
@echo ***** $@
|
||||
|
@ -263,5 +263,7 @@ typedef int errno_t;
|
||||
#define HAVE_GETCWD 1
|
||||
#define HAVE_STRUPR 1
|
||||
|
||||
#define HAVE_KRB5_CREDS_KEYBLOCK_ENCTYPE 1
|
||||
|
||||
/* Build afsroken.dll as a dynamic library */
|
||||
#define ROKEN_LIB_DYNAMIC 1
|
||||
|
55
src/libafscp/NTMakefile
Normal file
55
src/libafscp/NTMakefile
Normal file
@ -0,0 +1,55 @@
|
||||
# Copyright 2000, International Business Machines Corporation and others.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# This software has been released under the terms of the IBM Public
|
||||
# License. For details, see the LICENSE file in the top-level source
|
||||
# directory or online at http://www.openafs.org/dl/license10.html
|
||||
|
||||
RELDIR=libacl
|
||||
!INCLUDE ..\config\NTMakefile.$(SYS_NAME)
|
||||
!INCLUDE ..\config\NTMakefile.version
|
||||
|
||||
############################################################################
|
||||
# Install inc files
|
||||
|
||||
INCFILEDIR = $(DESTDIR)\include\afs
|
||||
|
||||
INCFILES =\
|
||||
$(INCFILEDIR)\afscp.h
|
||||
|
||||
|
||||
############################################################################
|
||||
# build afscp.lib
|
||||
|
||||
LIBFILE = $(DESTDIR)\lib\afs\afscp.lib
|
||||
|
||||
afscflags = -I..\WINNT\kfw\inc\krb5 $(afscflags)
|
||||
|
||||
LIBOBJS =\
|
||||
$(OUT)\afscp_callback.obj \
|
||||
$(OUT)\afscp_server.obj \
|
||||
$(OUT)\afscp_fid.obj \
|
||||
$(OUT)\afscp_volume.obj \
|
||||
$(OUT)\afscp_file.obj \
|
||||
$(OUT)\afscp_dir.obj \
|
||||
$(OUT)\afscp_init.obj \
|
||||
$(OUT)\afscp_util.obj \
|
||||
$(OUT)\afscp_dirops.obj \
|
||||
$(OUT)\afscp_acl.obj \
|
||||
$(OUT)\AFS_component_version_number.obj
|
||||
|
||||
$(LIBFILE): $(LIBOBJS)
|
||||
$(LIBARCH)
|
||||
|
||||
|
||||
############################################################################
|
||||
# install afscp.lib
|
||||
|
||||
install_headers: $(INCFILES)
|
||||
|
||||
install: $(LIBFILE)
|
||||
|
||||
clean::
|
||||
$(DEL) $(INCFILES)
|
||||
|
||||
mkdir:
|
@ -29,11 +29,14 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include <roken.h>
|
||||
|
||||
#include <afs/afsutil.h>
|
||||
#ifdef AFS_NT40_ENV
|
||||
#include <windows.h>
|
||||
#include <rpc.h>
|
||||
#include <afs/cm_server.h>
|
||||
#include <WINNT/syscfg.h>
|
||||
#endif
|
||||
|
||||
#include <afs/afsutil.h>
|
||||
#include "afscp.h"
|
||||
#include "afscp_internal.h"
|
||||
|
||||
@ -55,6 +58,7 @@ init_afs_cb(void)
|
||||
* untested here and may be unnecessary if rx_getAllAddr() can be used on that
|
||||
* platform. However, there was already an ifdef here surrounding UuidCreate().
|
||||
*/
|
||||
long rx_mtu = -1;
|
||||
int code;
|
||||
int cm_IPAddr[CM_MAXINTERFACE_ADDR]; /* client's IP address in host order */
|
||||
int cm_SubnetMask[CM_MAXINTERFACE_ADDR]; /* client's subnet mask in host order */
|
||||
@ -307,7 +311,8 @@ SRXAFSCB_CallBack(struct rx_call * rxcall, AFSCBFids * Fids_Array,
|
||||
struct afscp_callback *cb;
|
||||
struct afscp_venusfid f;
|
||||
struct AFSFid *fid;
|
||||
int i, j;
|
||||
int i;
|
||||
unsigned int j;
|
||||
|
||||
if (server == NULL) {
|
||||
return 0;
|
||||
@ -529,10 +534,7 @@ SRXAFSCB_TellMeAboutYourself(struct rx_call * a_call,
|
||||
for (i = 0; i < cm_noIPAddr; i++) {
|
||||
addr->addr_in[i] = cm_IPAddr[i];
|
||||
addr->subnetmask[i] = cm_SubnetMask[i];
|
||||
addr->mtu[i] = (rx_mtu == -1
|
||||
|| (rx_mtu != -1
|
||||
&& cm_NetMtu[i] <
|
||||
rx_mtu)) ? cm_NetMtu[i] : rx_mtu;
|
||||
addr->mtu[i] = cm_NetMtu[i];
|
||||
}
|
||||
} else {
|
||||
addr->numberOfInterfaces = 0;
|
||||
|
@ -34,6 +34,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <afs/vlserver.h>
|
||||
#include <afs/vldbint.h>
|
||||
#include <afs/dir.h>
|
||||
#ifdef AFS_NT40_ENV
|
||||
#include <afs/errmap_nt.h>
|
||||
#endif
|
||||
#include "afscp.h"
|
||||
#include "afscp_internal.h"
|
||||
|
||||
|
@ -180,8 +180,11 @@ afscp_Stat(const struct afscp_venusfid *fid, struct stat *s)
|
||||
s->st_mode = S_IFREG;
|
||||
else if (status.FileType == Directory)
|
||||
s->st_mode = S_IFDIR;
|
||||
#ifndef AFS_NT40_ENV
|
||||
else if (status.FileType == SymbolicLink)
|
||||
s->st_mode = S_IFLNK;
|
||||
/* a behavior needs to be defined on Windows */
|
||||
#endif
|
||||
else {
|
||||
afscp_errno = EINVAL;
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user