Changeset 61
- Timestamp:
- 12/09/02 17:24:17 (10 years ago)
- Location:
- trunk/pdns
- Files:
-
- 2 removed
- 25 modified
-
acconfig.h (deleted)
-
configure.in (modified) (6 diffs)
-
modules/gmysqlbackend/Makefile.in (modified) (2 diffs)
-
modules/mysqlbackend/Makefile.am (modified) (1 diff)
-
modules/pdnsbackend/Makefile.am (modified) (1 diff)
-
modules/pdnsbackend/pdnsbackend.cc (modified) (3 diffs)
-
modules/pdnsbackend/pdnsbackend.hh (modified) (2 diffs)
-
modules/pipebackend/Makefile.am (modified) (1 diff)
-
modules/pipebackend/coprocess.hh (modified) (1 diff)
-
modules/pipebackend/pipebackend.cc (modified) (3 diffs)
-
pdns/Makefile.am (modified) (2 diffs)
-
pdns/backends/bind/Makefile.am (modified) (1 diff)
-
pdns/backends/bind/bindbackend.cc (modified) (2 diffs)
-
pdns/communicator.hh (modified) (1 diff)
-
pdns/distributor.hh (modified) (1 diff)
-
pdns/dnspacket.cc (modified) (3 diffs)
-
pdns/dnspacket.hh (modified) (4 diffs)
-
pdns/dnsproxy.hh (modified) (1 diff)
-
pdns/docs/pdns.sgml (modified) (2 diffs)
-
pdns/extra (deleted)
-
pdns/misc.cc (modified) (3 diffs)
-
pdns/nameserver.cc (modified) (3 diffs)
-
pdns/pdns.in (modified) (2 diffs)
-
pdns/tcpreceiver.cc (modified) (1 diff)
-
pdns/unix_utility.cc (modified) (3 diffs)
-
pdns/utility.hh (modified) (1 diff)
-
pdns/ws.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pdns/configure.in
r57 r61 4 4 AC_CANONICAL_HOST 5 5 AM_CONFIG_HEADER(config.h) 6 CXXFLAGS="-Wall -pthread -O2" 6 AC_C_BIGENDIAN 7 AC_PREREQ(2.52) 8 CXXFLAGS="$CXXFLAGS -Wall" 7 9 8 10 AC_PREFIX_DEFAULT(/usr/local) … … 26 28 27 29 dnl Checks for library functions. 28 AC_FUNC_SETVBUF_REVERSED29 30 AC_TYPE_SIGNAL 30 AC_FUNC_STRFTIME31 31 AC_CHECK_FUNCS(gethostname gettimeofday mkdir mktime select socket strerror) 32 33 AC_CHECK_LIB(resolv, inet_ntop) 34 35 dnl AC_MSG_NOTICE([Looking in libraries: $LIBS]) 36 37 AC_CHECK_FUNCS(inet_ntop, , AC_LIBOBJ(lib/inet_ntop)) 38 AC_CHECK_FUNCS(inet_pton, , AC_LIBOBJ(lib/inet_pton)) 32 39 33 40 … … 90 97 case "$host_os" in 91 98 solaris2*) 92 AC_DEFINE(NEED_POSIX_TYPEDEF) 99 AC_DEFINE(NEED_POSIX_TYPEDEF,,[If POSIX typedefs need to be defined]) 100 AC_DEFINE(NEED_INET_NTOP_PROTO,,[If your OS is so broken that it needs an additional prototype]) 101 LIBS="-lposix4 -lnsl -lsocket -lpthread $LIBS" 102 CXXFLAGS="-D_REENTRANT $CXXFLAGS" 103 ;; 104 linux*) 105 AC_DEFINE(HAVE_IPV6,1,[If the host operating system understands IPv6]) 106 LDFLAGS="-pthread $LDFLAGS" 107 CXXFLAGS="-pthread -D_GNU_SOURCE $CXXFLAGS" 93 108 ;; 94 109 *) 110 AC_DEFINE(HAVE_IPV6,1,[If the host operating system understands IPv6]) 111 LDFLAGS="-pthread $LDFLAGS" 112 CXXFLAGS="-pthread $CXXFLAGS" 95 113 ;; 96 114 esac … … 100 118 [ --enable-verbose-logging Do verbose logging],enable_verbose_logging=yes ,enable_verbose_logging=no) 101 119 102 if test $enable_verbose_logging = yes; then AC_DEFINE(VERBOSELOG, 1 )120 if test $enable_verbose_logging = yes; then AC_DEFINE(VERBOSELOG, 1, [If verbose logging should be enabled]) 103 121 fi 104 122 AC_MSG_RESULT($enable_verbose_logging) … … 246 264 PGSQL_inc_check="$withval/include/pgsql"], 247 265 [PGSQL_lib_check="/usr/local/pgsql/lib/pgsql /usr/local/lib/pgsql /opt/pgsql/lib/pgsql /usr/lib/pgsql /usr/local/pgsql/lib /usr/local/lib /opt/pgsql/lib /usr/lib" 248 PGSQL_inc_check="/usr/local/pgsql/include/pgsql /usr/local/include/p gsql/opt/pgsql/include/pgsql /opt/pgsql/include /usr/include/postgresql"])266 PGSQL_inc_check="/usr/local/pgsql/include/pgsql /usr/local/include/postgresql/ /usr/local/include /opt/pgsql/include/pgsql /opt/pgsql/include /usr/include/postgresql"]) 249 267 AC_ARG_WITH(pgsql-lib, 250 268 [ --with-pgsql-lib=<path> directory path of PgSQL library installation], … … 284 302 done 285 303 if test -z "$PGSQL_incdir"; then 286 AC_MSG_ERROR([Didn't find the mysqlinclude dir in '$PGSQL_inc_check'])304 AC_MSG_ERROR([Didn't find the PgSQL include dir in '$PGSQL_inc_check']) 287 305 fi 288 306 case "$PGSQL_incdir" in -
trunk/pdns/modules/gmysqlbackend/Makefile.in
r60 r61 16 16 PGSQL_LIBS = -Wl,-Bstatic -lpq++ -lpq -Wl,-Bdynamic -lssl -lcrypt -lcrypto 17 17 18 CXXFLAGS:=-I$(PDNS_HOME) $(CXXFLAGS) 18 INCLUDES=-I$(PDNS_HOME) -I../.. 19 19 20 20 dopgsql=@dopgsql@ … … 71 71 72 72 deps: 73 -g++ -MM -g -c $(CXXFLAGS) $(CPPFLAGS) gmysqlbackend.cc smysql.cc > deps73 -g++ -MM -g -c $(CXXFLAGS) $(CPPFLAGS) $(INCLUDES) gmysqlbackend.cc smysql.cc > deps 74 74 75 75 -include deps 76 76 77 77 .cc.o: 78 g++ -MD -g -c $(CXXFLAGS) $(CPPFLAGS) $ <78 g++ -MD -g -c $(CXXFLAGS) $(CPPFLAGS) $(INCLUDES) $< 79 79 80 80 -
trunk/pdns/modules/mysqlbackend/Makefile.am
r18 r61 1 CXXFLAGS:=-I@MYSQL_incdir@ $(CXXFLAGS)1 INCLUDES=-I@MYSQL_incdir@ 2 2 lib_LTLIBRARIES = libmysqlbackend.la 3 3 EXTRA_DIST=OBJECTFILES OBJECTLIBS -
trunk/pdns/modules/pdnsbackend/Makefile.am
r14 r61 1 INCLUDES=-I@MYSQL_incdir@ 1 2 lib_LTLIBRARIES = libpdnsbackend.la 2 3 EXTRA_DIST=OBJECTFILES OBJECTLIBS -
trunk/pdns/modules/pdnsbackend/pdnsbackend.cc
r13 r61 1 // $Id: pdnsbackend.cc,v 1. 2 2002/11/28 12:30:45ahu Exp $1 // $Id: pdnsbackend.cc,v 1.3 2002/12/09 16:24:17 ahu Exp $ 2 2 3 3 #include <string> … … 249 249 250 250 //! Magic class that is activated when the dynamic library is loaded 251 class Loader251 class PdnsBeLoader 252 252 { 253 253 public: 254 254 255 Loader()255 PdnsBeLoader() 256 256 { 257 257 BackendMakers().report(new PDNSFactory); … … 260 260 }; 261 261 262 static Loaderloader;262 static PdnsBeLoader pdnsbeloader; -
trunk/pdns/modules/pdnsbackend/pdnsbackend.hh
r13 r61 1 // $Id: pdnsbackend.hh,v 1. 2 2002/11/28 12:30:45ahu Exp $1 // $Id: pdnsbackend.hh,v 1.3 2002/12/09 16:24:17 ahu Exp $ 2 2 3 3 #ifndef PDNSBACKEND_HH … … 9 9 using namespace std; 10 10 11 #include <mysql /mysql.h>11 #include <mysql.h> 12 12 13 13 class PdnsBackend : public DNSBackend -
trunk/pdns/modules/pipebackend/Makefile.am
r57 r61 4 4 #endif 5 5 6 EXTRA_DIST=OBJECTFILES OBJECTLIBS 6 7 lib_LTLIBRARIES = libpipebackend.la 7 8 -
trunk/pdns/modules/pipebackend/coprocess.hh
r57 r61 4 4 #include <iostream> 5 5 #include <stdio.h> 6 #include <string> 6 7 7 8 using namespace std; -
trunk/pdns/modules/pipebackend/pipebackend.cc
r57 r61 1 1 // -*- sateh-c -*- 2 2 // File : pdnsbackend.cc 3 // Version : $Id: pipebackend.cc,v 1. 2 2002/12/06 09:58:03ahu Exp $3 // Version : $Id: pipebackend.cc,v 1.3 2002/12/09 16:24:17 ahu Exp $ 4 4 // 5 5 … … 224 224 }; 225 225 226 class Loader226 class PipeLoader 227 227 { 228 228 public: 229 Loader()229 PipeLoader() 230 230 { 231 231 BackendMakers().report(new PipeFactory); … … 235 235 }; 236 236 237 static Loaderloader;238 237 static PipeLoader pipeloader; 238 -
trunk/pdns/pdns/Makefile.am
r57 r61 1 AM_CXXFLAGS=-D _GNU_SOURCE -DSYSCONFDIR=\"@sysconfdir@\" -DBINDIR=\"@bindir@\" -DLOCALSTATEDIR=\"@socketdir@\" -Ibackends/bind1 AM_CXXFLAGS=-DSYSCONFDIR=\"@sysconfdir@\" -DBINDIR=\"@bindir@\" -DLOCALSTATEDIR=\"@socketdir@\" -Ibackends/bind 2 2 AM_CPPFLAGS=-Ibackends/bind 3 3 4 4 EXTRA_DIST = codedocs/Makefile codedocs/doxygen.conf docs/Makefile \ 5 5 docs/gslb-operations.sgml docs/powerdns-case.sgml docs/powerdns-install.sgml \ 6 docs/powerdns-overview.sgml docs/powerdns-technical.sgml extra/Makefile\7 extra/null.cpdns.spec release-scripts/ docs/pdns.sgml \6 docs/powerdns-overview.sgml docs/powerdns-technical.sgml \ 7 pdns.spec release-scripts/ docs/pdns.sgml \ 8 8 choosepaths mtasker.cc 9 9 … … 49 49 # binpatch_SOURCES=binpatch.cc 50 50 51 SUBDIRS= codedocs backends extra.51 SUBDIRS= codedocs backends . 52 52 -
trunk/pdns/pdns/backends/bind/Makefile.am
r13 r61 1 AM_CXXFLAGS=-D_GNU_SOURCE-I../..1 INCLUDES=-I../.. 2 2 lib_LTLIBRARIES = libbindbackend.la 3 3 -
trunk/pdns/pdns/backends/bind/bindbackend.cc
r2 r61 17 17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 18 */ 19 // $Id: bindbackend.cc,v 1. 1 2002/11/27 15:18:37 ahu Exp $19 // $Id: bindbackend.cc,v 1.2 2002/12/09 16:24:17 ahu Exp $ 20 20 #include <errno.h> 21 21 #include <string> … … 541 541 542 542 //! Magic class that is activated when the dynamic library is loaded 543 class Loader543 class BindLoader 544 544 { 545 545 public: 546 Loader()546 BindLoader() 547 547 { 548 548 BackendMakers().report(new BindFactory); 549 theL()<<Logger::Notice<<"[BindBackend] This is the bind backend version "VERSION" ("__DATE__", "__TIME__") reporting"<<endl;549 L<<Logger::Notice<<"[BindBackend] This is the bind backend version "VERSION" ("__DATE__", "__TIME__") reporting"<<endl; 550 550 } 551 551 }; 552 static Loaderloader;552 static BindLoader bindloader; -
trunk/pdns/pdns/communicator.hh
r2 r61 158 158 void masterUpdateCheck(PacketHandler *P); 159 159 pthread_mutex_t d_lock; 160 queue<SuckRequest> d_suckdomains;160 std::queue<SuckRequest> d_suckdomains; 161 161 Semaphore d_suck_sem; 162 162 Semaphore d_any_sem; -
trunk/pdns/pdns/distributor.hh
r2 r61 100 100 101 101 private: 102 queue<QuestionData> questions;102 std::queue<QuestionData> questions; 103 103 pthread_mutex_t q_lock; 104 104 -
trunk/pdns/pdns/dnspacket.cc
r29 r61 17 17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 18 */ 19 // $Id: dnspacket.cc,v 1. 2 2002/11/29 22:02:33ahu Exp $19 // $Id: dnspacket.cc,v 1.3 2002/12/09 16:24:17 ahu Exp $ 20 20 #include "utility.hh" 21 21 #include <cstdio> … … 274 274 unsigned char addr[16]; 275 275 276 #ifdef HAVE_IPV6 276 277 if( Utility::inet_pton( AF_INET6, rr.content.c_str(), static_cast< void * >( addr ))) 277 278 addAAAARecord(rr.qname, addr, rr.ttl); 278 279 else 280 #endif 279 281 L<<Logger::Error<<"Unable to convert IPv6 TEXT '"<<rr.content<<"' into binary for record '"<<rr.qname<<"': " 280 282 <<endl; … … 1259 1261 throw AhuException("Wrong length AAAA record returned from remote"); 1260 1262 char tmp[128]; 1261 1263 #ifdef AF_INET6 1262 1264 if(!Utility::inet_ntop(AF_INET6, datapos, tmp, sizeof(tmp)-1)) 1265 #endif 1263 1266 throw AhuException("Unable to translate record of type AAAA in resolver"); 1264 1267 -
trunk/pdns/pdns/dnspacket.hh
r57 r61 17 17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 18 */ 19 // $Id: dnspacket.hh,v 1. 3 2002/12/06 09:58:03ahu Exp $19 // $Id: dnspacket.hh,v 1.4 2002/12/09 16:24:17 ahu Exp $ 20 20 #ifndef DNSPACKET_HH 21 21 #define DNSPACKET_HH … … 48 48 #ifdef HAVE_CONFIG_H 49 49 #include "config.h" 50 #endif // HAVE_CONFIG_H 51 52 53 54 #ifdef NEED_POSIX_TYPEDEF 55 typedef unsigned short int u_int16_t; 56 typedef unsigned int u_int32_t; 57 #endif 50 #endif // HAVE_CONFIG_H 51 58 52 59 53 #ifdef WIN32 … … 81 75 { 82 76 unsigned int id:16; //!< id of this query/response 83 #if BYTE_ORDER == BIG_ENDIAN77 #ifdef WORDS_BIGENDIAN // ultrasparc 84 78 unsigned int qr:1; //!< 1 if this is a query, 0 if response 85 79 unsigned int opcode:4; //!< the opcode … … 302 296 } 303 297 304 305 const char *p=(stringbuffer.c_str()+12+offset); 306 const unsigned short int *i=(const unsigned short int *)p; 307 qtype=ntohs(*i++); 308 qclass=ntohs(*i); 309 310 298 qtype=stringbuffer[12+offset]*256+stringbuffer[13+offset]; 299 qclass=stringbuffer[14+offset]*256+stringbuffer[15+offset]; 311 300 return 0; 312 301 } -
trunk/pdns/pdns/dnsproxy.hh
r57 r61 77 77 { 78 78 u_int16_t id; 79 struct sockaddr_in6 remote;79 char remote[28]; 80 80 Utility::socklen_t addrlen; 81 81 int outsock; -
trunk/pdns/pdns/docs/pdns.sgml
r15 r61 16 16 </author> 17 17 18 <PubDate>v2.1 $Date: 2002/1 1/28 14:38:00$</PubDate>18 <PubDate>v2.1 $Date: 2002/12/09 16:24:17 $</PubDate> 19 19 20 20 <Abstract> … … 6544 6544 <appendix id="compiling-powerdns"><title>Compiling PowerDNS</title> 6545 6545 <para> 6546 The PowerDNS source is separated from many of its modules. The main PowerDNS source tree however is able6547 to pull in certain files for creating packaged releases.6546 For now, see <ulink url="http://www.powerdns.org">the Open Source PowerDNS site</ulink>. 6547 <command>./configure --enable-mysql ; make ; make install</command> will do The Right Thing for most people. 6548 6548 </para> 6549 <para> 6550 First download the source or retrieve from anoncvs.powerdns.com (module 'powerdns'). If from cvs, you need to execute 6551 <filename>./bootstrap</filename> to have the GNU autotools build the configure script and the Makefiles. 6552 </para> 6553 <para> 6554 The run ./configure, followed by 'make'. PowerDNS prefers being compiled with GCC 3.2 but 2.95.4 and 3.0.4 will also work on most systems. 6555 It will not compile on Debian Potato because that lacks the <filename>sstream</filename> include file. 6556 </para> 6557 <para> 6558 After compiling, the <filename>./installer</filename> script can be used to install. 6559 </para> 6560 <sect1><title>Configuring external modules with PowerDNS</title> 6561 <para> 6562 A module needs to see the PowerDNS sources. See the INSTALL file of a module on how to configure this. 6563 </para> 6549 <sect1 id="on-windows"><title>Compiling PowerDNS on Windows</title> 6550 <para> 6551 By Michael Stol (<email>michael@physos.info</email>). 6552 <sect2><title>Assumptions</title> 6553 <para> 6554 I will assume these things from you: 6555 </para> 6556 <variablelist> 6557 <varlistentry> 6558 <term> 6559 You have the PowerDNS sources. 6560 </term> 6561 <listitem> 6562 <para> 6563 There's not much to compile without the source files, eh? :) 6564 </para> 6565 </listitem> 6566 </varlistentry> 6567 6568 <varlistentry> 6569 <term> 6570 You are using Microsoft Visual C++. If you get it to compile using a free compiler, please let us know! 6571 </term> 6572 <listitem> 6573 <para> 6574 From the day that we began porting the <acronym>UNIX</acronym> PowerDNS sources to Microsoft Windows 6575 we used Microsoft Visual C++ as our development environment of choice. 6576 </para> 6577 6578 <para> 6579 We used Visual C++ 6.0 to compile all sources (both standard version and SP5). Other versions 6580 (including Visual C++ .NET) are untested. 6581 </para> 6582 </listitem> 6583 </varlistentry> 6584 6585 <varlistentry> 6586 <term> 6587 You are using Microsoft Windows NT, 2000 or XP 6588 </term> 6589 <listitem> 6590 <para> 6591 I will assume that the system where you want to compile the sources on is running 6592 Microsoft Windows NT, 2000 or XP. These are the operating systems that where found 6593 running PowerDNS for Windows. 6594 6595 </para> 6596 6597 <note> 6598 <para> 6599 You probably can compile the sources on other Windows versions too, but that is currently untested. 6600 </para> 6601 </note> 6602 </listitem> 6603 </varlistentry> 6604 6605 <varlistentry> 6606 <term> 6607 You are using an English Windows version. 6608 </term> 6609 <listitem> 6610 <para> 6611 Troughout this document I will use the English names for menu items, names etc., so if you are 6612 running a non-English Windows or <acronym>MSVC</acronym> version you have to translate those things yourself. But 6613 I don't think that would be a big problem. 6614 </para> 6615 </listitem> 6616 </varlistentry> 6617 6618 </variablelist> 6619 6620 </sect2> 6621 6622 <sect2> 6623 <title>Prequisites</title> 6624 6625 <para> 6626 Although we tried to keep PowerDNS for Windows' dependencies down to a minimum, you will still need some 6627 programs and libraries to be able to compile the sources. 6628 </para> 6629 6630 <sect3> 6631 <title>pthreads for Windows</title> 6632 6633 <para> 6634 The pthreads for Windows library is a Windows implementation of the <acronym>POSIX</acronym> threads 6635 specification, which is used a lot in <acronym>UNIX</acronym> programs. 6636 </para> 6637 6638 <para> 6639 PowerDNS uses pthreads too, and to ease the porting process we decided not to reinvent the wheel, 6640 but to use pthreads for Windows instead. 6641 </para> 6642 6643 <sect4> 6644 <title>Getting pthreads for Windows</title> 6645 6646 <para> 6647 Pthreads for Windows is available from anonymous ftp at <ulink url="ftp://sources.redhat.com/pub/pthreads-win32/">ftp://sources.redhat.com/pub/pthreads-win32/</ulink>. 6648 You should download the latest <filename>pthreads-YYYY-MM-DD.exe</filename> file. 6649 </para> 6650 6651 <note> 6652 <para> 6653 PowerDNS for Windows was tested with the snapshot of 2002-03-02 of the library. 6654 </para> 6655 </note> 6656 6657 <para> 6658 For more information you can visit the pthreads for Windows homepage at <ulink url="http://sources.redhat.com/pthreads-win32/">http://sources.redhat.com/pthreads-win32/</ulink> 6659 </para> 6660 </sect4> 6661 6662 <sect3> 6663 <title>Installing pthreads for Windows</title> 6664 6665 <para> 6666 To install the pthreads for Windows library you have to locate your <filename>pthreads-YYYY-MM-DD.exe</filename> 6667 file and start it. 6668 </para> 6669 6670 <para> 6671 After starting the executable a self-extractor dialog will show up where you can specify where to extract 6672 the contents of the file. When you selected a location you can press the <guibutton>Extract</guibutton> button 6673 to extract all content to the target directory. 6674 </para> 6675 6676 <para> 6677 The library is now installed, we still have to tell Visual C++ where it's located though, more 6678 on that later. 6679 </para> 6680 </sect3> 6681 6682 </sect2> 6683 6684 <sect2> 6685 <title>Nullsoft Installer</title> 6686 6687 <para> 6688 For our installation program we used Nullsoft's Installer System (<acronym>NSIS</acronym>). We used 6689 <acronym>NSIS</acronym> because it's easy to use, versatile and free (and it uses <acronym><trademark>SuperPiMP</trademark></acronym> technology, but 6690 they refuse to tell us what it is ;)). If the name Nullsoft rings a bell, it's because they're the guys who made 6691 <ulink url="http://www.winamp.com/">winamp</ulink>. 6692 </para> 6693 6694 <sect3> 6695 <title>Getting the Nullsoft Installer</title> 6696 6697 <para> 6698 The Nullsoft Installer can be downloaded at their website, which is 6699 located at <ulink url="http://www.nullsoft.com/free/nsis/">http://www.nullsoft.com/free/nsis/</ulink>. 6700 The file that you should download is called <filename>nsisXXX.exe</filename> (where XXX is the latest version). 6701 </para> 6702 6703 <note> 6704 <para> 6705 You can find the <acronym>NSIS</acronym> documentation at that website too. 6706 </para> 6707 </note> 6708 </sect3> 6709 6710 <sect3> 6711 <title> Installing the Nullsoft Installer</title> 6712 6713 <para> 6714 Installing <acronym>NSIS</acronym> is easy. All there is to it is locating the installer and execute it. 6715 Then just follow the installation steps. 6716 </para> 6717 </sect3> 6718 6719 </sect2> 6720 6721 <sect2> 6722 <title>Setting up the build-environment</title> 6723 6724 <para> 6725 Before starting Microsoft Visual C++ and compile PowerDNS for Windows, you first 6726 have to set up your build environment. 6727 </para> 6728 6729 <sect3> 6730 <title>Make Microsoft Visual C++ recognize <filename>*.cc</filename> and <filename>*.hh</filename> (optional)</title> 6731 6732 <para> 6733 All PowerDNS source files are in the form <filename>name.cc</filename>, and all header files in the form 6734 <filename>name.hh</filename>. These extensions aren't recognized by <acronym>MSVC</acronym> by default, so 6735 you might want to change that first. 6736 </para> 6737 6738 <note> 6739 <para> 6740 Only perform this step if you want to be able to edit the <filename>*.cc</filename> 6741 and <filename>*.hh</filename> files in <acronym>MSVC</acronym>. 6742 </para> 6743 </note> 6744 6745 <caution> 6746 <para> 6747 If you decide to perform this step, remember that it requires modification of the Windows registry, 6748 always make a backup before modifying! 6749 </para> 6750 </caution> 6751 6752 <para> 6753 Ok, after that word of caution we can now proceed. You have to follow these steps: 6754 </para> 6755 6756 <orderedlist> 6757 6758 <listitem> 6759 <para> 6760 Start the registry editor by entering <filename>regedit.exe</filename> in the run prompt 6761 (<guimenu>Start->Run...</guimenu>). 6762 </para> 6763 </listitem> 6764 6765 <listitem> 6766 <para> 6767 Right click on <filename>HKEY_CLASSES_ROOT</filename> and select <guimenu>New->Key</guimenu>. 6768 A new key will appear, change that key to <quote><filename>.cc</filename></quote>, then change the default 6769 value to <quote>cppfile</quote> 6770 </para> 6771 6772 <para> 6773 Then perform the same step for <quote><filename>.hh</filename></quote> (use <quote>hfile</quote> instead of <quote>cppfile</quote>). 6774 </para> 6775 </listitem> 6776 6777 <listitem> 6778 <para> 6779 Go to <filename>HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Build System\Components\Platforms\Win32 (x86)\Tools\32-bit C/C++ Compiler for 80x86</filename>. And 6780 add <quote>;*.cc</quote> to the <filename>Input_Spec</filename> value (so that it becomes <quote>*.c;*.cpp;*.cxx;*.cc</quote>). 6781 </para> 6782 6783 <note> 6784 <para> 6785 If you happen to use another platform (like alpha) to compile the sources, you have to do the step above for that platform. 6786 </para> 6787 </note> 6788 </listitem> 6789 6790 <listitem> 6791 <para> 6792 Go to <filename>HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Search</filename>. And 6793 add <quote>;*.cc;*.hh</quote> to the <filename>FIF_Filter</filename> value (so that it becomes <quote>*.c;*.cpp;*.cxx;*.tli;*.h;*.tlh;*.inl;*.rc;*.cc;*.hh</quote>). 6794 </para> 6795 </listitem> 6796 6797 <listitem> 6798 <para> 6799 Finally change <filename>HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Text Editor\Tabs/Language Settings\C/C++</filename>. And 6800 add <quote>;cc;hh</quote> to the <filename>FileExtensions</filename> value (so that it becomes <quote>cpp;cxx;c;h;hxx;hpp;inl;tlh;tli;rc;rc2;hh;cc</quote>). 6801 </para> 6802 </listitem> 6803 6804 <listitem> 6805 <para> 6806 Close the registry editor. 6807 </para> 6808 </listitem> 6809 6810 </orderedlist> 6811 6812 <para> 6813 Now should <acronym>MSVC</acronym> properly recognize the files as being C++. 6814 </para> 6815 6816 </sect3> 6817 6818 <sect3> 6819 <title>Setting Microsoft Visual C++'s directories</title> 6820 6821 <para> 6822 <acronym>MSVC</acronym> needs to locate some include files, libraries and executables 6823 when it has to build PowerDNS for Windows. We are now going to tell <acronym>MSVC</acronym> where 6824 to find those. 6825 </para> 6826 6827 <para> 6828 To enter the directory dialog you have to go to <guimenu>Tools->Options...->Directories</guimenu>. 6829 </para> 6830 6831 <sect4> 6832 <title>Setting the pthreads directories</title> 6833 6834 <para> 6835 When you are in the directory dialog you can add the pthreads for Windows directory. 6836 </para> 6837 6838 <para> 6839 First add the include directory, to do this you have to select <guilabel>Include files</guilabel> 6840 from the <guilabel>Show directories for:</guilabel> combobox. Then press the <guibutton>New</guibutton> 6841 button and browse to the <emphasis>include</emphasis> directory of pthreads (ie. <filename>C:\pthreads\include</filename>). 6842 </para> 6843 6844 <para> 6845 Then switch to <guilabel>Library files</guilabel> and add the <emphasis>library</emphasis> directory 6846 (ie. <filename>C:\pthreads\lib</filename>) using the same method as above. 6847 </para> 6848 </sect4> 6849 6850 <sect4> 6851 <title>Setting the Nullsoft Installer directory</title> 6852 6853 <para> 6854 While still being in the directory dialog, switch to <guilabel>Executable files</guilabel> 6855 and add the Nullsoft Installer directory (ie. <filename>C:\Program Files\NSIS</filename>) to the list. 6856 </para> 6857 </sect4> 6858 6859 6860 </sect3> 6861 </sect2> 6862 6863 <sect2> 6864 <title>Compilation</title> 6865 6866 <para> 6867 Finally, after all the reading, installing and configuring we are ready to start compiling 6868 PowerDNS for Windows. 6869 </para> 6870 6871 <sect3> 6872 <title>Starting the compilation</title> 6873 6874 <para> 6875 To start the compilation you first have to open the PowerDNS workspace (<filename>powerdns.dsw</filename>) using explorer or 6876 from the <guimenu>File->Open Workspace...</guimenu> menu in <acronym>MSVC</acronym>. 6877 </para> 6878 6879 <para> 6880 After you opened the workspace you can start compiling. Check all the checkboxes in the 6881 <guimenu>Build->Batch Build...</guimenu> menu and press the <guibutton>Build</guibutton> button. 6882 </para> 6883 6884 <para> 6885 Now cross your fingers and go make some coffee or tea while compiling PowerDNS for Windows. :) 6886 </para> 6887 6888 </sect3> 6889 6890 <sect3> 6891 <title>Yay! It compiled</title> 6892 6893 <para> 6894 Congratulations, you have now compiled PowerDNS for Windows! 6895 </para> 6896 6897 <para> 6898 All the release builds of the binaries are in the <filename>Release</filename> directory (including the 6899 generated installer). The debug builds are in the, guess what, <filename>Debug</filename> directory. 6900 </para> 6901 6902 <para> 6903 Now you can start installing PowerDNS, but that's beyond the scope of this document. See 6904 the <ulink url="http://downloads.powerdns.com/documentation/html/">online documentation</ulink> for 6905 more information about that. 6906 </para> 6907 </sect3> 6908 6909 <sect3> 6910 <title>What if it went wrong?</title> 6911 6912 <para> 6913 If the compilation fails, then try reading this article again, and again to see if you did something wrong. 6914 </para> 6915 6916 <para> 6917 If you are pretty sure that it's a bug, either in the PowerDNS sources, the build 6918 system or in this article, then please send an e-mail to <email>powerdns-dev@mailman.powerdns.com</email> describing your 6919 problem. We will then try to fix it. 6920 </para> 6921 6922 </sect3> 6923 6924 </sect2> 6925 6926 <sect2> 6927 <title>Miscellaneous</title> 6928 6929 <para> 6930 Some miscellaneous information. 6931 </para> 6932 6933 <sect3> 6934 <title>Credits</title> 6935 6936 <variablelist> 6937 <title>Michel Stol would like to thank these people:</title> 6938 6939 <varlistentry> 6940 <term> 6941 Bert Hubert 6942 </term> 6943 <listitem> 6944 <para> 6945 For writing the wonderfull PowerDNS software and learning me stuff 6946 that I'd otherwise never had learned. 6947 </para> 6948 </listitem> 6949 </varlistentry> 6950 6951 <varlistentry> 6952 <term> 6953 PowerDNS B.V. 6954 </term> 6955 <listitem> 6956 <para> 6957 For being great colleagues. 6958 </para> 6959 </listitem> 6960 </varlistentry> 6961 6962 <varlistentry> 6963 <term> 6964 The pthreads-win32 crew (see the pthreads-win32 <filename>CONTRIBUTORS</filename> file). 6965 </term> 6966 <listitem> 6967 <para> 6968 For easing our porting process by writing a great Windows implementation of pthreads. 6969 </para> 6970 </listitem> 6971 </varlistentry> 6972 6973 <varlistentry> 6974 <term> 6975 The guys over at Nullsoft. 6976 </term> 6977 <listitem> 6978 <para> 6979 For creating the Nullsoft Installer System (<acronym>NSIS</acronym>), and Winamp, the program we use every 6980 day to make a lot of noise in the office. 6981 </para> 6982 </listitem> 6983 </varlistentry> 6984 6985 </variablelist> 6986 6987 </sect3> 6988 6989 <sect3> 6990 <title>Contact information</title> 6991 6992 <para> 6993 If you have a comment, or a bug report concerning either this document or the PowerDNS sources 6994 you can contact <email>powerdns-dev@mailman.powerdns.com</email> 6995 </para> 6996 6997 <para> 6998 For general information about PowerDNS, the pdns server, express, documentation etc. I advice you to visit 6999 <ulink url="http://www.powerdns.com/">http://www.powerdns.com/</ulink> 7000 </para> 7001 7002 <para> 7003 If you are interested in buying PowerDNS you can send a mail to <email>sales@powerdns.com</email> 7004 or you can visit the PowerDNS website at <ulink url="http://www.powerdns.com/pdns/">http://www.powerdns.com/pdns/</ulink> 7005 </para> 7006 7007 <para> 7008 If you want to praise my work, ask me to marry you, deposit $1.000.000 on my bank account or flame me to death, then 7009 you can mail me at <email>michel@physos.info</email> :) 7010 </para> 7011 7012 </sect3> 7013 7014 <sect3> 7015 <title>Legal information</title> 7016 7017 <para> 7018 Microsoft, Visual C++, Windows, Windows NT, Windows 2000, Windows XP and Win32 are 7019 either registered trademarks or trademarks of Microsoft Corporation in the U.S.A. and/or other countries. 7020 </para> 7021 7022 <para> 7023 Other product and company names mentioned herein may be the trademarks of their respective owners. 7024 </para> 7025 7026 </sect3> 7027 7028 </sect2> 6564 7029 </sect1> 7030 6565 7031 </book> -
trunk/pdns/pdns/misc.cc
r57 r61 29 29 #include <stdlib.h> 30 30 #include <stdio.h> 31 #include <netdb.h> 31 32 32 33 #ifndef WIN32 … … 239 240 if(socklen==sizeof(struct sockaddr_in)) 240 241 return inet_ntoa(((struct sockaddr_in *)remote)->sin_addr); 241 242 // TODO: Add ipv6 support here. 242 #ifdef HAVE_IPV6 243 243 else { 244 244 char tmp[128]; … … 249 249 return tmp; 250 250 } 251 #endif 251 252 252 253 return "untranslateable"; -
trunk/pdns/pdns/nameserver.cc
r2 r61 1 1 /* 2 PowerDNS Versatile Database Driven Nameserver3 2 Copyright (C) 2002 PowerDNS.COM BV 4 3 … … 17 16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 17 */ 19 /* 20 Copyright (C) 2002 PowerDNS.COM BV 21 22 This program is free software; you can redistribute it and/or modify 23 it under the terms of the GNU General Public License as published by 24 the Free Software Foundation; either version 2 of the License, or 25 (at your option) any later version. 26 27 This program is distributed in the hope that it will be useful, 28 but WITHOUT ANY WARRANTY; without even the implied warranty of 29 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 30 GNU General Public License for more details. 31 32 You should have received a copy of the GNU General Public License 33 along with this program; if not, write to the Free Software 34 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 35 */ 36 // $Id: nameserver.cc,v 1.1 2002/11/27 15:18:31 ahu Exp $ 18 // $Id: nameserver.cc,v 1.2 2002/12/09 16:24:17 ahu Exp $ 37 19 #include "utility.hh" 38 20 #include <cstdio> … … 156 138 void UDPNameserver::bindIPv6() 157 139 { 158 // TODO: Add Windows ipv6 support. 159 #ifndef WIN32 140 #if !WIN32 && HAVE_IPV6 160 141 vector<string>locals; 161 142 stringtok(locals,arg()["local-ipv6"]," ,"); -
trunk/pdns/pdns/pdns.in
r45 r61 6 6 exec_prefix=@exec_prefix@ 7 7 BINARYPATH=@bindir@ 8 SBINARYPATH=@sbindir@ 8 9 SOCKETPATH=@socketdir@ 9 10 … … 18 19 fi 19 20 20 pdns_server="$ BINARYPATH/pdns_server $EXTRAOPTS"21 pdns_server="$SBINARYPATH/pdns_server $EXTRAOPTS" 21 22 22 23 doPC() -
trunk/pdns/pdns/tcpreceiver.cc
r57 r61 437 437 438 438 // TODO: Implement ipv6 439 #if ndef WIN32439 #if !WIN32 && HAVE_IPV6 440 440 for(vector<string>::const_iterator laddr=locals6.begin();laddr!=locals6.end();++laddr) { 441 441 struct sockaddr_in6 local; -
trunk/pdns/pdns/unix_utility.cc
r2 r61 17 17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 18 */ 19 // Utility class win32 implementation. 19 20 20 21 21 #include "utility.hh" … … 31 31 #include <sys/types.h> 32 32 33 #ifdef NEED_INET_NTOP_PROTO 34 extern "C" { 35 const char *inet_ntop(int af, const void *src, char *dst, size_t cnt); 36 } 37 #endif 38 39 33 40 using namespace std; 34 41 … … 57 64 const char *Utility::inet_ntop(int af, const char *src, char *dst, size_t size) 58 65 { 59 return const_cast<char *>(::inet_ntop(af,src,dst,size));66 return ::inet_ntop(af,src,dst,size); 60 67 } 61 68 -
trunk/pdns/pdns/utility.hh
r57 r61 21 21 #ifndef UTILITY_HH 22 22 #define UTILITY_HH 23 24 #include "config.h" 25 #ifdef NEED_POSIX_TYPEDEF 26 typedef unsigned short int u_int16_t; 27 typedef unsigned int u_int32_t; 28 #endif 29 23 30 24 31 #ifndef WIN32 -
trunk/pdns/pdns/ws.cc
r2 r61 1 /* 2 PowerDNS Versatile Database Driven Nameserver 3 Copyright (C) 2002 PowerDNS.COM BV 4 5 This program is free software; you can redistribute it and/or modify 6 it under the terms of the GNU General Public License as published by 7 the Free Software Foundation; either version 2 of the License, or 8 (at your option) any later version. 9 10 This program is distributed in the hope that it will be useful, 11 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 GNU General Public License for more details. 14 15 You should have received a copy of the GNU General Public License 16 along with this program; if not, write to the Free Software 17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 */ 1 19 2 /* 20 3 Copyright (C) 2002 PowerDNS.COM BV