windows-nt revision 816e576f77e2c46df3e3d97d65822aa8aded7c4b
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmCopyright (C) 1999, 2000 Internet Software Consortium.
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmSee COPYRIGHT in the source root or http://isc.org/copyright.html for terms.
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm$Id: windows-nt,v 1.6 2000/08/09 04:37:28 tale Exp $
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm Windows NT Portability Notes
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmA primary goal in the overall design of BIND9 was to isolate functions
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmthat were specific to operating systems from those that are available
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmwith ANSI C. Even though development was being done on Unix-like
dda97aeba7480d08320ebceecae13b8531db1b81johanengelenmachines, the main intention was that a Windows NT port could be done
2e2b8bd323e3693f9d86f545ce049d3f1b45d1c2cilixwith far less hassle if the incompatible bits were encapsulated into
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmtheir own dedicated modules. A libisc API was designed for each
797bee69297bbdd86c5cff2e0771a71d1e2ac69dcilixoperating system feature that was needed, and initial implementations
2e2b8bd323e3693f9d86f545ce049d3f1b45d1c2cilixof those APIs were done for the various Unix operating systems. Some
a9109751d1921429395e977f67622776a21a9fcaKrisof the APIs have been implemented in Win32, but not yet all.
fb5a72174252e0e79107dcad3bf5a2bbd73e349cjohanengelenThe target Windows NT build environment was specified as having nmake
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmand the Microsoft Visual C++ 6.0 compiler, but explicitly _not_ having
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmCygwin or any other external portability package, because we wanted to
c0cd5511d3b975ebe07d019c1f5528108725e438johanengelenkeep the prerequisites as minimal as possible.
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmIn the source tree, the Unix implementations for the OS APIs are in a
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrm"unix" subdirectory of lib/isc, while the thread APIs based on POSIX
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmthreads are in lib/isc/pthreads. The Windows versions of the APIs are
d431763a9ec8059aa4962688de8144319969fb0fjohanengelenXXX expand this section
d431763a9ec8059aa4962688de8144319969fb0fjohanengelenTo build a kit for Windows NT, run util/nt-kit while in the top level
d431763a9ec8059aa4962688de8144319969fb0fjohanengelendirectory of the BIND9 sources. Its usage is:
d431763a9ec8059aa4962688de8144319969fb0fjohanengelen util/nt-kit [-zip|-nozip] [remotedest [localdest]]
d431763a9ec8059aa4962688de8144319969fb0fjohanengelenwhere "remotedest" is the path under which the sources will be
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmcompiled on the NT machine, and "localdest" is where the munged
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmsource tree will be placed on the local machine in preparation for
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmmounting/zipping/whatever to get it to the remote machine.
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmThe default remotedest is g:/proj/bind9-nt, because that suits my
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmenvironment and I'm the one working on this. Use forward slashes when
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmspecifying the remote path.
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmThe default localdest is ../bind9-nt.
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmA zip archive named "bind9-nt.zip" can be created in the parent
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmdirectory of "localdest" if the -zip flag is specified; otherwise,
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmnone is made by default.
79291918d036d77d586b6eba265d8d2ac0a7fee5cilix...XXX describe what nt-kit does
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmThis module defines several functions that are useful for writing an
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmapplication that uses the ISC library. Bob Halley originally said,
2e2b8bd323e3693f9d86f545ce049d3f1b45d1c2cilix"The main reason I wrote it was to help with the sometimes difficult
6c3e745a94ef6b25a4ef9f018d350a7535aa45afTed Gouldproblems that occur when you try to do a controlled shutdown of a
6c3e745a94ef6b25a4ef9f018d350a7535aa45afTed Gouldmultithreaded application. This scheme [using isc_app_start/
5cd969f185e1a05f873e023378d0831e71441da6joncruzisc_app_run/isc_app_finish] will allow an application to use the
797bee69297bbdd86c5cff2e0771a71d1e2ac69dcilixas-yet-unwritten single-threaded version of the ISC library without
e7333a0a54c8d33b7397406dd76938aa430836d5joncruzany source code changes." XXX It has not yet been implemented for
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmThis module provides compatibility with the pthread_cond_* functions
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmof POSIX, which can be used to synchronize threads based on a
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmcondition variable.
fb5a72174252e0e79107dcad3bf5a2bbd73e349cjohanengelenThis module implements the directory scanning routines isc_dir_open,
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmisc_dir_read and isc_dir_close, used to iterate over the filenames in
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrma directory. XXX It also implements isc_dir_chdir to set the current
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmdirectory, but this function has not yet been written for Win32.
0903335a0099bd7ee779925f43a15a2216a0e863johanengelenThe File module is for functions that access and/or modify operating
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmsystem information about files. XXX It has not yet been written for Win32.
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmThis module implements the pthreads functions flockfile, funlockfile
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmand getc_unlocked, which synchronize stdio calls from multiple
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmthreads. XXX It has not yet been written for Win32. Or for Unix
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmfor that matter. Merge into File?
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmInterfaceiter
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmThis module implements the isc_interfaceiter_first, _next, _current
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmand _destroy functions to list all of the network interfaces on a
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmmachine. XXX It has not yet been written for Win32.
79291918d036d77d586b6eba265d8d2ac0a7fee5cilixXXX It has not yet been written for Win32.
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmXXX It has not yet been written for Win32.
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmThis module ensures that a particular function, such as an
ea3e4fdbdbf0a48ae887b096d301549da77d5707Johan Engeleninitialization routine, is only executed once, ensuring that any other
ea3e4fdbdbf0a48ae887b096d301549da77d5707Johan Engelenthreads that need to have the target function executed before they can
c0cd5511d3b975ebe07d019c1f5528108725e438johanengelenwork are blocked until the target function has completely finished.
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmXXX It has not yet been written for Win32.
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmThis module defines isc_stdtime_get, which stores the number of
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmseconds since 1 Jan 1970 00:00:00 UTC in an isc_stdtime_t variable.
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmThis module provides the isc_thread_create and isc_thread_join
ea3e4fdbdbf0a48ae887b096d301549da77d5707Johan Engelenfunctions, which behave like the POSIX Thread routines pthread_create
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmand pthread_join. XXX It also defines isc_thread_self to return the id of
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmthe calling thread.
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmThis module defines several time management routines, such getting the
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmcurrent time, adding or subtracting an interval, finding the
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmdifference between two times, or simply determining whether one time
f07bfd5a05d43a6d11f7cd442f085149092dea88pjrmis earlier than another.