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

« back to all changes in this revision

Viewing changes to mozilla/nsprpub/pr/src/md/unix/uxshm.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:
263
263
            ("_MD_DeleteSharedMemory(): ftok() failed on name: %s", ipcname));
264
264
    }
265
265
 
 
266
#ifdef SYMBIAN
 
267
    /* In Symbian OS the system imposed minimum is 1 byte, instead of ZERO */
 
268
    id = shmget( key, 1, 0 );
 
269
#else
266
270
    id = shmget( key, 0, 0 );
 
271
#endif
267
272
    if ( -1 == id ) {
268
273
        _PR_MD_MAP_DEFAULT_ERROR( errno );
269
274
        PR_LOG( _pr_shm_lm, PR_LOG_DEBUG, 
515
520
    ** make maxTries number of attempts at uniqueness in the filename
516
521
    */
517
522
    for ( incr = 0; incr < maxTries ; incr++ ) {
518
 
        genName = PR_smprintf( "%s/.NSPR-AFM-%d-%p.%d", 
 
523
#if defined(SYMBIAN)
 
524
#define NSPR_AFM_FILENAME "%s\\NSPR-AFM-%d-%p.%d"
 
525
#else
 
526
#define NSPR_AFM_FILENAME "%s/.NSPR-AFM-%d-%p.%d"
 
527
#endif
 
528
        genName = PR_smprintf( NSPR_AFM_FILENAME,
519
529
            dirName, (int) pid, tid, incr );
520
530
        if ( NULL == genName ) {
521
531
            PR_LOG( _pr_shma_lm, PR_LOG_DEBUG,
549
559
    }
550
560
 
551
561
    urc = unlink( genName );
 
562
#if defined(SYMBIAN) && defined(__WINS__)
 
563
    /* If it is being used by the system or another process, Symbian OS 
 
564
     * Emulator(WINS) considers this an error. */
 
565
    if ( -1 == urc && EACCES != errno ) {
 
566
#else
552
567
    if ( -1 == urc ) {
 
568
#endif
553
569
        _PR_MD_MAP_UNLINK_ERROR( errno );
554
570
        PR_LOG( _pr_shma_lm, PR_LOG_DEBUG,
555
571
            ("_md_OpenAnonFileMap(): failed on unlink(), errno: %d", errno));