windows-nt revision 40f53fa8d9c6a4fc38c0014495e7a42b08f52481
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncCopyright (C) 1999, 2000 Internet Software Consortium.
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncSee COPYRIGHT in the source root or http://www.isc.org/copyright for terms.
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync$Id: windows-nt,v 1.5 2000/08/01 01:18:18 tale Exp $
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync Windows NT Portability Notes
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncOVERVIEW
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncA primary goal in the overall design of BIND9 was to isolate functions
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncthat were specific to operating systems from those that are available
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncwith ANSI C. Even though development was being done on Unix-like
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncmachines, the main intention was that a Windows NT port could be done
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncwith far less hassle if the incompatible bits were encapsulated into
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsynctheir own dedicated modules. A libisc API was designed for each
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncoperating system feature that was needed, and initial implementations
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncof those APIs were done for the various Unix operating systems. Some
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncof the APIs have been implemented in Win32, but not yet all.
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncThe target Windows NT build environment was specified as having nmake
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncand the Microsoft Visual C++ 6.0 compiler, but explicitly _not_ having
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncCygwin or any other external portability package, because we wanted to
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsynckeep the prerequisites as minimal as possible.
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncIn the source tree, the Unix implementations for the OS APIs are in a
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync"unix" subdirectory of lib/isc, while the thread APIs based on POSIX
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncthreads are in lib/isc/pthreads. The Windows versions of the APIs are
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncin lib/isc/win32.
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncCOMPILING
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncXXX expand this section
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncTo build a kit for Windows NT, run util/nt-kit while in the top level
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncdirectory of the BIND9 sources. Its usage is:
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync util/nt-kit [-zip|-nozip] [remotedest [localdest]]
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncwhere "remotedest" is the path under which the sources will be
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsynccompiled on the NT machine, and "localdest" is where the munged
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncsource tree will be placed on the local machine in preparation for
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncmounting/zipping/whatever to get it to the remote machine.
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncThe default remotedest is g:/proj/bind9-nt, because that suits my
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncenvironment and I'm the one working on this. Use forward slashes when
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncspecifying the remote path.
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncThe default localdest is ../bind9-nt.
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncA zip archive named "bind9-nt.zip" can be created in the parent
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncdirectory of "localdest" if the -zip flag is specified; otherwise,
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncnone is made by default.
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync...XXX describe what nt-kit does
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync...XXX config.status.win32, config.h.win32
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncMODULES
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncApp
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncThis module defines several functions that are useful for writing an
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncapplication that uses the ISC library. Bob Halley originally said,
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync"The main reason I wrote it was to help with the sometimes difficult
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncproblems that occur when you try to do a controlled shutdown of a
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncmultithreaded application. This scheme [using isc_app_start/
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncisc_app_run/isc_app_finish] will allow an application to use the
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncas-yet-unwritten single-threaded version of the ISC library without
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncany source code changes." XXX It has not yet been implemented for
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncWin32.
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncCondition
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncThis module provides compatibility with the pthread_cond_* functions
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncof POSIX, which can be used to synchronize threads based on a
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsynccondition variable.
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncDir
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncThis module implements the directory scanning routines isc_dir_open,
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncisc_dir_read and isc_dir_close, used to iterate over the filenames in
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsynca directory. XXX It also implements isc_dir_chdir to set the current
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncdirectory, but this function has not yet been written for Win32.
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncFile
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsync
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncThe File module is for functions that access and/or modify operating
a2760a4d593af57a19ec32cdfd1723b68495df8cvboxsyncsystem information about files. XXX It has not yet been written for Win32.
Filelock
This module implements the pthreads functions flockfile, funlockfile
and getc_unlocked, which synchronize stdio calls from multiple
threads. XXX It has not yet been written for Win32. Or for Unix
for that matter. Merge into File?
Interfaceiter
This module implements the isc_interfaceiter_first, _next, _current
and _destroy functions to list all of the network interfaces on a
machine. XXX It has not yet been written for Win32.
Ipv6
XXX It has not yet been written for Win32.
Net
XXX It has not yet been written for Win32.
Once
This 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.