windows-nt revision 9c3531d72aeaad6c5f01efe6a1c82023e1379e4d
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas GustafssonCopyright (C) 1999, 2000 Internet Software Consortium.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas GustafssonSee COPYRIGHT in the source root or http://www.isc.org/copyright for terms.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews$Id: windows-nt,v 1.4 2000/06/22 21:54:00 tale Exp $
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson Windows NT Portability Notes
dafcb997e390efa4423883dafd100c975c4095d6Mark AndrewsA primary goal in the overall design of BIND9 was to isolate functions
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrewsthat were specific to operating systems from those that are available
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrewswith ANSI C. Even though development was being done on Unix-like
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrewsmachines, the main intention was that a Windows NT port could be done
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrewswith far less hassle if the incompatible bits were encapsulated into
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrewstheir own dedicated modules. A libisc API was designed for each
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrewsoperating system feature that was needed, and initial implementations
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonof those APIs were done for the various Unix operating systems. Some
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonof the APIs have been implemented in Win32, but not yet all.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas GustafssonThe target Windows NT build environment was specified as having nmake
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonand the Microsoft Visual C++ 6.0 compiler, but explicitly _not_ having
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas GustafssonCygwin or any other external portability package, because we wanted to
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonkeep the prerequisites as minimal as possible.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas GustafssonIn the source tree, the Unix implementations for the OS APIs are in a
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson"unix" subdirectory of lib/isc, while the thread APIs based on POSIX
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonthreads are in lib/isc/pthreads. The Windows versions of the APIs are
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas GustafssonXXX expand this section
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas GustafssonTo build a kit for Windows NT, run util/nt-kit while in the top level
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssondirectory of the BIND9 sources. Its usage is:
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson util/nt-kit [-zip|-nozip] [remotedest [localdest]]
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonwhere "remotedest" is the path under which the sources will be
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssoncompiled on the NT machine, and "localdest" is where the munged
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonsource tree will be placed on the local machine in preparation for
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonmounting/zipping/whatever to get it to the remote machine.
e903df2f012869e36251e9a76b13a9aa228fb1acMichael GraffThe default remotedest is g:/proj/bind9-nt, because that suits my
e903df2f012869e36251e9a76b13a9aa228fb1acMichael Graffenvironment and I'm the one working on this. Use forward slashes when
e903df2f012869e36251e9a76b13a9aa228fb1acMichael Graffspecifying the remote path.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas GustafssonThe default localdest is ../bind9-nt.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas GustafssonA zip archive named "bind9-nt.zip" can be created in the parent
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssondirectory of "localdest" if the -zip flag is specified; otherwise,
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonnone is made by default.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson...XXX describe what nt-kit does
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson...XXX config.status.win32, config.h.win32
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas GustafssonThis module defines several functions that are useful for writing an
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonapplication that uses the ISC library. Bob Halley originally said,
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafsson"The main reason I wrote it was to help with the sometimes difficult
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonproblems that occur when you try to do a controlled shutdown of a
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonmultithreaded application. This scheme [using isc_app_start/
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonisc_app_run/isc_app_finish] will allow an application to use the
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonas-yet-unwritten single-threaded version of the ISC library without
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonany source code changes." XXX It has not yet been implemented for
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas GustafssonThis module provides compatibility with the pthread_cond_* functions
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonof POSIX, which can be used to synchronize threads based on a
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssoncondition variable.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas GustafssonThis module implements the directory scanning routines isc_dir_open,
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonisc_dir_read and isc_dir_close, used to iterate over the filenames in
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssona directory. XXX It also implements isc_dir_chdir to set the current
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssondirectory, but this function has not yet been written for Win32.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas GustafssonThe File module is for functions that access and/or modify operating
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonsystem information about files. XXX It has not yet been written for Win32.
a20b2c5f53a19e6b4290af09f2ccc9d8f65a6a6cBrian WellingtonThis module implements the pthreads functions flockfile, funlockfile
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonand getc_unlocked, which synchronize stdio calls from multiple
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonthreads. XXX It has not yet been written for Win32. Or for Unix
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonfor that matter. Merge into File?
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas GustafssonThis module implements the isc_interfaceiter_first, _next, _current
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonand _destroy functions to list all of the network interfaces on a
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonmachine. XXX It has not yet been written for Win32.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas GustafssonXXX It has not yet been written for Win32.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas GustafssonXXX It has not yet been written for Win32.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas GustafssonThis module ensures that a particular function, such as an
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssoninitialization routine, is only executed once, ensuring that any other
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonthreads that need to have the target function executed before they can
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonwork are blocked until the target function has completely finished.
a20b2c5f53a19e6b4290af09f2ccc9d8f65a6a6cBrian WellingtonXXX It has not yet been written for Win32.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas GustafssonThis module defines isc_stdtime_get, which stores the number of
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonseconds since 1 Jan 1970 00:00:00 UTC in an isc_stdtime_t variable.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas GustafssonThis module provides the isc_thread_create and isc_thread_join
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonfunctions, which behave like the POSIX Thread routines pthread_create
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonand pthread_join. XXX It also defines isc_thread_self to return the id of
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonthe calling thread.
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas GustafssonThis module defines several time management routines, such getting the
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssoncurrent time, adding or subtracting an interval, finding the
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssondifference between two times, or simply determining whether one time
9c49c394b4218cc9c743a372a8fcfb787f5ea8caAndreas Gustafssonis earlier than another.