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.2.patch

File nss-wdk.2.patch, 8.8 KB (added by datallah, 10 years ago)

Patch for NSS 3.15.2

  • nspr/config/config.mk

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' nss-3.15.2/nspr/config/config.mk nss-3.15.2-wdk/nspr/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
  • nspr/pr/src/Makefile.in

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' nss-3.15.2/nspr/pr/src/Makefile.in nss-3.15.2-wdk/nspr/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
  • nspr/pr/src/md/windows/ntmisc.c

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' nss-3.15.2/nspr/pr/src/md/windows/ntmisc.c nss-3.15.2-wdk/nspr/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) {
  • nss/cmd/httpserv/httpserv.c

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' nss-3.15.2/nss/cmd/httpserv/httpserv.c nss-3.15.2-wdk/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>
  • nss/cmd/platlibs.mk

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' nss-3.15.2/nss/cmd/platlibs.mk nss-3.15.2-wdk/nss/cmd/platlibs.mk
    old new  
    222222endif
    223223
    224224JAR_LIBS = $(DIST)/lib/$(LIB_PREFIX)jar.$(LIB_SUFFIX)
     225
     226ifdef WINDDK_BUILD
     227ifdef USE_64
     228OS_LIBS += msvcrt_win2003.obj
     229else
     230OS_LIBS += msvcrt_winxp.obj
     231endif
     232endif
  • nss/cmd/selfserv/selfserv.c

    Only in nss-3.15.2-wdk/nss/cmd: platlibs.mk.orig
    diff -ur -xdist -x 'WINNT*_OPT.OBJ' nss-3.15.2/nss/cmd/selfserv/selfserv.c nss-3.15.2-wdk/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>
  • nss/coreconf/arch.mk

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' nss-3.15.2/nss/coreconf/arch.mk nss-3.15.2-wdk/nss/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
  • nss/coreconf/WIN32.mk

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' nss-3.15.2/nss/coreconf/WIN32.mk nss-3.15.2-wdk/nss/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
  • nss/lib/dbm/include/mcom_db.h

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' nss-3.15.2/nss/lib/dbm/include/mcom_db.h nss-3.15.2-wdk/nss/lib/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
  • nss/lib/dbm/src/mktemp.c

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' nss-3.15.2/nss/lib/dbm/src/mktemp.c nss-3.15.2-wdk/nss/lib/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);
  • nss/lib/freebl/mpi/mpcpucache.c

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' nss-3.15.2/nss/lib/freebl/mpi/mpcpucache.c nss-3.15.2-wdk/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,
  • nss/lib/freebl/win_rand.c

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' nss-3.15.2/nss/lib/freebl/win_rand.c nss-3.15.2-wdk/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"
  • nss/lib/softoken/legacydb/config.mk

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' nss-3.15.2/nss/lib/softoken/legacydb/config.mk nss-3.15.2-wdk/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
  • nss/lib/sqlite/sqlite3.c

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' nss-3.15.2/nss/lib/sqlite/sqlite3.c nss-3.15.2-wdk/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
  • nss/lib/ssl/sslimpl.h

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' nss-3.15.2/nss/lib/ssl/sslimpl.h nss-3.15.2-wdk/nss/lib/ssl/sslimpl.h
    old new  
    18551855#if defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS)
    18561856#define SSL_GETPID getpid
    18571857#elif defined(WIN32)
     1858#ifdef WINDDK_BUILD
     1859#include <windows.h>
     1860#define SSL_GETPID GetCurrentProcessId
     1861#else
    18581862extern int __cdecl _getpid(void);
    18591863#define SSL_GETPID _getpid
     1864#endif
    18601865#else
    18611866#define SSL_GETPID() 0
    18621867#endif
  • nss/lib/zlib/config.mk

    Only in nss-3.15.2-wdk/nss/lib/ssl: sslimpl.h.orig
    diff -ur -xdist -x 'WINNT*_OPT.OBJ' nss-3.15.2/nss/lib/zlib/config.mk nss-3.15.2-wdk/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!