Trac is being migrated to new services! Issues can be found in our new YouTrack instance and WIKI pages can be found on our website.

BuildingWinNSS: nss-wdk.patch

File nss-wdk.patch, 9.1 KB (added by datallah, 11 years ago)

Local copy of ​https://github.com/hexchat/hexchat/blob/master/win32/ext/nss-wdk/nss-wdk.patch

  • mozilla/dbm/include/mcom_db.h

    diff -ru nss-3.14.3.orig/mozilla/dbm/include/mcom_db.h nss-3.14.3/mozilla/dbm/include/mcom_db.h
    old new  
    3535#ifndef _DB_H_
    3636#define _DB_H_
    3737
     38#ifdef WINDDK_BUILD
     39#ifndef stat
     40#define stat _stat
     41#endif
     42#ifndef getpid
     43#define getpid GetCurrentProcessId
     44#endif
     45#endif
     46
    3847#ifndef macintosh
    3948#include <sys/types.h>
    4049#endif
  • mozilla/dbm/src/mktemp.c

    diff -ru nss-3.14.3.orig/mozilla/dbm/src/mktemp.c nss-3.14.3/mozilla/dbm/src/mktemp.c
    old new  
    4545#include <ctype.h>
    4646#include "mcom_db.h"
    4747
    48 #ifndef _WINDOWS
    49 #include <unistd.h>
    50 #endif
    51 
    5248#ifdef _WINDOWS
     49#ifndef WINDDK_BUILD
    5350#include <process.h>
     51#endif
    5452#include "winfile.h"
     53#else
     54#include <unistd.h>
    5555#endif
    5656
    5757static int _gettemp(char *path, register int *doopen, int extraFlags);
  • mozilla/nsprpub/config/config.mk

    diff -ru nss-3.14.3.orig/mozilla/nsprpub/config/config.mk nss-3.14.3/mozilla/nsprpub/config/config.mk
    old new  
    132132DEFINES += -DMOZ_UNICODE
    133133endif
    134134
     135ifdef WINDDK_BUILD
     136OS_CFLAGS += -DWINDDK_BUILD
     137ifdef USE_64
     138OS_LIBS += msvcrt_win2003.obj
     139else
     140OS_LIBS += msvcrt_winxp.obj
     141endif
     142endif
     143
    135144####################################################################
    136145#
    137146# Configuration for the release process
  • mozilla/nsprpub/pr/src/Makefile.in

    diff -ru nss-3.14.3.orig/mozilla/nsprpub/pr/src/Makefile.in nss-3.14.3/mozilla/nsprpub/pr/src/Makefile.in
    old new  
    167167ifdef NS_USE_GCC
    168168OS_LIBS         = -ladvapi32 -lwsock32 -lwinmm
    169169else
     170ifdef WINDDK_BUILD
     171ifdef USE_64
     172OS_LIBS = advapi32.lib wsock32.lib winmm.lib msvcrt_win2003.obj
     173else
     174OS_LIBS = advapi32.lib wsock32.lib winmm.lib msvcrt_winxp.obj
     175endif
     176else
    170177OS_LIBS         = advapi32.lib wsock32.lib winmm.lib
    171178endif
    172179endif
     180endif
    173181
    174182ifeq ($(OS_ARCH),WINCE)
    175183OS_LIBS         = ws2.lib
  • mozilla/nsprpub/pr/src/md/windows/ntmisc.c

    diff -ru nss-3.14.3.orig/mozilla/nsprpub/pr/src/md/windows/ntmisc.c nss-3.14.3/mozilla/nsprpub/pr/src/md/windows/ntmisc.c
    old new  
    593593     */
    594594    hasFdInheritBuffer = (attr && attr->fdInheritBuffer);
    595595    if ((envp == NULL) && hasFdInheritBuffer) {
     596#ifdef WINDDK_BUILD
     597        envp = getenv;
     598#else
    596599        envp = environ;
     600#endif
    597601    }
    598602
    599603    if (envp != NULL) {
  • mozilla/security/coreconf/arch.mk

    diff -ru nss-3.14.3.orig/mozilla/security/coreconf/arch.mk nss-3.14.3/mozilla/security/coreconf/arch.mk
    old new  
    235235# the uname.exe in the MSYS toolkit.
    236236#
    237237ifeq (MINGW32_NT,$(findstring MINGW32_NT,$(OS_ARCH)))
    238     OS_RELEASE := $(patsubst MINGW32_NT-%,%,$(OS_ARCH))
     238    ifdef WINDDK_BUILD
     239        ifdef USE_64
     240            OS_RELEASE := 5.2
     241        else
     242            OS_RELEASE := 5.1
     243        endif
     244    else
     245        OS_RELEASE := $(patsubst MINGW32_NT-%,%,$(OS_ARCH))
     246    endif
    239247    OS_ARCH = WINNT
    240248    USE_MSYS = 1
    241249    ifndef CPU_ARCH
  • mozilla/security/coreconf/WIN32.mk

    diff -ru nss-3.14.3.orig/mozilla/security/coreconf/WIN32.mk nss-3.14.3/mozilla/security/coreconf/WIN32.mk
    old new  
    114114    OS_CFLAGS += -W3 -nologo -D_CRT_SECURE_NO_WARNINGS \
    115115                 -D_CRT_NONSTDC_NO_WARNINGS
    116116    OS_DLLFLAGS += -nologo -DLL -SUBSYSTEM:WINDOWS
     117    ifdef WINDDK_BUILD
     118        OS_CFLAGS += -DWINDDK_BUILD
     119        ifdef USE_64
     120            OS_LIBS += msvcrt_win2003.obj
     121        else
     122            OS_LIBS += msvcrt_winxp.obj
     123        endif
     124    endif
    117125    ifeq ($(_MSC_VER),$(_MSC_VER_6))
    118126    ifndef MOZ_DEBUG_SYMBOLS
    119127        OS_DLLFLAGS += -PDB:NONE
  • mozilla/security/nss/cmd/httpserv/httpserv.c

    diff -ru nss-3.14.3.orig/mozilla/security/nss/cmd/httpserv/httpserv.c nss-3.14.3/mozilla/security/nss/cmd/httpserv/httpserv.c
    old new  
    1212#endif
    1313
    1414#if defined(_WINDOWS)
     15#ifdef WINDDK_BUILD
     16#include <windows.h>
     17#define getpid GetCurrentProcessId
     18#else
    1519#include <process.h>    /* for getpid() */
    1620#endif
     21#endif
    1722
    1823#include <signal.h>
    1924#include <stdlib.h>
  • mozilla/security/nss/cmd/platlibs.mk

    diff -ru nss-3.14.3.orig/mozilla/security/nss/cmd/platlibs.mk nss-3.14.3/mozilla/security/nss/cmd/platlibs.mk
    old new  
    195195endif
    196196
    197197JAR_LIBS = $(DIST)/lib/$(LIB_PREFIX)jar.$(LIB_SUFFIX)
     198
     199ifdef WINDDK_BUILD
     200ifdef USE_64
     201OS_LIBS += msvcrt_win2003.obj
     202else
     203OS_LIBS += msvcrt_winxp.obj
     204endif
     205endif
  • mozilla/security/nss/cmd/selfserv/selfserv.c

    diff -ru nss-3.14.3.orig/mozilla/security/nss/cmd/selfserv/selfserv.c nss-3.14.3/mozilla/security/nss/cmd/selfserv/selfserv.c
    old new  
    1818#endif
    1919
    2020#if defined(_WINDOWS)
     21#ifdef WINDDK_BUILD
     22#include <windows.h>
     23#define getpid GetCurrentProcessId
     24#else
    2125#include <process.h>    /* for getpid() */
    2226#endif
     27#endif
    2328
    2429#include <signal.h>
    2530#include <stdlib.h>
  • mozilla/security/nss/lib/freebl/mpi/mpcpucache.c

    diff -ru nss-3.14.3.orig/mozilla/security/nss/lib/freebl/mpi/mpcpucache.c nss-3.14.3/mozilla/security/nss/lib/freebl/mpi/mpcpucache.c
    old new  
    4747
    4848#elif defined(_MSC_VER)
    4949
     50#ifdef WINDDK_BUILD
     51#include <ntddk.h>
     52#else
    5053#include <intrin.h>
     54#endif
    5155
    5256void freebl_cpuid(unsigned long op, unsigned long *eax,
    5357           unsigned long *ebx, unsigned long *ecx,
  • mozilla/security/nss/lib/freebl/win_rand.c

    diff -ru nss-3.14.3.orig/mozilla/security/nss/lib/freebl/win_rand.c nss-3.14.3/mozilla/security/nss/lib/freebl/win_rand.c
    old new  
    1212#include <io.h>
    1313#include <sys/types.h>
    1414#include <sys/stat.h>
     15#ifdef WINDDK_BUILD
     16#ifndef stat
     17#define stat _stat
     18#endif
     19#endif
    1520#include <stdio.h>
    1621#include "prio.h"
    1722#include "prerror.h"
  • mozilla/security/nss/lib/softoken/legacydb/config.mk

    diff -ru nss-3.14.3.orig/mozilla/security/nss/lib/softoken/legacydb/config.mk nss-3.14.3/mozilla/security/nss/lib/softoken/legacydb/config.mk
    old new  
    5959ifeq ($(OS_TARGET),SunOS)
    6060OS_LIBS += -lbsm
    6161endif
     62
     63ifdef WINDDK_BUILD
     64ifdef USE_64
     65OS_LIBS += msvcrt_win2003.obj
     66else
     67OS_LIBS += msvcrt_winxp.obj
     68endif
     69endif
  • mozilla/security/nss/lib/sqlite/sqlite3.c

    diff -ru nss-3.14.3.orig/mozilla/security/nss/lib/sqlite/sqlite3.c nss-3.14.3/mozilla/security/nss/lib/sqlite/sqlite3.c
    old new  
    1420414204** localtime_s().
    1420514205*/
    1420614206#if !defined(HAVE_LOCALTIME_R) && !defined(HAVE_LOCALTIME_S) && \
    14207      defined(_MSC_VER) && defined(_CRT_INSECURE_DEPRECATE)
     14207     defined(_MSC_VER) && defined(_CRT_INSECURE_DEPRECATE) && \
     14208     !defined(WINDDK_BUILD)
    1420814209#define HAVE_LOCALTIME_S 1
    1420914210#endif
    1421014211
  • mozilla/security/nss/lib/ssl/sslimpl.h

    diff -ru nss-3.14.3.orig/mozilla/security/nss/lib/ssl/sslimpl.h nss-3.14.3/mozilla/security/nss/lib/ssl/sslimpl.h
    old new  
    17921792#if defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS)
    17931793#define SSL_GETPID getpid
    17941794#elif defined(WIN32)
     1795#ifdef WINDDK_BUILD
     1796#include <windows.h>
     1797#define SSL_GETPID GetCurrentProcessId
     1798#else
    17951799extern int __cdecl _getpid(void);
    17961800#define SSL_GETPID _getpid
     1801#endif
    17971802#else
    17981803#define SSL_GETPID() 0
    17991804#endif
  • mozilla/security/nss/lib/zlib/config.mk

    diff -ru nss-3.14.3.orig/mozilla/security/nss/lib/zlib/config.mk nss-3.14.3/mozilla/security/nss/lib/zlib/config.mk
    old new  
    1414PROGRAM        =
    1515
    1616EXTRA_LIBS     = $(LIBRARY)
     17
     18ifdef WINDDK_BUILD
     19ifdef USE_64
     20OS_LIBS += msvcrt_win2003.obj
     21else
     22OS_LIBS += msvcrt_winxp.obj
     23endif
     24endif
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!