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

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

Patch for NSS 3.16

  • nspr/config/config.mk

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' -x '*.orig' nss-3.16.vanilla/nspr/config/config.mk nss-3.16/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' -x '*.orig' nss-3.16.vanilla/nspr/pr/src/Makefile.in nss-3.16/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' -x '*.orig' nss-3.16.vanilla/nspr/pr/src/md/windows/ntmisc.c nss-3.16/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.16.vanilla/nss/cmd/httpserv/httpserv.c nss-3.16/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.16.vanilla/nss/cmd/platlibs.mk nss-3.16/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.16.vanilla/nss/cmd/selfserv/selfserv.c nss-3.16/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.16.vanilla/nss/coreconf/arch.mk nss-3.16/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.16.vanilla/nss/coreconf/WIN32.mk nss-3.16/nss/coreconf/WIN32.mk
    old new  
    115115    OS_CFLAGS += -W3 -nologo -D_CRT_SECURE_NO_WARNINGS \
    116116                 -D_CRT_NONSTDC_NO_WARNINGS
    117117    OS_DLLFLAGS += -nologo -DLL -SUBSYSTEM:WINDOWS
     118    ifdef WINDDK_BUILD
     119        OS_CFLAGS += -DWINDDK_BUILD
     120        ifdef USE_64
     121            OS_LIBS += msvcrt_win2003.obj
     122        else
     123            OS_LIBS += msvcrt_winxp.obj
     124        endif
     125    endif
    118126    ifeq ($(_MSC_VER),$(_MSC_VER_6))
    119127    ifndef MOZ_DEBUG_SYMBOLS
    120128        OS_DLLFLAGS += -PDB:NONE
  • nss/lib/dbm/include/mcom_db.h

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' -x '*.orig' nss-3.16.vanilla/nss/lib/dbm/include/mcom_db.h nss-3.16/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.16.vanilla/nss/lib/dbm/src/mktemp.c nss-3.16/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' -x '*.orig' nss-3.16.vanilla/nss/lib/freebl/mpi/mpcpucache.c nss-3.16/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.16.vanilla/nss/lib/softoken/legacydb/config.mk nss-3.16/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.16.vanilla/nss/lib/sqlite/sqlite3.c nss-3.16/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.16.vanilla/nss/lib/ssl/sslimpl.h nss-3.16/nss/lib/ssl/sslimpl.h
    old new  
    19211921#if defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS)
    19221922#define SSL_GETPID getpid
    19231923#elif defined(WIN32)
     1924#ifdef WINDDK_BUILD
     1925#include <windows.h>
     1926#define SSL_GETPID GetCurrentProcessId
     1927#else
    19241928extern int __cdecl _getpid(void);
    19251929#define SSL_GETPID _getpid
     1930#endif
    19261931#else
    19271932#define SSL_GETPID() 0
    19281933#endif
  • nss/lib/zlib/config.mk

    diff -ur -xdist -x 'WINNT*_OPT.OBJ' -x '*.orig' nss-3.16.vanilla/nss/lib/zlib/config.mk nss-3.16/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!