windows-nt revision 816e576f77e2c46df3e3d97d65822aa8aded7c4b
6665N/ACopyright (C) 1999, 2000 Internet Software Consortium.
6665N/ASee COPYRIGHT in the source root or http://isc.org/copyright.html for terms.
6665N/A
6665N/A$Id: windows-nt,v 1.6 2000/08/09 04:37:28 tale Exp $
6665N/A
6665N/A Windows NT Portability Notes
6665N/A
6665N/AOVERVIEW
6665N/A
6665N/AA primary goal in the overall design of BIND9 was to isolate functions
6665N/Athat were specific to operating systems from those that are available
6665N/Awith ANSI C. Even though development was being done on Unix-like
6665N/Amachines, the main intention was that a Windows NT port could be done
6665N/Awith far less hassle if the incompatible bits were encapsulated into
6665N/Atheir own dedicated modules. A libisc API was designed for each
6665N/Aoperating system feature that was needed, and initial implementations
6665N/Aof those APIs were done for the various Unix operating systems. Some
6665N/Aof the APIs have been implemented in Win32, but not yet all.
6665N/A
6665N/AThe target Windows NT build environment was specified as having nmake
6665N/Aand the Microsoft Visual C++ 6.0 compiler, but explicitly _not_ having
6665N/ACygwin or any other external portability package, because we wanted to
6665N/Akeep the prerequisites as minimal as possible.
6665N/A
6665N/AIn the source tree, the Unix implementations for the OS APIs are in a
6665N/A"unix" subdirectory of lib/isc, while the thread APIs based on POSIX
6665N/Athreads are in lib/isc/pthreads. The Windows versions of the APIs are
6665N/Ain lib/isc/win32.
6665N/A
6665N/ACOMPILING
6665N/A
6665N/AXXX expand this section
6665N/A
6665N/ATo build a kit for Windows NT, run util/nt-kit while in the top level
6665N/Adirectory of the BIND9 sources. Its usage is:
6665N/A util/nt-kit [-zip|-nozip] [remotedest [localdest]]
6665N/Awhere "remotedest" is the path under which the sources will be
6665N/Acompiled on the NT machine, and "localdest" is where the munged
6665N/Asource tree will be placed on the local machine in preparation for
6665N/Amounting/zipping/whatever to get it to the remote machine.
6665N/A
6665N/AThe default remotedest is g:/proj/bind9-nt, because that suits my
6665N/Aenvironment and I'm the one working on this. Use forward slashes when
6665N/Aspecifying the remote path.
6665N/A
6665N/AThe default localdest is ../bind9-nt.
6665N/A
6665N/AA zip archive named "bind9-nt.zip" can be created in the parent
6665N/Adirectory of "localdest" if the -zip flag is specified; otherwise,
none is made by default.
...XXX describe what nt-kit does
...XXX config.status.win32, config.h.win32
MODULES
App
This module defines several functions that are useful for writing an
application that uses the ISC library. Bob Halley originally said,
"The main reason I wrote it was to help with the sometimes difficult
problems that occur when you try to do a controlled shutdown of a
multithreaded application. This scheme [using isc_app_start/
isc_app_run/isc_app_finish] will allow an application to use the
as-yet-unwritten single-threaded version of the ISC library without
any source code changes." XXX It has not yet been implemented for
Win32.
Condition
This module provides compatibility with the pthread_cond_* functions
of POSIX, which can be used to synchronize threads based on a
condition variable.
Dir
This module implements the directory scanning routines isc_dir_open,
isc_dir_read and isc_dir_close, used to iterate over the filenames in
a directory. XXX It also implements isc_dir_chdir to set the current
directory, but this function has not yet been written for Win32.
File
The File module is for functions that access and/or modify operating
system 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.