summary refs log blame commit diff stats
path: root/xchat-wdk.patch
blob: fc167d789956661cded2fd8b7bbc4eb6f262466c (plain) (tree)
1
2
3
4
5
6
7
8
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962

                                                                           
                                                                 
                
          


                                                                                                                                                                                                                                                                   


                            











                                                       


                                                                           

                                                                 
          


                                                                                                                                                                                                                                                                                            


                            










                              
      


























































































                                                                                         









































































                                                                                                                         

                                                                 
          

                                                                    


























                                                              





                                                                   


                                                                               

                                                                 
          

                                                                    


























                                                              





                                                                   


                                                                         
                                                                 

               
                                                                                                                   


                                                                         
                                                                 

               
                                                                                                                   


                                                         
                                                 

                             
                   
                    
                   



























                                                                                       
                                                                 





















                                                                                          
                                                                                                                                                                                                               






                     


















                                                                             

                                                                                           
                                                                         
                















                                                                                                                                         
                                                                                                                                                                                                              






                      

                                                                                   



                                                                 
 
                     




                       














                                                                 

                                                                                     
                                                                 
















                                                                                                            
                                                                                                                                                                                












































































































































































































































































































































































































































































































                                                                                                 












                                                                             









































































                                                                                    

                                                         



                                       
                     






                             
                 







                         












                            
















































                                                                                                      







                                                                 




                              
       


                 
                 










































                                                                               
                                                                 
























                                  
















                                                                                         














































                                                                                   

                                                                 

                         





                            





















                                                                                                                          
                                                                    












































































































                                                                                               



















                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
                                                                                                                       
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
                                                                                                                                                                                                                                                                    
 
                                           
 
                                                   






                                                              
                  

                        
                     

                            
               

                      




               




                                                                                                                                 
            

                              
      
                           
       
 
               
                                 
                                         
                 
       

























































                       
           

                                            
       





















                                                                                     
diff -Naur xchat-wdk.orig/build/build-x64.bat xchat-wdk/build/build-x64.bat
--- xchat-wdk.orig/build/build-x64.bat	1970-01-01 01:00:00 +0100
+++ xchat-wdk/build/build-x64.bat	2010-03-30 05:39:29 +0200
@@ -0,0 +1,20 @@
+@echo off
+set INCLUDE=c:\WinDDK\7600.16385.1\inc\api;c:\WinDDK\7600.16385.1\inc\crt;c:\mozilla-build\build\xchat-dev64\include;c:\mozilla-build\build\openssl-0.9.8n-wdk-xchat-x64\include
+set LIB=c:\WinDDK\7600.16385.1\lib\wnet\amd64;c:\WinDDK\7600.16385.1\lib\Crt\amd64;c:\mozilla-build\build\openssl-0.9.8n-wdk-xchat-x64\lib
+set PATH=c:\WinDDK\7600.16385.1\bin\x86\amd64;c:\WinDDK\7600.16385.1\bin\x86;c:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin;c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin;c:\mozilla-build\build\xchat-dev64\bin;c:\mozilla-build\perl-5.10-x64\bin
+cd ..\src
+nmake -f makefile.mak clean
+nmake -f makefile.mak
+cd ..\plugins\perl
+nmake -f makefile.mak clean
+nmake -f makefile.mak
+::cd ..\python
+::nmake -f makefile.mak clean
+::nmake -f makefile.mak
+::cd ..\tcl
+::nmake -f makefile.mak clean
+::nmake -f makefile.mak
+cd ..\..\build
+set PATH=%PATH%;c:\mozilla-build\build\xchat-dev32\bin
+call compile-po-files.bat
+pause
diff -Naur xchat-wdk.orig/build/build-x86.bat xchat-wdk/build/build-x86.bat
--- xchat-wdk.orig/build/build-x86.bat	1970-01-01 01:00:00 +0100
+++ xchat-wdk/build/build-x86.bat	2010-03-30 03:29:13 +0200
@@ -0,0 +1,19 @@
+@echo off
+set INCLUDE=c:\WinDDK\7600.16385.1\inc\api;c:\WinDDK\7600.16385.1\inc\crt;c:\mozilla-build\build\xchat-dev32\include;c:\mozilla-build\build\openssl-0.9.8n-wdk-xchat-x86\include
+set LIB=c:\WinDDK\7600.16385.1\lib\wxp\i386;c:\WinDDK\7600.16385.1\lib\Crt\i386;c:\mozilla-build\build\openssl-0.9.8n-wdk-xchat-x86\lib
+set PATH=c:\WinDDK\7600.16385.1\bin\x86\x86;c:\WinDDK\7600.16385.1\bin\x86;c:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin;c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin;c:\mozilla-build\build\xchat-dev32\bin;c:\mozilla-build\mingw\bin;c:\mozilla-build\perl-5.10-x86\bin
+cd ..\src
+nmake -f makefile.mak clean
+nmake -f makefile.mak
+cd ..\plugins\perl
+nmake -f makefile.mak clean
+nmake -f makefile.mak
+::cd ..\python
+::nmake -f makefile.mak clean
+::nmake -f makefile.mak
+cd ..\tcl
+nmake -f makefile.mak clean
+nmake -f makefile.mak
+cd ..\..\build
+call compile-po-files.bat
+pause
diff -Naur xchat-wdk.orig/build/compile-po-files.bat xchat-wdk/build/compile-po-files.bat
--- xchat-wdk.orig/build/compile-po-files.bat	1970-01-01 01:00:00 +0100
+++ xchat-wdk/build/compile-po-files.bat	2010-03-30 05:01:54 +0200
@@ -0,0 +1,87 @@
+@echo off
+
+echo.Compiling translations . . .
+cd ..\po
+rmdir /Q /S locale
+mkdir locale
+
+mkdir locale\be\LC_MESSAGES
+msgfmt -cvo locale\be\LC_MESSAGES\xchat.mo be.po
+
+mkdir locale\ca\LC_MESSAGES
+msgfmt -cvo locale\ca\LC_MESSAGES\xchat.mo ca.po
+
+mkdir locale\cs\LC_MESSAGES
+msgfmt -cvo locale\cs\LC_MESSAGES\xchat.mo cs.po
+
+mkdir locale\de\LC_MESSAGES
+msgfmt -cvo locale\de\LC_MESSAGES\xchat.mo de.po
+
+mkdir locale\el\LC_MESSAGES
+msgfmt -cvo locale\el\LC_MESSAGES\xchat.mo el.po
+
+mkdir locale\es\LC_MESSAGES
+msgfmt -cvo locale\es\LC_MESSAGES\xchat.mo es.po
+
+mkdir locale\fi\LC_MESSAGES
+msgfmt -cvo locale\fi\LC_MESSAGES\xchat.mo fi.po
+
+mkdir locale\fr\LC_MESSAGES
+msgfmt -cvo locale\fr\LC_MESSAGES\xchat.mo fr.po
+
+mkdir locale\gl\LC_MESSAGES
+msgfmt -cvo locale\gl\LC_MESSAGES\xchat.mo gl.po
+
+mkdir locale\hu\LC_MESSAGES
+msgfmt -cvo locale\hu\LC_MESSAGES\xchat.mo hu.po
+
+mkdir locale\it\LC_MESSAGES
+msgfmt -cvo locale\it\LC_MESSAGES\xchat.mo it.po
+
+mkdir locale\ja\LC_MESSAGES
+msgfmt -cvo locale\ja\LC_MESSAGES\xchat.mo ja.po
+
+mkdir locale\ko\LC_MESSAGES
+msgfmt -cvo locale\ko\LC_MESSAGES\xchat.mo ko.po
+
+mkdir locale\lt\LC_MESSAGES
+msgfmt -cvo locale\lt\LC_MESSAGES\xchat.mo lt.po
+
+mkdir locale\mk\LC_MESSAGES
+msgfmt -cvo locale\mk\LC_MESSAGES\xchat.mo mk.po
+
+mkdir locale\nl\LC_MESSAGES
+msgfmt -cvo locale\nl\LC_MESSAGES\xchat.mo nl.po
+
+mkdir locale\pa\LC_MESSAGES
+msgfmt -cvo locale\pa\LC_MESSAGES\xchat.mo pa.po
+
+mkdir locale\pt\LC_MESSAGES
+msgfmt -cvo locale\pt\LC_MESSAGES\xchat.mo pt.po
+
+mkdir locale\ru\LC_MESSAGES
+msgfmt -cvo locale\ru\LC_MESSAGES\xchat.mo ru.po
+
+mkdir locale\sq\LC_MESSAGES
+msgfmt -cvo locale\sq\LC_MESSAGES\xchat.mo sq.po
+
+mkdir locale\sr\LC_MESSAGES
+msgfmt -cvo locale\sr\LC_MESSAGES\xchat.mo sr.po
+
+mkdir locale\sv\LC_MESSAGES
+msgfmt -cvo locale\sv\LC_MESSAGES\xchat.mo sv.po
+
+mkdir locale\th\LC_MESSAGES
+msgfmt -cvo locale\th\LC_MESSAGES\xchat.mo th.po
+
+mkdir locale\uk\LC_MESSAGES
+msgfmt -cvo locale\uk\LC_MESSAGES\xchat.mo uk.po
+
+mkdir locale\vi\LC_MESSAGES
+msgfmt -cvo locale\vi\LC_MESSAGES\xchat.mo vi.po
+
+mkdir locale\zh_CN\LC_MESSAGES
+msgfmt -cvo locale\zh_CN\LC_MESSAGES\xchat.mo zh_CN.po
+
+mkdir locale\zh_TW\LC_MESSAGES
+msgfmt -cvo locale\zh_TW\LC_MESSAGES\xchat.mo zh_TW.po
diff -Naur xchat-wdk.orig/build/etc/gtk-2.0/gtkrc xchat-wdk/build/etc/gtk-2.0/gtkrc
--- xchat-wdk.orig/build/etc/gtk-2.0/gtkrc	1970-01-01 01:00:00 +0100
+++ xchat-wdk/build/etc/gtk-2.0/gtkrc	2010-03-29 21:26:48 +0200
@@ -0,0 +1,68 @@
+gtk-font-name = "sans 8"
+
+gtk-icon-sizes = "gtk-menu=13,13:gtk-small-toolbar=16,16:gtk-large-toolbar=24,24:gtk-dnd=32,32"
+gtk-toolbar-icon-size = small-toolbar
+
+# disable images in buttons. i've only seen ugly delphi apps use this feature.
+gtk-button-images = 0
+
+# enable/disable images in menus. most "stock" microsoft apps don't use these, except sparingly.
+# the office apps use them heavily, though.
+gtk-menu-images = 1
+
+# use the win32 button ordering instead of the GNOME HIG one, where applicable
+gtk-alternative-button-order = 1
+
+# use the win32 sort indicators direction, as in Explorer
+gtk-alternative-sort-arrows = 1
+
+# Windows users don't expect the PC Speaker beeping at them when they backspace in an empty textview and stuff like that
+gtk-error-bell = 0
+
+style "msw-default"
+{
+  GtkWidget::interior-focus = 1
+  GtkOptionMenu::indicator-size = { 9, 5 }
+  GtkOptionMenu::indicator-spacing = { 7, 5, 2, 2 }
+  GtkSpinButton::shadow-type = in
+
+  # Owen and I disagree that these should be themable
+  #GtkUIManager::add-tearoffs = 0
+  #GtkComboBox::add-tearoffs = 0
+  
+  GtkComboBox::appears-as-list = 1
+  GtkComboBox::focus-on-click = 0
+  
+  GOComboBox::add_tearoffs = 0
+
+  GtkTreeView::allow-rules = 0
+  GtkTreeView::expander-size = 12
+
+  GtkExpander::expander-size = 12
+
+  GtkScrolledWindow::scrollbar_spacing = 1
+
+  GtkSeparatorMenuItem::horizontal-padding = 2
+
+  engine "wimp" 
+  {
+  }
+}
+class "*" style "msw-default"
+
+binding "ms-windows-tree-view"
+{
+  bind "Right" { "expand-collapse-cursor-row" (1,1,0) }
+  bind "Left" { "expand-collapse-cursor-row" (1,0,0) }
+}
+
+class "GtkTreeView" binding "ms-windows-tree-view"
+
+style "msw-combobox-thickness" = "msw-default"
+{
+  xthickness = 0 
+  ythickness = 0
+}
+
+widget_class "*TreeView*ComboBox*" style "msw-combobox-thickness"
+widget_class "*ComboBox*GtkFrame*" style "msw-combobox-thickness" 
diff -Naur xchat-wdk.orig/build/release-x64.bat xchat-wdk/build/release-x64.bat
--- xchat-wdk.orig/build/release-x64.bat	1970-01-01 01:00:00 +0100
+++ xchat-wdk/build/release-x64.bat	2010-03-30 03:29:41 +0200
@@ -0,0 +1,37 @@
+@echo off
+set GTK_BIN=c:\mozilla-build\build\xchat-dev64\bin
+set SSL_BIN=c:\mozilla-build\build\openssl-0.9.8n-wdk-xchat-x64\bin
+set XCHAT_DEST=c:\mozilla-build\build\xchat-wdk-x64
+rmdir /Q /S %XCHAT_DEST%
+mkdir %XCHAT_DEST%
+xcopy ..\src\fe-gtk\xchat.exe %XCHAT_DEST%
+xcopy %GTK_BIN%\libgtk-win32-2.0-0.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libgdk_pixbuf-2.0-0.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libgio-2.0-0.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libglib-2.0-0.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libgmodule-2.0-0.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libgobject-2.0-0.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libpng14-14.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\zlib1.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libgdk-win32-2.0-0.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libcairo-2.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libfontconfig-1.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libexpat-1.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libfreetype-6.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libpango-1.0-0.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libpangocairo-1.0-0.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libpangoft2-1.0-0.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libpangowin32-1.0-0.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libatk-1.0-0.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libintl-8.dll %XCHAT_DEST%
+xcopy /S /I %GTK_BIN%\..\lib\gtk-2.0 %XCHAT_DEST%\lib\gtk-2.0
+rmdir /Q /S %XCHAT_DEST%\lib\gtk-2.0\include
+xcopy /S /I etc %XCHAT_DEST%\etc
+xcopy ..\COPYING %XCHAT_DEST%
+::xcopy %SSL_BIN%\libeay32.dll %XCHAT_DEST%
+::xcopy %SSL_BIN%\ssleay32.dll %XCHAT_DEST%
+xcopy /S /I ..\plugins\perl\xcperl.dll %XCHAT_DEST%\plugins\
+::xcopy /S /I ..\plugins\python\xcpython.dll %XCHAT_DEST%\plugins\
+::xcopy /S /I ..\plugins\tcl\xctcl.dll %XCHAT_DEST%\plugins\
+xcopy /S /I ..\po\locale %XCHAT_DEST%\locale
+pause
diff -Naur xchat-wdk.orig/build/release-x86.bat xchat-wdk/build/release-x86.bat
--- xchat-wdk.orig/build/release-x86.bat	1970-01-01 01:00:00 +0100
+++ xchat-wdk/build/release-x86.bat	2010-03-30 03:29:45 +0200
@@ -0,0 +1,37 @@
+@echo off
+set GTK_BIN=c:\mozilla-build\build\xchat-dev32\bin
+set SSL_BIN=c:\mozilla-build\build\openssl-0.9.8n-wdk-xchat-x86\bin
+set XCHAT_DEST=c:\mozilla-build\build\xchat-wdk-x86
+rmdir /Q /S %XCHAT_DEST%
+mkdir %XCHAT_DEST%
+xcopy ..\src\fe-gtk\xchat.exe %XCHAT_DEST%
+xcopy %GTK_BIN%\libgtk-win32-2.0-0.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libgdk_pixbuf-2.0-0.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libgio-2.0-0.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libglib-2.0-0.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libgmodule-2.0-0.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libgobject-2.0-0.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libpng14-14.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\zlib1.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libgdk-win32-2.0-0.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libcairo-2.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libfontconfig-1.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libexpat-1.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\freetype6.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libpango-1.0-0.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libpangocairo-1.0-0.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libpangoft2-1.0-0.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libpangowin32-1.0-0.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\libatk-1.0-0.dll %XCHAT_DEST%
+xcopy %GTK_BIN%\intl.dll %XCHAT_DEST%
+xcopy /S /I %GTK_BIN%\..\lib\gtk-2.0 %XCHAT_DEST%\lib\gtk-2.0
+rmdir /Q /S %XCHAT_DEST%\lib\gtk-2.0\include
+xcopy /S /I etc %XCHAT_DEST%\etc
+xcopy ..\COPYING %XCHAT_DEST%
+::xcopy %SSL_BIN%\libeay32.dll %XCHAT_DEST%
+::xcopy %SSL_BIN%\ssleay32.dll %XCHAT_DEST%
+xcopy /S /I ..\plugins\perl\xcperl.dll %XCHAT_DEST%\plugins\
+::xcopy /S /I ..\plugins\python\xcpython.dll %XCHAT_DEST%\plugins\
+xcopy /S /I ..\plugins\tcl\xctcl.dll %XCHAT_DEST%\plugins\
+xcopy /S /I ..\po\locale %XCHAT_DEST%\locale
+pause
diff -Naur xchat-wdk.orig/build/test-x64.bat xchat-wdk/build/test-x64.bat
--- xchat-wdk.orig/build/test-x64.bat	1970-01-01 01:00:00 +0100
+++ xchat-wdk/build/test-x64.bat	2010-03-30 02:24:01 +0200
@@ -0,0 +1,3 @@
+@echo off
+set PATH=c:\mozilla-build\build\xchat-dev64\bin;c:\mozilla-build\perl-5.10-x64\bin;c:\mozilla-build\python-2.6-x64
+..\src\fe-gtk\xchat.exe
diff -Naur xchat-wdk.orig/build/test-x86.bat xchat-wdk/build/test-x86.bat
--- xchat-wdk.orig/build/test-x86.bat	1970-01-01 01:00:00 +0100
+++ xchat-wdk/build/test-x86.bat	2010-03-30 02:24:19 +0200
@@ -0,0 +1,3 @@
+@echo off
+set PATH=c:\mozilla-build\build\xchat-dev32\bin;c:\mozilla-build\perl-5.10-x86\bin;c:\mozilla-build\python-2.6-x86
+..\src\fe-gtk\xchat.exe
diff -Naur xchat-wdk.orig/config.h xchat-wdk/config.h
--- xchat-wdk.orig/config.h	1970-01-01 01:00:00 +0100
+++ xchat-wdk/config.h	2010-03-30 03:18:35 +0200
@@ -0,0 +1,14 @@
+#define LOCALEDIR "./locale"
+#define ENABLE_NLS
+#define USE_GMODULE
+#define USE_PLUGIN
+#define PACKAGE_NAME "xchat"
+#define PACKAGE_VERSION "r1409"
+#define XCHATLIBDIR "."
+#define XCHATSHAREDIR "."
+#define OLD_PERL
+#ifndef USE_IPV6
+#define socklen_t int
+#endif
+#define GETTEXT_PACKAGE "xchat"
+#define PACKAGE_TARNAME "xchat-2.8.6"
diff -Naur xchat-wdk.orig/config.h.w32 xchat-wdk/config.h.w32
--- xchat-wdk.orig/config.h.w32	2008-06-12 10:37:44 +0200
+++ xchat-wdk/config.h.w32	1970-01-01 01:00:00 +0100
@@ -1,12 +0,0 @@
-#define LOCALEDIR "./locale"
-#define ENABLE_NLS
-#define USE_GMODULE
-#define USE_PLUGIN
-#define PACKAGE_NAME "xchat"
-#define PACKAGE_VERSION "2.8.6Unix"
-#define XCHATLIBDIR "."
-#define XCHATSHAREDIR "."
-#define OLD_PERL
-#ifndef USE_IPV6
-#define socklen_t int
-#endif
diff -Naur xchat-wdk.orig/plugins/perl/makefile.mak xchat-wdk/plugins/perl/makefile.mak
--- xchat-wdk.orig/plugins/perl/makefile.mak	1970-01-01 01:00:00 +0100
+++ xchat-wdk/plugins/perl/makefile.mak	2010-03-30 05:15:18 +0200
@@ -0,0 +1,29 @@
+include "..\..\src\makeinc.mak"
+
+TARGET = $(PERLOUTPUT)
+
+all: $(TARGET)
+
+perl.def:
+	echo EXPORTS > perl.def
+	echo xchat_plugin_init >> perl.def
+	echo xchat_plugin_deinit >> perl.def
+	echo xchat_plugin_get_info >> perl.def
+
+perl.obj: perl.c
+	$(CC) $(CFLAGS) -c perl.c $(GLIB) -I.. -I$(PERLPATH) -DPERL_DLL=\"$(PERLLIB).dll\"
+
+perl.c: xchat.pm.h
+
+xchat.pm.h: Xchat.pm IRC.pm
+	perl.exe generate_header
+
+$(TARGET): perl.obj perl.def
+	$(LINK) /DLL /out:$(TARGET) /SUBSYSTEM:WINDOWS /nologo perl.obj $(LDFLAGS) $(PERLLIB).lib /LIBPATH:$(PERLPATH) /DELAYLOAD:$(PERLLIB).dll DELAYIMP.LIB user32.lib shell32.lib advapi32.lib /def:perl.def
+
+clean:
+	del $(TARGET)
+	del *.obj
+	del perl.def
+	del *.lib
+	del *.exp
diff -Naur xchat-wdk.orig/plugins/perl/perl.c xchat-wdk/plugins/perl/perl.c
--- xchat-wdk.orig/plugins/perl/perl.c	2010-03-23 01:06:59 +0100
+++ xchat-wdk/plugins/perl/perl.c	2010-03-30 01:17:15 +0200
@@ -16,13 +16,14 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  */
 
+#define  _INC_DIRENT
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
-#include <dirent.h>
+#include "../../src/common/dirent.h"
 #ifdef ENABLE_NLS
 #include <locale.h>
 #endif
diff -Naur xchat-wdk.orig/plugins/python/makefile.mak xchat-wdk/plugins/python/makefile.mak
--- xchat-wdk.orig/plugins/python/makefile.mak	1970-01-01 01:00:00 +0100
+++ xchat-wdk/plugins/python/makefile.mak	2010-03-30 05:15:39 +0200
@@ -0,0 +1,24 @@
+include "..\..\src\makeinc.mak"
+
+TARGET = $(PYTHONOUTPUT)
+
+all: $(TARGET)
+
+python.def:
+	echo EXPORTS > python.def
+	echo xchat_plugin_init >> python.def
+	echo xchat_plugin_deinit >> python.def
+	echo xchat_plugin_get_info >> python.def
+
+python.obj: python.c
+	$(CC) $(CFLAGS) -Dusleep=_sleep -DPATH_MAX=255 -c python.c $(GLIB) -I.. -I$(PYTHONPATH)\INCLUDE -DPYTHON_DLL=\"$(PYTHONLIB).dll\"
+
+$(TARGET): python.obj python.def
+	$(LINK) /DLL /out:$(TARGET) /SUBSYSTEM:WINDOWS /nologo $(LDFLAGS) python.obj $(PYTHONLIB).lib /LIBPATH:$(PYTHONPATH)\LIBS $(PYTHONLIB).lib user32.lib shell32.lib advapi32.lib $(LIBS) /def:python.def
+
+clean:
+	del $(TARGET)
+	del *.obj
+	del python.def
+	del *.lib
+	del *.exp
diff -Naur xchat-wdk.orig/plugins/python/python.c xchat-wdk/plugins/python/python.c
--- xchat-wdk.orig/plugins/python/python.c	2010-03-17 09:07:51 +0100
+++ xchat-wdk/plugins/python/python.c	2010-03-30 02:59:44 +0200
@@ -51,12 +51,13 @@
  *
  */
 
+#define  _INC_DIRENT
 #include <glib.h>
 #include <string.h>
-#include <unistd.h>
 #include <stdlib.h>
 #include <sys/types.h>
-#include <dirent.h>
+#include "../../src/common/dirent.h"
+#include "../../config.h"
 
 #include "xchat-plugin.h"
 #include "Python.h"
@@ -68,7 +69,7 @@
 
 #ifdef WIN32
 #undef WITH_THREAD /* Thread support locks up xchat on Win32. */
-#define VERSION "0.8/2.4"	/* Linked to python24.dll */
+#define VERSION "0.8/2.6"	/* Linked to python24.dll */
 #else
 #define VERSION "0.8"
 #endif
diff -Naur xchat-wdk.orig/plugins/tcl/makefile.mak xchat-wdk/plugins/tcl/makefile.mak
--- xchat-wdk.orig/plugins/tcl/makefile.mak	1970-01-01 01:00:00 +0100
+++ xchat-wdk/plugins/tcl/makefile.mak	2010-03-30 05:15:52 +0200
@@ -0,0 +1,22 @@
+include "..\..\src\makeinc.mak"
+
+TARGET = $(TCLOUTPUT)
+
+all: $(TARGET)
+
+tcl.def:
+	echo EXPORTS > tcl.def
+	echo xchat_plugin_init >> tcl.def
+	echo xchat_plugin_deinit >> tcl.def
+	echo xchat_plugin_get_info >> tcl.def
+
+tclplugin.obj: tclplugin.c
+	$(CC) $(CFLAGS) -c tclplugin.c -I$(TCLPATH)\INCLUDE -I../../include -I.. -DTCL_DLL=\"$(TCLLIB).dll\"
+
+$(TARGET): tclplugin.obj tcl.def
+	$(LINK) /DLL /out:$(TARGET) /SUBSYSTEM:WINDOWS /nologo $(LDFLAGS) tclplugin.obj /LIBPATH:$(TCLPATH)\LIB $(TCLLIB).lib /DELAYLOAD:$(TCLLIB).dll DELAYIMP.LIB /def:tcl.def
+
+clean:
+	del $(TARGET)
+	del *.obj
+	del tcl.def
diff -Naur xchat-wdk.orig/plugins/tcl/tclplugin.c xchat-wdk/plugins/tcl/tclplugin.c
--- xchat-wdk.orig/plugins/tcl/tclplugin.c	2010-03-21 01:49:42 +0100
+++ xchat-wdk/plugins/tcl/tclplugin.c	2010-03-29 12:57:17 +0200
@@ -32,8 +32,6 @@
 #include <windows.h>
 #define bzero(mem, sz) memset((mem), 0, (sz))
 #define bcopy(src, dest, count) memmove((dest), (src), (count))
-#else
-#include <unistd.h>
 #endif
 
 #include "xchat-plugin.h"
diff -Naur xchat-wdk.orig/src/common/cfgfiles.c xchat-wdk/src/common/cfgfiles.c
--- xchat-wdk.orig/src/common/cfgfiles.c	2009-01-02 06:56:12 +0100
+++ xchat-wdk/src/common/cfgfiles.c	2010-03-29 12:57:41 +0200
@@ -17,7 +17,6 @@
  */
 
 #include <fcntl.h>
-#include <unistd.h>
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
diff -Naur xchat-wdk.orig/src/common/chanopt.c xchat-wdk/src/common/chanopt.c
--- xchat-wdk.orig/src/common/chanopt.c	2008-06-15 06:40:29 +0200
+++ xchat-wdk/src/common/chanopt.c	2010-03-29 12:58:02 +0200
@@ -3,7 +3,6 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
diff -Naur xchat-wdk.orig/src/common/ctcp.c xchat-wdk/src/common/ctcp.c
--- xchat-wdk.orig/src/common/ctcp.c	2006-10-03 06:11:54 +0200
+++ xchat-wdk/src/common/ctcp.c	2010-03-29 12:57:58 +0200
@@ -18,7 +18,6 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <unistd.h>
 #include <stdlib.h>
 
 #include "xchat.h"
diff -Naur xchat-wdk.orig/src/common/dcc.c xchat-wdk/src/common/dcc.c
--- xchat-wdk.orig/src/common/dcc.c	2007-02-06 05:45:13 +0100
+++ xchat-wdk/src/common/dcc.c	2010-03-29 13:17:58 +0200
@@ -31,7 +31,6 @@
 #include <time.h>
 #include <errno.h>
 #include <sys/stat.h>
-#include <unistd.h>
 #include <fcntl.h>
 
 #define WANTSOCKET
@@ -1984,7 +1983,7 @@
 
 	/* now handle case-insensitive Filesystems: HFS+, FAT */
 #ifdef WIN32
-#warning no win32 implementation - behaviour may be unreliable
+/* warning no win32 implementation - behaviour may be unreliable */
 #else
 	/* this fstat() shouldn't really fail */
 	if ((dcc->fp == -1 ? stat (dcc->destfile_fs, &st_a) : fstat (dcc->fp, &st_a)) == -1)
diff -Naur xchat-wdk.orig/src/common/dirent.h xchat-wdk/src/common/dirent.h
--- xchat-wdk.orig/src/common/dirent.h	1970-01-01 01:00:00 +0100
+++ xchat-wdk/src/common/dirent.h	2009-12-15 23:10:54 +0100
@@ -0,0 +1,230 @@
+/*****************************************************************************
+ * dirent.h - dirent API for Microsoft Visual Studio
+ *
+ * Copyright (C) 2006 Toni Ronkko
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * ``Software''), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL TONI RONKKO BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Dec 15, 2009, John Cunningham
+ * Added rewinddir member function
+ *
+ * Jan 18, 2008, Toni Ronkko
+ * Using FindFirstFileA and WIN32_FIND_DATAA to avoid converting string
+ * between multi-byte and unicode representations.  This makes the
+ * code simpler and also allows the code to be compiled under MingW.  Thanks
+ * to Azriel Fasten for the suggestion.
+ *
+ * Mar 4, 2007, Toni Ronkko
+ * Bug fix: due to the strncpy_s() function this file only compiled in
+ * Visual Studio 2005.  Using the new string functions only when the
+ * compiler version allows.
+ *
+ * Nov  2, 2006, Toni Ronkko
+ * Major update: removed support for Watcom C, MS-DOS and Turbo C to
+ * simplify the file, updated the code to compile cleanly on Visual
+ * Studio 2005 with both unicode and multi-byte character strings,
+ * removed rewinddir() as it had a bug.
+ *
+ * Aug 20, 2006, Toni Ronkko
+ * Removed all remarks about MSVC 1.0, which is antiqued now.  Simplified
+ * comments by removing SGML tags.
+ *
+ * May 14 2002, Toni Ronkko
+ * Embedded the function definitions directly to the header so that no
+ * source modules need to be included in the Visual Studio project.  Removed
+ * all the dependencies to other projects so that this very header can be
+ * used independently.
+ *
+ * May 28 1998, Toni Ronkko
+ * First version.
+ *****************************************************************************/
+#ifndef DIRENT_H
+#define DIRENT_H
+
+#include <windows.h>
+#include <string.h>
+#include <assert.h>
+
+
+typedef struct dirent
+{
+   char d_name[MAX_PATH + 1]; /* current dir entry (multi-byte char string) */
+   WIN32_FIND_DATAA data;     /* file attributes */
+}  dirent;
+
+
+typedef struct DIR
+{
+   dirent current;            /* Current directory entry */
+   int    cached;             /* Indicates un-processed entry in memory */
+   HANDLE search_handle;      /* File search handle */
+   char   patt[MAX_PATH + 3]; /* search pattern (3 = pattern + "\\*\0") */
+} DIR;
+
+
+/* Forward declarations */
+static DIR *opendir (const char *dirname);
+static struct dirent *readdir (DIR *dirp);
+static int closedir (DIR *dirp);
+static void rewinddir(DIR* dirp);
+
+
+/* Use the new safe string functions introduced in Visual Studio 2005 */
+#if defined(_MSC_VER) && _MSC_VER >= 1400
+# define STRNCPY(dest,src,size) strncpy_s((dest),(size),(src),_TRUNCATE)
+#else
+# define STRNCPY(dest,src,size) strncpy((dest),(src),(size))
+#endif
+
+
+/*****************************************************************************
+ * Open directory stream DIRNAME for read and return a pointer to the
+ * internal working area that is used to retrieve individual directory
+ * entries.
+ */
+static DIR *opendir(const char *dirname)
+{
+   DIR *dirp;
+   assert (dirname != NULL);
+   assert (strlen (dirname) < MAX_PATH);
+
+   /* construct new DIR structure */
+   dirp = (DIR*) malloc (sizeof (struct DIR));
+   if (dirp != NULL) {
+      char *p;
+
+      /* take directory name... */
+      STRNCPY (dirp->patt, dirname, sizeof(dirp->patt));
+      dirp->patt[MAX_PATH] = '\0';
+
+      /* ... and append search pattern to it */
+      p = strchr (dirp->patt, '\0');
+      if (dirp->patt < p  &&  *(p-1) != '\\'  &&  *(p-1) != ':') {
+         *p++ = '\\';
+      }
+      *p++ = '*';
+      *p = '\0';
+
+      /* open stream and retrieve first file */
+      dirp->search_handle = FindFirstFileA (dirp->patt, &dirp->current.data);
+      if (dirp->search_handle == INVALID_HANDLE_VALUE) {
+         /* invalid search pattern? */
+         free (dirp);
+         return NULL;
+      }
+
+      /* there is an un-processed directory entry in memory now */
+      dirp->cached = 1;
+   }
+
+   return dirp;
+}
+
+
+/*****************************************************************************
+ * Read a directory entry, and return a pointer to a dirent structure
+ * containing the name of the entry in d_name field.  Individual directory
+ * entries returned by this very function include regular files,
+ * sub-directories, pseudo-directories "." and "..", but also volume labels,
+ * hidden files and system files may be returned.
+ */
+static struct dirent *readdir(DIR *dirp)
+{
+   assert (dirp != NULL);
+
+   if (dirp->search_handle == INVALID_HANDLE_VALUE) {
+      /* directory stream was opened/rewound incorrectly or ended normally */
+      return NULL;
+   }
+
+   /* get next directory entry */
+   if (dirp->cached != 0) {
+      /* a valid directory entry already in memory */
+      dirp->cached = 0;
+   } else {
+      /* read next directory entry from disk */
+      if (FindNextFileA (dirp->search_handle, &dirp->current.data) == FALSE) {
+         /* the very last file has been processed or an error occured */
+         FindClose (dirp->search_handle);
+         dirp->search_handle = INVALID_HANDLE_VALUE;
+         return NULL;
+      }
+   }
+
+   /* copy as a multibyte character string */
+   STRNCPY ( dirp->current.d_name,
+             dirp->current.data.cFileName,
+             sizeof(dirp->current.d_name) );
+   dirp->current.d_name[MAX_PATH] = '\0';
+
+   return &dirp->current;
+}
+
+
+/*****************************************************************************
+ * Close directory stream opened by opendir() function.  Close of the
+ * directory stream invalidates the DIR structure as well as any previously
+ * read directory entry.
+ */
+static int closedir(DIR *dirp)
+{
+   assert (dirp != NULL);
+
+   /* release search handle */
+   if (dirp->search_handle != INVALID_HANDLE_VALUE) {
+      FindClose (dirp->search_handle);
+      dirp->search_handle = INVALID_HANDLE_VALUE;
+   }
+
+   /* release directory handle */
+   free (dirp);
+   return 0;
+}
+
+
+/*****************************************************************************
+ * Resets the position of the directory stream to which dirp refers to the
+ * beginning of the directory. It also causes the directory stream to refer
+ * to the current state of the corresponding directory, as a call to opendir()
+ * would have done. If dirp does not refer to a directory stream, the effect
+ * is undefined.
+ */
+static void rewinddir(DIR* dirp)
+{
+   /* release search handle */
+   if (dirp->search_handle != INVALID_HANDLE_VALUE) {
+      FindClose (dirp->search_handle);
+      dirp->search_handle = INVALID_HANDLE_VALUE;
+   }
+
+   /* open new search handle and retrieve first file */
+   dirp->search_handle = FindFirstFileA (dirp->patt, &dirp->current.data);
+   if (dirp->search_handle == INVALID_HANDLE_VALUE) {
+      /* invalid search pattern? */
+      free (dirp);
+      return;
+   }
+
+   /* there is an un-processed directory entry in memory now */
+   dirp->cached = 1;
+}
+
+
+#endif /*DIRENT_H*/
diff -Naur xchat-wdk.orig/src/common/identd.c xchat-wdk/src/common/identd.c
--- xchat-wdk.orig/src/common/identd.c	2004-05-24 15:47:58 +0200
+++ xchat-wdk/src/common/identd.c	2010-03-29 18:04:55 +0200
@@ -1,6 +1,10 @@
 /* simple identd server for xchat under win32 */
 
 
+#include "inet.h"
+#include "xchat.h"
+#include "xchatc.h"
+
 static int identd_is_running = FALSE;
 
 
@@ -75,7 +79,7 @@
 	return 0;
 }
 
-static void
+void
 identd_start (char *username)
 {
 	DWORD tid;
diff -Naur xchat-wdk.orig/src/common/identd.h xchat-wdk/src/common/identd.h
--- xchat-wdk.orig/src/common/identd.h	1970-01-01 01:00:00 +0100
+++ xchat-wdk/src/common/identd.h	2010-03-29 18:05:16 +0200
@@ -0,0 +1 @@
+void identd_start (char *username);
diff -Naur xchat-wdk.orig/src/common/ignore.c xchat-wdk/src/common/ignore.c
--- xchat-wdk.orig/src/common/ignore.c	2006-04-15 09:00:39 +0200
+++ xchat-wdk/src/common/ignore.c	2010-03-29 12:58:18 +0200
@@ -19,7 +19,6 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
diff -Naur xchat-wdk.orig/src/common/inbound.c xchat-wdk/src/common/inbound.c
--- xchat-wdk.orig/src/common/inbound.c	2008-03-19 05:28:57 +0100
+++ xchat-wdk/src/common/inbound.c	2010-03-29 12:58:16 +0200
@@ -21,7 +21,6 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <sys/types.h>
-#include <unistd.h>
 #include <time.h>
 
 #define WANTARPA
diff -Naur xchat-wdk.orig/src/common/inet.h xchat-wdk/src/common/inet.h
--- xchat-wdk.orig/src/common/inet.h	2005-09-03 12:57:48 +0200
+++ xchat-wdk/src/common/inet.h	2010-03-29 15:36:39 +0200
@@ -24,9 +24,8 @@
 #ifdef USE_IPV6
 #include <winsock2.h>
 #include <ws2tcpip.h>
-#include <tpipv6.h>
 #else
-#include <winsock.h>
+#include <winsock2.h>
 #endif
 
 #define set_blocking(sok)	{ \
diff -Naur xchat-wdk.orig/src/common/makefile.mak xchat-wdk/src/common/makefile.mak
--- xchat-wdk.orig/src/common/makefile.mak	1970-01-01 01:00:00 +0100
+++ xchat-wdk/src/common/makefile.mak	2010-03-29 13:02:00 +0200
@@ -0,0 +1,13 @@
+include "..\makeinc.mak"
+
+all: $(COMMON_OBJECTS) xchatcommon.lib
+
+xchatcommon.lib: $(COMMON_OBJECTS)
+	lib -out:xchatcommon.lib $(COMMON_OBJECTS)
+
+.c.obj:
+	$(CC) $(CFLAGS) $(GLIB) /c $<
+
+clean:
+	del *.obj
+	del xchatcommon.lib
diff -Naur xchat-wdk.orig/src/common/msproxy.c xchat-wdk/src/common/msproxy.c
--- xchat-wdk.orig/src/common/msproxy.c	2006-04-16 17:32:17 +0200
+++ xchat-wdk/src/common/msproxy.c	2010-03-29 12:58:13 +0200
@@ -26,7 +26,6 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <fcntl.h>
 
 #define WANTSOCKET
diff -Naur xchat-wdk.orig/src/common/network.c xchat-wdk/src/common/network.c
--- xchat-wdk.orig/src/common/network.c	2006-04-16 10:11:26 +0200
+++ xchat-wdk/src/common/network.c	2010-03-29 12:58:40 +0200
@@ -21,7 +21,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
-#include <unistd.h>
 #include <glib.h>
 
 #include "../../config.h"				  /* grab USE_IPV6 and LOOKUPD defines */
diff -Naur xchat-wdk.orig/src/common/notify.c xchat-wdk/src/common/notify.c
--- xchat-wdk.orig/src/common/notify.c	2008-06-08 09:58:58 +0200
+++ xchat-wdk/src/common/notify.c	2010-03-29 12:58:37 +0200
@@ -22,7 +22,6 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
-#include <unistd.h>
 #include <time.h>
 
 #include "xchat.h"
diff -Naur xchat-wdk.orig/src/common/outbound.c xchat-wdk/src/common/outbound.c
--- xchat-wdk.orig/src/common/outbound.c	2009-01-02 06:56:12 +0100
+++ xchat-wdk/src/common/outbound.c	2010-03-29 12:58:34 +0200
@@ -32,7 +32,6 @@
 #include <sys/wait.h>
 #endif
 
-#include <unistd.h>
 #include <time.h>
 #include <signal.h>
 #include <sys/stat.h>
diff -Naur xchat-wdk.orig/src/common/proto-irc.c xchat-wdk/src/common/proto-irc.c
--- xchat-wdk.orig/src/common/proto-irc.c	2008-05-25 07:36:25 +0200
+++ xchat-wdk/src/common/proto-irc.c	2010-03-29 12:58:59 +0200
@@ -18,7 +18,6 @@
 
 /* IRC RFC1459(+commonly used extensions) protocol implementation */
 
-#include <unistd.h>
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
diff -Naur xchat-wdk.orig/src/common/server.c xchat-wdk/src/common/server.c
--- xchat-wdk.orig/src/common/server.c	2008-02-17 09:54:55 +0100
+++ xchat-wdk/src/common/server.c	2010-03-29 17:36:30 +0200
@@ -26,7 +26,6 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <errno.h>
 #include <fcntl.h>
 
@@ -67,7 +66,7 @@
 #endif
 
 #ifdef WIN32
-#include "identd.c"
+#include "identd.h"
 #endif
 
 #ifdef USE_OPENSSL
@@ -838,6 +837,7 @@
 	fe_set_throttle (serv);
 }
 
+/* this doesn't really work so just disable it and use the failsafe method
 #ifdef WIN32
 
 static int
@@ -859,11 +859,11 @@
 	}
 }
 
-#else
+#else*/
 
 #define waitline2(source,buf,size) waitline(serv->childread,buf,size,0)
 
-#endif
+/*#endif*/
 
 /* connect() successed */
 
diff -Naur xchat-wdk.orig/src/common/servlist.c xchat-wdk/src/common/servlist.c
--- xchat-wdk.orig/src/common/servlist.c	2009-10-25 10:21:58 +0100
+++ xchat-wdk/src/common/servlist.c	2010-03-29 12:58:54 +0200
@@ -21,7 +21,6 @@
 #include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <unistd.h>
 
 #include "xchat.h"
 #include <glib/ghash.h>
diff -Naur xchat-wdk.orig/src/common/ssl.c xchat-wdk/src/common/ssl.c
--- xchat-wdk.orig/src/common/ssl.c	2007-03-28 10:35:06 +0200
+++ xchat-wdk/src/common/ssl.c	2010-03-30 00:55:39 +0200
@@ -17,6 +17,9 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
  */
 
+#define _WS2DEF_
+#define _WINSOCK2API_
+#define _WS2TCPIP_H_
 #include <openssl/ssl.h>		  /* SSL_() */
 #include <openssl/err.h>		  /* ERR_() */
 #include <time.h>					  /* asctime() */
diff -Naur xchat-wdk.orig/src/common/text.c xchat-wdk/src/common/text.c
--- xchat-wdk.orig/src/common/text.c	2009-12-31 03:19:50 +0100
+++ xchat-wdk/src/common/text.c	2010-03-29 15:02:51 +0200
@@ -19,13 +19,11 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-#include <unistd.h>
 #include <ctype.h>
 #include <time.h>
 #include <sys/types.h>
 #include <fcntl.h>
 #include <sys/stat.h>
-#include <sys/mman.h>
 
 #include "xchat.h"
 #include <glib/ghash.h>
@@ -274,6 +272,8 @@
 	char *map, *end_map;
 	struct stat statbuf;
 	const char *begin, *eol;
+	
+	HANDLE hFile, hMapFile;
 
 	if (sess->text_scrollback == SET_DEFAULT)
 	{
@@ -296,9 +296,32 @@
 	if (fstat (fh, &statbuf) < 0)
 		return;
 
-	map = mmap (NULL, statbuf.st_size, PROT_READ, MAP_PRIVATE, fh, 0);
-	if (map == MAP_FAILED)
+	/* from http://osdir.com/ml/guile-devel-gnu/2009-04/msg00008.html */
+
+	hFile = (HANDLE)_get_osfhandle(fh);
+	if (hFile == INVALID_HANDLE_VALUE)
+	{
+		return;
+	}
+
+	/* Create mapping object */
+	hMapFile = CreateFileMapping(hFile, NULL, PAGE_READONLY, 0, 0, NULL);
+	if (hMapFile == INVALID_HANDLE_VALUE)
+	{
 		return;
+	}
+
+	/* Select which portions of the file we need (entire file) */
+	map = (char *)MapViewOfFile(hMapFile, FILE_MAP_ALL_ACCESS, 0, 0, 0);
+
+	if (map == NULL)
+	{
+		CloseHandle(hMapFile);
+		return;
+	}
+	/*map = mmap (NULL, statbuf.st_size, PROT_READ, MAP_PRIVATE, fh, 0);
+	if (map == MAP_FAILED)
+		return;*/
 
 	end_map = map + statbuf.st_size;
 	
@@ -349,7 +372,9 @@
 		/*EMIT_SIGNAL (XP_TE_GENMSG, sess, "*", buf, NULL, NULL, NULL, 0);*/
 	}
 
-	munmap (map, statbuf.st_size);
+	/* munmap (map, statbuf.st_size); */
+	CloseHandle(hMapFile);
+	CloseHandle(hFile);
 	close (fh);
 }
 
diff -Naur xchat-wdk.orig/src/common/util.c xchat-wdk/src/common/util.c
--- xchat-wdk.orig/src/common/util.c	2008-02-07 02:50:37 +0100
+++ xchat-wdk/src/common/util.c	2010-03-30 03:24:31 +0200
@@ -17,10 +17,11 @@
  */
 
 #define __APPLE_API_STRICT_CONFORMANCE
+#define _WINSOCK2API_
+#define _WS2TCPIP_H_
 
 #define _FILE_OFFSET_BITS 64
 #include <stdio.h>
-#include <unistd.h>
 #include <string.h>
 #include <stdlib.h>
 #include <sys/types.h>
@@ -35,7 +36,7 @@
 #include <sys/utsname.h>
 #endif
 #include <fcntl.h>
-#include <dirent.h>
+#include "dirent.h"
 #include <errno.h>
 #include "xchat.h"
 #include "xchatc.h"
@@ -54,9 +55,11 @@
 #include <socks.h>
 #endif
 
+#ifndef ENABLE_NLS
 #ifndef HAVE_SNPRINTF
 #define snprintf g_snprintf
 #endif
+#endif
 
 #ifdef USE_DEBUG
 
@@ -631,22 +634,32 @@
 	OSVERSIONINFO osvi;
 	SYSTEM_INFO si;
 	double mhz;
+	int cpu_arch;
 
 	osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
 	GetVersionEx (&osvi);
 	GetSystemInfo (&si);
 
+	if (si.wProcessorArchitecture == 9)
+	{
+		cpu_arch = 64;
+	}
+	else
+	{
+		cpu_arch = 86;
+	}
+
 	mhz = get_mhz ();
 	if (mhz)
 	{
 		double cpuspeed = ( mhz > 1000 ) ? mhz / 1000 : mhz;
 		const char *cpuspeedstr = ( mhz > 1000 ) ? "GHz" : "MHz";
-		sprintf (verbuf, "Windows %ld.%ld [i%d86/%.2f%s]",
-					osvi.dwMajorVersion, osvi.dwMinorVersion, si.wProcessorLevel, 
+		sprintf (verbuf, "Windows %ld.%ld [x%d/%.2f%s]",
+					osvi.dwMajorVersion, osvi.dwMinorVersion, cpu_arch, 
 					cpuspeed, cpuspeedstr);
 	} else
-		sprintf (verbuf, "Windows %ld.%ld [i%d86]",
-			osvi.dwMajorVersion, osvi.dwMinorVersion, si.wProcessorLevel);
+		sprintf (verbuf, "Windows %ld.%ld [x%d]",
+			osvi.dwMajorVersion, osvi.dwMinorVersion, cpu_arch);
 
 	return verbuf;
 }
diff -Naur xchat-wdk.orig/src/common/xchat.c xchat-wdk/src/common/xchat.c
--- xchat-wdk.orig/src/common/xchat.c	2008-06-08 09:58:58 +0200
+++ xchat-wdk/src/common/xchat.c	2010-03-29 12:59:15 +0200
@@ -22,7 +22,6 @@
 #include <time.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <unistd.h>
 
 #define WANTSOCKET
 #include "inet.h"
diff -Naur xchat-wdk.orig/src/common/xchat.h xchat-wdk/src/common/xchat.h
--- xchat-wdk.orig/src/common/xchat.h	2008-08-29 12:59:11 +0200
+++ xchat-wdk/src/common/xchat.h	2010-03-30 03:24:19 +0200
@@ -12,12 +12,14 @@
 
 #include "history.h"
 
+#ifndef ENABLE_NLS
 #ifndef HAVE_SNPRINTF
 #define snprintf g_snprintf
 #endif
 
 #ifndef HAVE_VSNPRINTF
-#define vsnprintf g_vsnprintf
+#define vsnprintf _vsnprintf
+#endif
 #endif
 
 #ifdef USE_DEBUG
@@ -58,7 +60,7 @@
 
 #ifdef WIN32						/* for win32 */
 #define OFLAGS O_BINARY
-#define sleep(t) _sleep(t*1000)
+#define sleep(t) Sleep(t*1000)
 #include <direct.h>
 #define	F_OK	0
 #define	X_OK	1
diff -Naur xchat-wdk.orig/src/fe-gtk/banlist.c xchat-wdk/src/fe-gtk/banlist.c
--- xchat-wdk.orig/src/fe-gtk/banlist.c	2008-09-01 11:28:58 +0200
+++ xchat-wdk/src/fe-gtk/banlist.c	2010-03-29 12:59:40 +0200
@@ -21,7 +21,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <unistd.h>
 #include <fcntl.h>
 #include <time.h>
 
diff -Naur xchat-wdk.orig/src/fe-gtk/chanlist.c xchat-wdk/src/fe-gtk/chanlist.c
--- xchat-wdk.orig/src/fe-gtk/chanlist.c	2008-02-24 04:46:02 +0100
+++ xchat-wdk/src/fe-gtk/chanlist.c	2010-03-29 12:59:37 +0200
@@ -19,7 +19,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <unistd.h>
 #include <fcntl.h>
 #include <time.h>
 
diff -Naur xchat-wdk.orig/src/fe-gtk/editlist.c xchat-wdk/src/fe-gtk/editlist.c
--- xchat-wdk.orig/src/fe-gtk/editlist.c	2006-03-13 09:33:45 +0100
+++ xchat-wdk/src/fe-gtk/editlist.c	2010-03-29 12:59:34 +0200
@@ -19,7 +19,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <unistd.h>
 #include <fcntl.h>
 #include <sys/types.h>
 #include <sys/stat.h>
diff -Naur xchat-wdk.orig/src/fe-gtk/fe-gtk.c xchat-wdk/src/fe-gtk/fe-gtk.c
--- xchat-wdk.orig/src/fe-gtk/fe-gtk.c	2008-02-29 03:19:00 +0100
+++ xchat-wdk/src/fe-gtk/fe-gtk.c	2010-03-30 04:22:55 +0200
@@ -21,7 +21,6 @@
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
-#include <unistd.h>
 
 #include "fe-gtk.h"
 
@@ -34,6 +33,8 @@
 #include <gtk/gtkmessagedialog.h>
 #include <gtk/gtkversion.h>
 
+#include <gdk/gdkwin32.h>
+
 #include "../common/xchat.h"
 #include "../common/fe.h"
 #include "../common/util.h"
@@ -41,6 +42,7 @@
 #include "../common/cfgfiles.h"
 #include "../common/xchatc.h"
 #include "../common/plugin.h"
+#include "../common/server.h"
 #include "gtkutil.h"
 #include "maingui.h"
 #include "pixmaps.h"
@@ -351,6 +353,7 @@
 static int
 fe_idle (gpointer data)
 {
+	/* disable tray icon
 	session *sess = sess_list->data;
 
 	plugin_add (sess, NULL, NULL, tray_plugin_init, tray_plugin_deinit, NULL, FALSE);
@@ -358,7 +361,7 @@
 	if (arg_minimize == 1)
 		gtk_window_iconify (GTK_WINDOW (sess->gui->window));
 	else if (arg_minimize == 2)
-		tray_toggle_visibility (FALSE);
+		tray_toggle_visibility (FALSE);*/
 
 	return 0;
 }
diff -Naur xchat-wdk.orig/src/fe-gtk/fe-gtk.h xchat-wdk/src/fe-gtk/fe-gtk.h
--- xchat-wdk.orig/src/fe-gtk/fe-gtk.h	2008-06-08 09:58:58 +0200
+++ xchat-wdk/src/fe-gtk/fe-gtk.h	2010-03-29 17:52:49 +0200
@@ -4,7 +4,7 @@
 /* If you're compiling this for Windows, your release is un-official
  * and not condoned. Please don't use the XChat name. Call it YChat
  * or make up your own name! */
-#define DISPLAY_NAME "YChat"
+#define DISPLAY_NAME "XChat-WDK"
 #else
 #define DISPLAY_NAME "XChat"
 #endif
diff -Naur xchat-wdk.orig/src/fe-gtk/fkeys.c xchat-wdk/src/fe-gtk/fkeys.c
--- xchat-wdk.orig/src/fe-gtk/fkeys.c	2008-02-24 06:09:34 +0100
+++ xchat-wdk/src/fe-gtk/fkeys.c	2010-03-29 12:59:56 +0200
@@ -20,7 +20,6 @@
 #include <stdlib.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <unistd.h>
 #include <string.h>
 #include <fcntl.h>
 #include <ctype.h>
diff -Naur xchat-wdk.orig/src/fe-gtk/gtkutil.c xchat-wdk/src/fe-gtk/gtkutil.c
--- xchat-wdk.orig/src/fe-gtk/gtkutil.c	2009-07-18 14:38:10 +0200
+++ xchat-wdk/src/fe-gtk/gtkutil.c	2010-03-29 12:59:54 +0200
@@ -22,7 +22,6 @@
 #include <stdarg.h>
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <unistd.h>
 #include <fcntl.h>
 #include "fe-gtk.h"
 
diff -Naur xchat-wdk.orig/src/fe-gtk/joind.c xchat-wdk/src/fe-gtk/joind.c
--- xchat-wdk.orig/src/fe-gtk/joind.c	2006-12-26 05:56:55 +0100
+++ xchat-wdk/src/fe-gtk/joind.c	2010-03-29 13:00:16 +0200
@@ -9,7 +9,6 @@
 
 #include <sys/types.h>
 #include <sys/stat.h>
-#include <unistd.h>
 #include <string.h>
 #include <stdio.h>
 
diff -Naur xchat-wdk.orig/src/fe-gtk/makefile.mak xchat-wdk/src/fe-gtk/makefile.mak
--- xchat-wdk.orig/src/fe-gtk/makefile.mak	1970-01-01 01:00:00 +0100
+++ xchat-wdk/src/fe-gtk/makefile.mak	2010-03-30 05:32:43 +0200
@@ -0,0 +1,37 @@
+include "..\makeinc.mak"
+
+!ifdef x64
+MACHINE_FLAG = /MACHINE:X64
+!else
+MACHINE_FLAG = /MACHINE:X86
+!endif
+
+COMLIB = ..\common\xchatcommon.lib
+PROG = xchat.exe
+
+all: $(PROG)
+
+mmx_cmod.o: mmx_cmod.S
+	gcc -DUNDERSCORE_SYMBOLS -c mmx_cmod.S
+
+.c.obj:
+	$(CC) $(CFLAGS) $(GLIB) $(GTK) /c $<
+
+$(PROG): $(FEGTK_OBJECTS) $(COMLIB) xchat-icon.obj
+	$(LINK) /out:$(PROG) /SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup $(LDFLAGS) $(FEGTK_OBJECTS) $(COMLIB) xchat-icon.obj
+	@dir $(PROG)
+
+xchat.rc:
+	echo XC_ICON ICON "../../xchat.ico" > xchat.rc
+
+xchat.res: xchat.rc ../../xchat.ico
+	rc /r xchat.rc
+
+xchat-icon.obj: xchat.res
+	cvtres /NOLOGO $(MACHINE_FLAG) /OUT:xchat-icon.obj xchat.res
+
+clean:
+	del *.obj
+	del $(PROG)
+	del xchat.rc
+	del xchat.RES
diff -Naur xchat-wdk.orig/src/fe-gtk/menu.c xchat-wdk/src/fe-gtk/menu.c
--- xchat-wdk.orig/src/fe-gtk/menu.c	2008-06-10 14:05:00 +0200
+++ xchat-wdk/src/fe-gtk/menu.c	2010-03-29 13:00:13 +0200
@@ -22,7 +22,6 @@
 #include <stdlib.h>
 #include <fcntl.h>
 #include <string.h>
-#include <unistd.h>
 
 #ifdef WIN32
 #include <windows.h>
diff -Naur xchat-wdk.orig/src/fe-gtk/palette.c xchat-wdk/src/fe-gtk/palette.c
--- xchat-wdk.orig/src/fe-gtk/palette.c	2006-03-13 09:33:45 +0100
+++ xchat-wdk/src/fe-gtk/palette.c	2010-03-29 13:00:11 +0200
@@ -20,7 +20,6 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <unistd.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
diff -Naur xchat-wdk.orig/src/fe-gtk/plugin-tray.c xchat-wdk/src/fe-gtk/plugin-tray.c
--- xchat-wdk.orig/src/fe-gtk/plugin-tray.c	2008-08-29 12:59:11 +0200
+++ xchat-wdk/src/fe-gtk/plugin-tray.c	2010-03-29 13:00:32 +0200
@@ -1,7 +1,6 @@
 /* Copyright (C) 2006-2007 Peter Zelezny. */
 
 #include <string.h>
-#include <unistd.h>
 #include "../common/xchat-plugin.h"
 #include "../common/xchat.h"
 #include "../common/xchatc.h"
diff -Naur xchat-wdk.orig/src/fe-gtk/rawlog.c xchat-wdk/src/fe-gtk/rawlog.c
--- xchat-wdk.orig/src/fe-gtk/rawlog.c	2008-02-24 06:09:34 +0100
+++ xchat-wdk/src/fe-gtk/rawlog.c	2010-03-29 13:00:30 +0200
@@ -21,7 +21,6 @@
 #include <stdio.h>
 #include <string.h>
 #include <fcntl.h>
-#include <unistd.h>
 #include <stdlib.h>
 
 #include "fe-gtk.h"
diff -Naur xchat-wdk.orig/src/fe-gtk/sexy-spell-entry.c xchat-wdk/src/fe-gtk/sexy-spell-entry.c
--- xchat-wdk.orig/src/fe-gtk/sexy-spell-entry.c	2006-07-17 07:51:02 +0200
+++ xchat-wdk/src/fe-gtk/sexy-spell-entry.c	2010-03-29 14:42:33 +0200
@@ -31,6 +31,20 @@
 /*#include "gtkspell-iso-codes.h"
 #include "sexy-marshal.h"*/
 
+/* workaround for ssize_t in VS 
+   from krb/include/win-mac.h */
+#ifndef SSIZE_T_DEFINED
+#ifdef ssize_t
+#undef ssize_t
+#endif
+#ifdef _WIN64
+typedef __int64          ssize_t;
+#else
+typedef _W64 int         ssize_t;
+#endif
+#define SSIZE_T_DEFINED
+#endif
+
 /*
  * Bunch of poop to make enchant into a runtime dependency rather than a
  * compile-time dependency.  This makes it so I don't have to hear the
diff -Naur xchat-wdk.orig/src/fe-gtk/xtext.c xchat-wdk/src/fe-gtk/xtext.c
--- xchat-wdk.orig/src/fe-gtk/xtext.c	2008-08-29 13:24:17 +0200
+++ xchat-wdk/src/fe-gtk/xtext.c	2010-03-29 13:00:27 +0200
@@ -42,7 +42,6 @@
 #include <ctype.h>
 #include <stdlib.h>
 #include <time.h>
-#include <unistd.h>
 #include <gtk/gtkmain.h>
 #include <gtk/gtksignal.h>
 #include <gtk/gtkselection.h>
diff -Naur xchat-wdk.orig/src/makefile.mak xchat-wdk/src/makefile.mak
--- xchat-wdk.orig/src/makefile.mak	1970-01-01 01:00:00 +0100
+++ xchat-wdk/src/makefile.mak	2010-03-29 22:22:00 +0200
@@ -0,0 +1,18 @@
+all:
+	copy ..\plugins\xchat-plugin.h common
+	@cd pixmaps
+	@-$(MAKE) /NOLOGO -f makefile.mak $@
+	@cd ..\common
+	@-$(MAKE) /NOLOGO -f makefile.mak $@
+	@cd ..\fe-gtk
+	@-$(MAKE) /NOLOGO -f makefile.mak $@
+
+clean:
+	del common\*.obj
+	del common\xchatcommon.lib
+	del fe-gtk\*.obj
+	del fe-gtk\mmx_cmod.o
+	del fe-gtk\xchat.exe
+	del fe-gtk\xchat.rc
+	del fe-gtk\xchat.RES
+	del pixmaps\*.h
diff -Naur xchat-wdk.orig/src/makeinc.mak xchat-wdk/src/makeinc.mak
--- xchat-wdk.orig/src/makeinc.mak	1970-01-01 01:00:00 +0100
+++ xchat-wdk/src/makeinc.mak	2010-03-30 05:40:26 +0200
@@ -0,0 +1,125 @@
+#uncomment this to have an x64 build
+#x64 = YES
+
+!ifdef x64
+#############################################################
+#x64 config
+GLIB = -Ic:/mozilla-build/build/xchat-dev64/include/glib-2.0 -Ic:/mozilla-build/build/xchat-dev64/lib/glib-2.0/include
+GTK = -Ic:/mozilla-build/build/xchat-dev64/include/gtk-2.0 -Ic:/mozilla-build/build/xchat-dev64/lib/gtk-2.0/include -Ic:/mozilla-build/build/xchat-dev64/include/atk-1.0 -Ic:/mozilla-build/build/xchat-dev64/include/cairo -Ic:/mozilla-build/build/xchat-dev64/include/pango-1.0 -Ic:/mozilla-build/build/xchat-dev64/include/glib-2.0 -Ic:/mozilla-build/build/xchat-dev64/lib/glib-2.0/include -Ic:/mozilla-build/build/xchat-dev64/include/freetype2 -Ic:/mozilla-build/build/xchat-dev64/include -Ic:/mozilla-build/build/xchat-dev64/include/libpng14
+LIBS = /libpath:c:/mozilla-build/build/xchat-dev64/lib gtk-win32-2.0.lib gdk-win32-2.0.lib atk-1.0.lib gio-2.0.lib gdk_pixbuf-2.0.lib pangowin32-1.0.lib gdi32.lib pangocairo-1.0.lib pango-1.0.lib cairo.lib gobject-2.0.lib gmodule-2.0.lib glib-2.0.lib intl.lib
+
+LDFLAGS = $(LIBS) /NOLOGO msvcrt_win2003.obj
+
+PERLPATH = c:\mozilla-build\perl-5.10-x64\lib\CORE
+PYTHONPATH = c:\mozilla-build\python-2.6-x64
+TCLPATH = c:\mozilla-build\tcl-8.6-x64
+!else
+#############################################################
+#x86 config
+GLIB = -Ic:/mozilla-build/build/xchat-dev32/include/glib-2.0 -Ic:/mozilla-build/build/xchat-dev32/lib/glib-2.0/include
+GTK = -Ic:/mozilla-build/build/xchat-dev32/include/gtk-2.0 -Ic:/mozilla-build/build/xchat-dev32/lib/gtk-2.0/include -Ic:/mozilla-build/build/xchat-dev32/include/atk-1.0 -Ic:/mozilla-build/build/xchat-dev32/include/cairo -Ic:/mozilla-build/build/xchat-dev32/include/pango-1.0 -Ic:/mozilla-build/build/xchat-dev32/include/glib-2.0 -Ic:/mozilla-build/build/xchat-dev32/lib/glib-2.0/include -Ic:/mozilla-build/build/xchat-dev32/include/freetype2 -Ic:/mozilla-build/build/xchat-dev32/include -Ic:/mozilla-build/build/xchat-dev32/include/libpng14
+LIBS = /libpath:c:/mozilla-build/build/xchat-dev32/lib gtk-win32-2.0.lib gdk-win32-2.0.lib atk-1.0.lib gio-2.0.lib gdk_pixbuf-2.0.lib pangowin32-1.0.lib gdi32.lib pangocairo-1.0.lib pango-1.0.lib cairo.lib gobject-2.0.lib gmodule-2.0.lib glib-2.0.lib intl.lib
+
+LDFLAGS = $(LIBS) /NOLOGO msvcrt_winxp.obj
+
+PERLPATH = c:\mozilla-build\perl-5.10-x86\lib\CORE
+PYTHONPATH = c:\mozilla-build\python-2.6-x86
+TCLPATH = c:\mozilla-build\tcl-8.6-x86
+
+MMX = YES
+!endif
+#############################################################
+
+PERLLIB = perl510
+PERLOUTPUT = xcperl.dll
+
+PYTHONLIB = python26
+PYTHONOUTPUT = xcpython.dll
+
+TCLLIB = tcl86
+TCLOUTPUT = xctcl.dll
+
+#OPENSSL = YES
+IPV6 = YES
+
+CFLAGS = /Ox
+
+CC = cl
+LINK = link
+CFLAGS = $(CFLAGS) -Dstrcasecmp=stricmp -Dstrncasecmp=strnicmp -Dstrtoull=_strtoui64 /MD /nologo /DWIN32 /DG_DISABLE_CAST_CHECKS
+LIBS = $(LIBS) gdi32.lib shell32.lib user32.lib advapi32.lib imm32.lib ole32.lib winmm.lib
+
+!ifdef IPV6
+CFLAGS = $(CFLAGS) -DUSE_IPV6
+LIBS = $(LIBS) ws2_32.lib
+!else
+LIBS = $(LIBS) wsock32.lib
+!endif
+
+!ifdef OPENSSL
+CFLAGS = $(CFLAGS) /DUSE_OPENSSL
+LIBS = $(LIBS) libeay32.lib ssleay32.lib
+SSLOBJ = ssl.obj
+!endif
+
+COMMON_OBJECTS = \
+cfgfiles.obj \
+chanopt.obj \
+ctcp.obj \
+dcc.obj \
+history.obj \
+identd.obj \
+ignore.obj \
+inbound.obj \
+modes.obj \
+network.obj \
+notify.obj \
+outbound.obj \
+plugin.obj \
+plugin-timer.obj \
+proto-irc.obj \
+server.obj \
+servlist.obj \
+$(SSLOBJ) \
+text.obj \
+tree.obj \
+url.obj \
+userlist.obj \
+util.obj \
+xchat.obj
+
+FEGTK_OBJECTS = \
+about.obj \
+ascii.obj \
+banlist.obj \
+chanlist.obj \
+chanview.obj \
+custom-list.obj \
+dccgui.obj \
+editlist.obj \
+fe-gtk.obj \
+fkeys.obj \
+gtkutil.obj \
+ignoregui.obj \
+joind.obj \
+maingui.obj \
+menu.obj \
+notifygui.obj \
+palette.obj \
+pixmaps.obj \
+plugingui.obj \
+plugin-tray.obj \
+rawlog.obj \
+search.obj \
+servlistgui.obj \
+setup.obj \
+sexy-spell-entry.obj \
+textgui.obj \
+urlgrab.obj \
+userlistgui.obj \
+xtext.obj
+
+!ifdef MMX
+FEGTK_OBJECTS = $(FEGTK_OBJECTS) mmx_cmod.o
+CFLAGS = $(CFLAGS) -DUSE_MMX
+!endif
diff -Naur xchat-wdk.orig/src/pixmaps/makefile.mak xchat-wdk/src/pixmaps/makefile.mak
--- xchat-wdk.orig/src/pixmaps/makefile.mak	1970-01-01 01:00:00 +0100
+++ xchat-wdk/src/pixmaps/makefile.mak	2010-03-29 13:15:26 +0200
@@ -0,0 +1,18 @@
+CONV = gdk-pixbuf-csource
+
+LIST =	bookpng book.png \
+			hoppng hop.png \
+			oppng op.png \
+			purplepng purple.png \
+			redpng red.png \
+			trayfilepng fileoffer.png \
+			trayhilightpng highlight.png \
+			traymsgpng message.png \
+			voicepng voice.png \
+			xchatpng ..\..\xchat.png
+
+all: 
+	$(CONV) --build-list $(LIST) > inline_pngs.h
+
+clean:
+	del *.h