nto.c (742B)
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 6 #include "primpl.h" 7 8 #include <setjmp.h> 9 10 /* Fake this out */ 11 int socketpair(int foo, int foo2, int foo3, int sv[2]) { 12 printf("error in socketpair\n"); 13 exit(-1); 14 } 15 16 void _MD_EarlyInit(void) {} 17 18 PRWord* _MD_HomeGCRegisters(PRThread* t, int isCurrent, int* np) { 19 #ifndef _PR_PTHREADS 20 if (isCurrent) { 21 (void)setjmp(CONTEXT(t)); 22 } 23 24 *np = sizeof(CONTEXT(t)) / sizeof(PRWord); 25 return (PRWord*)CONTEXT(t); 26 #else 27 *np = 0; 28 return NULL; 29 #endif 30 }