windows-nt revision dafcb997e390efa4423883dafd100c975c4095d6
62e4c4187c3d3f2bc7d8deb9709c10c0bfb69e45Tinderbox UserCopyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
bf8267aa453e5d2a735ed732a043b77a0b355b20Mark AndrewsCopyright (C) 1999-2001 Internet Software Consortium.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark AndrewsSee COPYRIGHT in the source root or http://isc.org/copyright.html for terms.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews$Id: windows-nt,v 1.8 2004/03/05 05:04:47 marka Exp $
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
12178c86525332bb0ab66155feb61fbf32eca6acEvan Hunt Windows NT Portability Notes
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan HuntOVERVIEW
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan HuntA primary goal in the overall design of BIND9 was to isolate functions
351b62535d4c4f89883bfdba025999dd32490266Evan Huntthat were specific to operating systems from those that are available
35aae5884f410180706a89a9715bf9a85eeeb4b7Michał Kępieńwith ANSI C. Even though development was being done on Unix-like
35aae5884f410180706a89a9715bf9a85eeeb4b7Michał Kępieńmachines, the main intention was that a Windows NT port could be done
35aae5884f410180706a89a9715bf9a85eeeb4b7Michał Kępieńwith far less hassle if the incompatible bits were encapsulated into
35aae5884f410180706a89a9715bf9a85eeeb4b7Michał Kępieńtheir own dedicated modules. A libisc API was designed for each
e13d04fda918c0c14c2247475bb99e0760d9a6a4Evan Huntoperating system feature that was needed, and initial implementations
351b62535d4c4f89883bfdba025999dd32490266Evan Huntof those APIs were done for the various Unix operating systems. Some
351b62535d4c4f89883bfdba025999dd32490266Evan Huntof the APIs have been implemented in Win32, but not yet all.
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan HuntThe target Windows NT build environment was specified as having nmake
dbb012765c735ee0d82dedb116cdc7cf18957814Evan Huntand the Microsoft Visual C++ 6.0 compiler, but explicitly _not_ having
351b62535d4c4f89883bfdba025999dd32490266Evan HuntCygwin or any other external portability package, because we wanted to
12178c86525332bb0ab66155feb61fbf32eca6acEvan Huntkeep the prerequisites as minimal as possible.
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan HuntIn the source tree, the Unix implementations for the OS APIs are in a
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt"unix" subdirectory of lib/isc, while the thread APIs based on POSIX
351b62535d4c4f89883bfdba025999dd32490266Evan Huntthreads are in lib/isc/pthreads. The Windows versions of the APIs are
351b62535d4c4f89883bfdba025999dd32490266Evan Huntin lib/isc/win32.
2f4d747a267026e6298ba9ece22c9dfa0ac254daFrancis Dupont
351b62535d4c4f89883bfdba025999dd32490266Evan HuntCOMPILING
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan HuntXXX expand this section
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan HuntTo build a kit for Windows NT, run util/nt-kit while in the top level
351b62535d4c4f89883bfdba025999dd32490266Evan Huntdirectory of the BIND9 sources. Its usage is:
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt util/nt-kit [-zip|-nozip] [remotedest [localdest]]
351b62535d4c4f89883bfdba025999dd32490266Evan Huntwhere "remotedest" is the path under which the sources will be
351b62535d4c4f89883bfdba025999dd32490266Evan Huntcompiled on the NT machine, and "localdest" is where the munged
dbb012765c735ee0d82dedb116cdc7cf18957814Evan Huntsource tree will be placed on the local machine in preparation for
dbb012765c735ee0d82dedb116cdc7cf18957814Evan Huntmounting/zipping/whatever to get it to the remote machine.
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
dbb012765c735ee0d82dedb116cdc7cf18957814Evan HuntThe default remotedest is g:/proj/bind9-nt, because that suits my
a27fe4c990f96bd792f2a07ca4d38c78d5b9df2cTatuya JINMEI 神明達哉environment and I'm the one working on this. Use forward slashes when
dbb012765c735ee0d82dedb116cdc7cf18957814Evan Huntspecifying the remote path.
a27fe4c990f96bd792f2a07ca4d38c78d5b9df2cTatuya JINMEI 神明達哉
dbb012765c735ee0d82dedb116cdc7cf18957814Evan HuntThe default localdest is ../bind9-nt.
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan HuntA zip archive named "bind9-nt.zip" can be created in the parent
351b62535d4c4f89883bfdba025999dd32490266Evan Huntdirectory of "localdest" if the -zip flag is specified; otherwise,
351b62535d4c4f89883bfdba025999dd32490266Evan Huntnone is made by default.
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
46bc64f4b1a0e84ab0397943453fe83a17baf2c4Evan Hunt...XXX describe what nt-kit does
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt...XXX config.status.win32, config.h.win32
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan HuntMODULES
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan HuntApp
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan HuntThis module defines several functions that are useful for writing an
351b62535d4c4f89883bfdba025999dd32490266Evan Huntapplication that uses the ISC library. Bob Halley originally said,
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt"The main reason I wrote it was to help with the sometimes difficult
351b62535d4c4f89883bfdba025999dd32490266Evan Huntproblems that occur when you try to do a controlled shutdown of a
351b62535d4c4f89883bfdba025999dd32490266Evan Huntmultithreaded application. This scheme [using isc_app_start/
351b62535d4c4f89883bfdba025999dd32490266Evan Huntisc_app_run/isc_app_finish] will allow an application to use the
351b62535d4c4f89883bfdba025999dd32490266Evan Huntas-yet-unwritten single-threaded version of the ISC library without
351b62535d4c4f89883bfdba025999dd32490266Evan Huntany source code changes." XXX It has not yet been implemented for
351b62535d4c4f89883bfdba025999dd32490266Evan HuntWin32.
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
08f860f800d32007a0c9bf456f6c35fbb2ecbc81Evan HuntCondition
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
35aae5884f410180706a89a9715bf9a85eeeb4b7Michał KępieńThis module provides compatibility with the pthread_cond_* functions
a27fe4c990f96bd792f2a07ca4d38c78d5b9df2cTatuya JINMEI 神明達哉of POSIX, which can be used to synchronize threads based on a
a27fe4c990f96bd792f2a07ca4d38c78d5b9df2cTatuya JINMEI 神明達哉condition variable.
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
35aae5884f410180706a89a9715bf9a85eeeb4b7Michał KępieńDir
a27fe4c990f96bd792f2a07ca4d38c78d5b9df2cTatuya JINMEI 神明達哉
a27fe4c990f96bd792f2a07ca4d38c78d5b9df2cTatuya JINMEI 神明達哉This module implements the directory scanning routines isc_dir_open,
351b62535d4c4f89883bfdba025999dd32490266Evan Huntisc_dir_read and isc_dir_close, used to iterate over the filenames in
46bc64f4b1a0e84ab0397943453fe83a17baf2c4Evan Hunta directory. XXX It also implements isc_dir_chdir to set the current
46bc64f4b1a0e84ab0397943453fe83a17baf2c4Evan Huntdirectory, but this function has not yet been written for Win32.
46bc64f4b1a0e84ab0397943453fe83a17baf2c4Evan Hunt
46bc64f4b1a0e84ab0397943453fe83a17baf2c4Evan HuntFile
46bc64f4b1a0e84ab0397943453fe83a17baf2c4Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan HuntThe File module is for functions that access and/or modify operating
351b62535d4c4f89883bfdba025999dd32490266Evan Huntsystem information about files. XXX It has not yet been written for Win32.
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan HuntFilelock
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan HuntThis module implements the pthreads functions flockfile, funlockfile
351b62535d4c4f89883bfdba025999dd32490266Evan Huntand getc_unlocked, which synchronize stdio calls from multiple
351b62535d4c4f89883bfdba025999dd32490266Evan Huntthreads. XXX It has not yet been written for Win32. Or for Unix
351b62535d4c4f89883bfdba025999dd32490266Evan Huntfor that matter. Merge into File?
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan HuntInterfaceiter
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan HuntThis module implements the isc_interfaceiter_first, _next, _current
351b62535d4c4f89883bfdba025999dd32490266Evan Huntand _destroy functions to list all of the network interfaces on a
46bc64f4b1a0e84ab0397943453fe83a17baf2c4Evan Huntmachine. XXX It has not yet been written for Win32.
46bc64f4b1a0e84ab0397943453fe83a17baf2c4Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan HuntIpv6
8a5809527e6c85e39699901712a455d5480907c1Evan Hunt
8a5809527e6c85e39699901712a455d5480907c1Evan HuntXXX It has not yet been written for Win32.
8a5809527e6c85e39699901712a455d5480907c1Evan Hunt
8a5809527e6c85e39699901712a455d5480907c1Evan HuntNet
8a5809527e6c85e39699901712a455d5480907c1Evan Hunt
8a5809527e6c85e39699901712a455d5480907c1Evan HuntXXX It has not yet been written for Win32.
8a5809527e6c85e39699901712a455d5480907c1Evan Hunt
8a5809527e6c85e39699901712a455d5480907c1Evan HuntOnce
351b62535d4c4f89883bfdba025999dd32490266Evan Hunt
351b62535d4c4f89883bfdba025999dd32490266Evan HuntThis module ensures that a particular function, such as an
initialization routine, is only executed once, ensuring that any other
threads that need to have the target function executed before they can
work are blocked until the target function has completely finished.
Socket
XXX It has not yet been written for Win32.
Stdtime
This module defines isc_stdtime_get, which stores the number of
seconds since 1 Jan 1970 00:00:00 UTC in an isc_stdtime_t variable.
Thread
This module provides the isc_thread_create and isc_thread_join
functions, which behave like the POSIX Thread routines pthread_create
and pthread_join. XXX It also defines isc_thread_self to return the id of
the calling thread.
Time
This module defines several time management routines, such getting the
current time, adding or subtracting an interval, finding the
difference between two times, or simply determining whether one time
is earlier than another.