~ubuntu-branches/ubuntu/saucy/nspr/saucy-updates

« back to all changes in this revision

Viewing changes to mozilla/nsprpub/pr/tests/thrpool_server.c

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack
  • Date: 2009-08-10 11:34:26 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20090810113426-3uv4diflrkcbdimm
Tags: 4.8-0ubuntu1
* New upstream release: 4.8 (LP: #387812)
* adjust patches to changed upstreanm codebase
  - update debian/patches/99_configure.patch
* update shlibs symbols to include new API elements
  - update debian/libnspr4-0d.symbols

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
static char *program_name = NULL;
73
73
static void serve_client_write(void *arg);
74
74
 
75
 
#ifdef XP_MAC
76
 
#include "prlog.h"
77
 
#include "prsem.h"
78
 
int fprintf(FILE *stream, const char *fmt, ...)
79
 
{
80
 
    PR_LogPrint(fmt);
81
 
    return 0;
82
 
}
83
 
#define printf PR_LogPrint
84
 
extern void SetupMacPrintfLog(char *logFile);
85
 
#else
86
75
#include "obsolete/prsem.h"
87
 
#endif
88
76
 
89
77
#ifdef XP_PC
90
78
#define mode_t int
396
384
                int index = 0;
397
385
                char port[32];
398
386
        char path[1024 + sizeof("/thrpool_client")];
399
 
        (void)getcwd(path, sizeof(path));
 
387
 
 
388
        getcwd(path, sizeof(path));
 
389
 
400
390
        (void)strcat(path, "/thrpool_client");
401
391
#ifdef XP_PC
402
392
        (void)strcat(path, ".exe");
545
535
#define DEFAULT_MAX_THREADS                     100
546
536
#define DEFAULT_STACKSIZE                       (512 * 1024)
547
537
 
548
 
int
549
 
main(int argc, char **argv)
 
538
int main(int argc, char **argv)
550
539
{
551
540
        PRInt32 initial_threads = DEFAULT_INITIAL_THREADS;
552
541
        PRInt32 max_threads = DEFAULT_MAX_THREADS;
580
569
    PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
581
570
    PR_STDIO_INIT();
582
571
 
583
 
#ifdef XP_MAC
584
 
    SetupMacPrintfLog("socket.log");
585
 
#endif
586
572
    PR_SetConcurrency(4);
587
573
 
588
574
        tp = PR_CreateThreadPool(initial_threads, max_threads, stacksize);