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

File nss-wdk-3.17.1.patch, 10.8 KB (added by datallah, 9 years ago)

Patch for 3.17.1

  • nspr/config/config.mk

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' -x '*.orig' nss-3.17.1.orig/nspr/config/config.mk nss-3.17.1/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/include/pratom.h

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' -x '*.orig' nss-3.17.1.orig/nspr/pr/include/pratom.h nss-3.17.1/nspr/pr/include/pratom.h
    old new  
    7878**    the macros and functions won't be compatible and can't be used
    7979**    interchangeably.
    8080*/
    81 #if defined(_WIN32) && !defined(_WIN32_WCE) && \
     81#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(WINDDK_BUILD) && \
    8282    (!defined(_MSC_VER) || (_MSC_VER >= 1310))
    8383
    8484#include <intrin.h>
  • nspr/pr/include/prbit.h

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' -x '*.orig' nss-3.17.1.orig/nspr/pr/include/prbit.h nss-3.17.1/nspr/pr/include/prbit.h
    old new  
    1313** Replace compare/jump/add/shift sequence with compiler built-in/intrinsic
    1414** functions.
    1515*/
    16 #if defined(_WIN32) && (_MSC_VER >= 1300) && \
     16#if defined(_WIN32) && (_MSC_VER >= 1300) && !defined(WINDDK_BUILD) && \
    1717    (defined(_M_IX86) || defined(_M_AMD64) || defined(_M_ARM))
    1818# include <intrin.h>
    1919# pragma  intrinsic(_BitScanForward,_BitScanReverse)
  • nspr/pr/src/Makefile.in

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' -x '*.orig' nss-3.17.1.orig/nspr/pr/src/Makefile.in nss-3.17.1/nspr/pr/src/Makefile.in
    old new  
    167167ifdef NS_USE_GCC
    168168OS_LIBS         = -ladvapi32 -lws2_32 -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 ws2_32.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' -x '*.orig' nss-3.17.1.orig/nspr/pr/src/md/windows/ntmisc.c nss-3.17.1/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' -x '*.orig' nss-3.17.1.orig/nss/cmd/httpserv/httpserv.c nss-3.17.1/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' -x '*.orig' nss-3.17.1.orig/nss/cmd/platlibs.mk nss-3.17.1/nss/cmd/platlibs.mk
    old new  
    218218endif
    219219
    220220JAR_LIBS = $(DIST)/lib/$(LIB_PREFIX)jar.$(LIB_SUFFIX)
     221
     222ifdef WINDDK_BUILD
     223ifdef USE_64
     224OS_LIBS += msvcrt_win2003.obj
     225else
     226OS_LIBS += msvcrt_winxp.obj
     227endif
     228endif
  • nss/cmd/selfserv/selfserv.c

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' -x '*.orig' nss-3.17.1.orig/nss/cmd/selfserv/selfserv.c nss-3.17.1/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' -x '*.orig' nss-3.17.1.orig/nss/coreconf/arch.mk nss-3.17.1/nss/coreconf/arch.mk
    old new  
    209209# the uname.exe in the MSYS toolkit.
    210210#
    211211ifeq (MINGW32_NT,$(findstring MINGW32_NT,$(OS_ARCH)))
    212     OS_RELEASE := $(patsubst MINGW32_NT-%,%,$(OS_ARCH))
     212    ifdef WINDDK_BUILD
     213        ifdef USE_64
     214            OS_RELEASE := 5.2
     215        else
     216            OS_RELEASE := 5.1
     217        endif
     218    else
     219        OS_RELEASE := $(patsubst MINGW32_NT-%,%,$(OS_ARCH))
     220    endif
    213221    OS_ARCH = WINNT
    214222    USE_MSYS = 1
    215223    ifndef CPU_ARCH
  • nss/coreconf/WIN32.mk

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' -x '*.orig' nss-3.17.1.orig/nss/coreconf/WIN32.mk nss-3.17.1/nss/coreconf/WIN32.mk
    old new  
    128128    OS_CFLAGS += -W3 -nologo -D_CRT_SECURE_NO_WARNINGS \
    129129                 -D_CRT_NONSTDC_NO_WARNINGS
    130130    OS_DLLFLAGS += -nologo -DLL -SUBSYSTEM:WINDOWS
     131    ifdef WINDDK_BUILD
     132        OS_CFLAGS += -DWINDDK_BUILD
     133        ifdef USE_64
     134            OS_LIBS += msvcrt_win2003.obj
     135        else
     136            OS_LIBS += msvcrt_winxp.obj
     137        endif
     138    endif
    131139    ifeq ($(_MSC_VER),$(_MSC_VER_6))
    132140    ifndef MOZ_DEBUG_SYMBOLS
    133141        OS_DLLFLAGS += -PDB:NONE
  • nss/lib/dbm/include/mcom_db.h

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

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' -x '*.orig' nss-3.17.1.orig/nss/lib/freebl/Makefile nss-3.17.1/nss/lib/freebl/Makefile
    old new  
    138138    # The Intel AES assembly code requires Visual C++ 2010.
    139139    # if $(_MSC_VER) >= 1600 (Visual C++ 2010)
    140140    ifeq ($(firstword $(sort $(_MSC_VER) 1600)),1600)
     141    ifndef WINDDK_BUILD
    141142        DEFINES += -DUSE_HW_AES -DINTEL_GCM
    142143        ASFILES += intel-aes-x86-masm.asm intel-gcm-x86-masm.asm
    143144        EXTRA_SRCS += intel-gcm-wrap.c
     
    145146            INTEL_GCM_CLANG_CL = 1
    146147        endif
    147148    endif
     149    endif
    148150endif
    149151else
    150152    # -DMP_NO_MP_WORD
     
    163165    # The Intel AES assembly code requires Visual C++ 2010 (10.0). The _xgetbv
    164166    # compiler intrinsic function requires Visual C++ 2010 (10.0) SP1.
    165167    ifeq ($(_MSC_VER_GE_10SP1),1)
     168    ifndef WINDDK_BUILD
    166169        DEFINES += -DUSE_HW_AES -DINTEL_GCM
    167170        ASFILES += intel-aes-x64-masm.asm intel-gcm-x64-masm.asm
    168171        EXTRA_SRCS += intel-gcm-wrap.c
    169172    endif
     173    endif
    170174    MPI_SRCS += mpi_amd64.c
    171175endif
    172176endif
  • nss/lib/freebl/mpi/mpcpucache.c

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' -x '*.orig' nss-3.17.1.orig/nss/lib/freebl/mpi/mpcpucache.c nss-3.17.1/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/softoken/legacydb/config.mk

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' -x '*.orig' nss-3.17.1.orig/nss/lib/softoken/legacydb/config.mk nss-3.17.1/nss/lib/softoken/legacydb/config.mk
    old new  
    5555        -lnspr4 \
    5656        $(NULL)
    5757endif
     58
     59ifdef WINDDK_BUILD
     60ifdef USE_64
     61OS_LIBS += msvcrt_win2003.obj
     62else
     63OS_LIBS += msvcrt_winxp.obj
     64endif
     65endif
  • nss/lib/sqlite/sqlite3.c

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' -x '*.orig' nss-3.17.1.orig/nss/lib/sqlite/sqlite3.c nss-3.17.1/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' -x '*.orig' nss-3.17.1.orig/nss/lib/ssl/sslimpl.h nss-3.17.1/nss/lib/ssl/sslimpl.h
    old new  
    19251925#if defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS)
    19261926#define SSL_GETPID getpid
    19271927#elif defined(WIN32)
     1928#ifdef WINDDK_BUILD
     1929#include <windows.h>
     1930#define SSL_GETPID GetCurrentProcessId
     1931#else
    19281932extern int __cdecl _getpid(void);
    19291933#define SSL_GETPID _getpid
     1934#endif
    19301935#else
    19311936#define SSL_GETPID() 0
    19321937#endif
  • nss/lib/zlib/config.mk

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' -x '*.orig' nss-3.17.1.orig/nss/lib/zlib/config.mk nss-3.17.1/nss/lib/zlib/config.mk
    old new  
    1818ifeq ($(OS_TARGET),Linux)
    1919DEFINES += -DHAVE_UNISTD_H
    2020endif
     21
     22ifdef WINDDK_BUILD
     23ifdef USE_64
     24OS_LIBS += msvcrt_win2003.obj
     25else
     26OS_LIBS += msvcrt_winxp.obj
     27endif
     28endif
     29
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!