DEVEL15-windows-pt_util-20090526

LICENSE MIT

build pt_util.exe on Windows


(cherry picked from commit 8ea8519f3094692c2d7a55fb1702255d0b115a8f)
This commit is contained in:
Jeffrey Altman 2009-05-27 07:59:46 +00:00
parent 4a2dc4a1e5
commit aee6d9214c
4 changed files with 49 additions and 3 deletions

View File

@ -86,6 +86,7 @@ $(PTSERVER): $(PTSERVER_EXEOBJS) $(RXKADOBJS) $(PTSERVER_EXELIBS)
PTS = $(DESTDIR)\bin\pts.exe
PTCLIENT = $(DESTDIR)\bin\ptclient.exe
PT_UTIL = $(DESTDIR)\bin\pt_util.exe
PTS_EXEOBJS =\
$(OUT)\pts.obj \
@ -96,6 +97,14 @@ PTCLIENT_EXEOBJS =\
$(OUT)\display.obj \
$(OUT)\ptclient.res
PT_UTIL_EXEOBJS = \
$(OUT)\pt_util.obj \
$(OUT)\ptutils.obj \
$(OUT)\ubik.obj \
$(OUT)\utils.obj \
$(OUT)\map.obj \
$(OUT)\pts.res
PTS_EXELIBS =\
$(DESTDIR)\lib\afsubik.lib \
$(DESTDIR)\lib\afs\afsauth.lib \
@ -124,6 +133,12 @@ $(PTCLIENT): $(PTCLIENT_EXEOBJS) $(PTS_EXELIBS)
$(EXEPREP)
$(CODESIGN_USERLAND)
$(PT_UTIL): $(PT_UTIL_EXEOBJS) $(PTS_EXELIBS)
$(EXECONLINK) dnsapi.lib mpr.lib iphlpapi.lib shell32.lib
$(_VC_MANIFEST_EMBED_EXE)
$(EXEPREP)
$(CODESIGN_USERLAND)
############################################################################
# generate versioninfo resources
@ -163,7 +178,7 @@ pterror.h pterror.c: pterror.et
############################################################################
# install pts, ptserver and afsprot.lib
install: $(INCFILES) ptint.ss.c ptint.cs.c ptint.xdr.c $(LIBFILE) $(PTSERVER) $(PTS) $(PTCLIENT) $(OUT)\readgroup.exe \
install: $(INCFILES) ptint.ss.c ptint.cs.c ptint.xdr.c $(LIBFILE) $(PTSERVER) $(PTS) $(PTCLIENT) $(PT_UTIL) $(OUT)\readgroup.exe \
$(OUT)\readpwd.exe $(OUT)\testpt.exe $(OUT)\db_verify.exe \
$(DESTDIR)\root.server\usr\afs\bin\pts.exe \
$(DESTDIR)\root.server\usr\afs\bin\ptclient.exe \
@ -184,6 +199,9 @@ $(DESTDIR)\root.server\usr\afs\bin\pts.exe: $(PTS)
$(DESTDIR)\root.server\usr\afs\bin\ptclient.exe: $(PTCLIENT)
$(COPY) $(PTCLIENT) $(DESTDIR)\root.server\usr\afs\bin\ptclient.exe
$(DESTDIR)\root.server\usr\afs\bin\pt_util.exe: $(PT_UTIL)
$(COPY) $(PT_UTIL) $(DESTDIR)\root.server\usr\afs\bin\pt_util.exe
$(INCFILEDIR)\afs\prserver.h: $(INCFILEDIR)\afs\ptserver.h
$(COPY) $(INCFILEDIR)\afs\ptserver.h $(INCFILEDIR)\afs\prserver.h
@ -204,7 +222,7 @@ clean::
$(DEL) ptint.cs.c ptint.ss.c ptint.xdr.c ptint.h
$(DEL) $(OUT)\readgroup.exe $(OUT)\readpwd.exe $(OUT)\db_verify.exe $(OUT)\testpt.exe
$(DEL) pterror.h pterror.c
$(DEL) $(PTS) $(PTCLIENT)
$(DEL) $(PTS) $(PTCLIENT) $(PT_UTIL)
############################################################################
# tests?

View File

@ -12,12 +12,18 @@
*/
#include <sys/types.h>
#ifndef _WIN32
#include <sys/time.h>
#include <sys/file.h>
#else
#include <fcntl.h>
#include <io.h>
#define L_SET SEEK_SET
#endif
#include <stdio.h>
#include <ctype.h>
#include <string.h>
#include <errno.h>
#include <sys/file.h>
#include <afsconfig.h>
#include <afs/param.h>
@ -30,7 +36,9 @@ RCSID
#include <afs/afsutil.h>
#include <errno.h>
#include <lock.h>
#ifndef _WIN32
#include <netinet/in.h>
#endif
#define UBIK_INTERNALS
#include <ubik.h>
#include <rx/xdr.h>

17
src/ptserver/pt_util.rc Normal file
View File

@ -0,0 +1,17 @@
/*
* 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
*/
/* Define VERSIONINFO resource */
#define AFS_VERINFO_FILE_DESCRIPTION "AFS Protection Database Utility"
#define AFS_VERINFO_NAME "pt_util"
#define AFS_VERINFO_FILENAME "pt_util.exe"
#include "AFS_component_version_number.h"
#include "..\config\NTVersioninfo.rc"

View File

@ -7,9 +7,12 @@ RCSID
("$Header$");
#include <sys/types.h>
#ifndef AFS_NT40_ENV
#include <netinet/in.h>
#endif
#include <string.h>
#include <stdarg.h>
#include <io.h>
#include <lock.h>
#define UBIK_INTERNALS