windows-nt revision dafcb997e390efa4423883dafd100c975c4095d6
151N/ACopyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
151N/ACopyright (C) 1999-2001 Internet Software Consortium.
151N/ASee COPYRIGHT in the source root or http://isc.org/copyright.html for terms.
151N/A
151N/A$Id: windows-nt,v 1.8 2004/03/05 05:04:47 marka Exp $
151N/A
151N/A Windows NT Portability Notes
151N/A
151N/AOVERVIEW
151N/A
151N/AA primary goal in the overall design of BIND9 was to isolate functions
151N/Athat were specific to operating systems from those that are available
151N/Awith ANSI C. Even though development was being done on Unix-like
151N/Amachines, the main intention was that a Windows NT port could be done
151N/Awith far less hassle if the incompatible bits were encapsulated into
151N/Atheir own dedicated modules. A libisc API was designed for each
151N/Aoperating system feature that was needed, and initial implementations
151N/Aof those APIs were done for the various Unix operating systems. Some
151N/Aof the APIs have been implemented in Win32, but not yet all.
151N/A
151N/AThe target Windows NT build environment was specified as having nmake
151N/Aand the Microsoft Visual C++ 6.0 compiler, but explicitly _not_ having
151N/ACygwin or any other external portability package, because we wanted to
151N/Akeep the prerequisites as minimal as possible.
151N/A
151N/AIn the source tree, the Unix implementations for the OS APIs are in a
151N/A"unix" subdirectory of lib/isc, while the thread APIs based on POSIX
151N/Athreads are in lib/isc/pthreads. The Windows versions of the APIs are
151N/Ain lib/isc/win32.
151N/A
151N/ACOMPILING
151N/A
151N/AXXX expand this section
151N/A
151N/ATo build a kit for Windows NT, run util/nt-kit while in the top level
151N/Adirectory of the BIND9 sources. Its usage is:
151N/A util/nt-kit [-zip|-nozip] [remotedest [localdest]]
151N/Awhere "remotedest" is the path under which the sources will be
151N/Acompiled on the NT machine, and "localdest" is where the munged
151N/Asource tree will be placed on the local machine in preparation for
151N/Amounting/zipping/whatever to get it to the remote machine.
151N/A
151N/AThe default remotedest is g:/proj/bind9-nt, because that suits my
151N/Aenvironment and I'm the one working on this. Use forward slashes when
151N/Aspecifying the remote path.
151N/A
151N/AThe default localdest is ../bind9-nt.
151N/A
151N/AA zip archive named "bind9-nt.zip" can be created in the parent
151N/Adirectory of "localdest" if the -zip flag is specified; otherwise,
151N/Anone is made by default.
151N/A
151N/A...XXX describe what nt-kit does
151N/A
151N/A...XXX config.status.win32, config.h.win32
151N/A
151N/AMODULES
151N/A
151N/AApp
151N/A
151N/AThis module defines several functions that are useful for writing an
151N/Aapplication that uses the ISC library. Bob Halley originally said,
151N/A"The main reason I wrote it was to help with the sometimes difficult
151N/Aproblems that occur when you try to do a controlled shutdown of a
151N/Amultithreaded application. This scheme [using isc_app_start/
151N/Aisc_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.