~ubuntu-branches/ubuntu/quantal/nspr/quantal-security

« back to all changes in this revision

Viewing changes to mozilla/nsprpub/pr/src/md/windows/w32shm.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:
119
119
            sa.bInheritHandle = FALSE;
120
120
            lpSA = &sa;
121
121
        }
122
 
        shm->handle = CreateFileMapping(
 
122
#ifdef WINCE
 
123
        {
 
124
            /*
 
125
             * This is assuming that the name will never be larger than
 
126
             * MAX_PATH.  Should we dynamically allocate?
 
127
             */
 
128
            PRUnichar wideIpcName[MAX_PATH];
 
129
            MultiByteToWideChar(CP_ACP, 0, shm->ipcname, -1,
 
130
                                wideIpcName, MAX_PATH);
 
131
            shm->handle = CreateFileMappingW(
 
132
                (HANDLE)-1 ,
 
133
                lpSA,
 
134
                flProtect,
 
135
                dwHi,
 
136
                dwLo,
 
137
                wideIpcName);
 
138
        }
 
139
#else
 
140
        shm->handle = CreateFileMappingA(
123
141
            (HANDLE)-1 ,
124
142
            lpSA,
125
143
            flProtect,
126
144
            dwHi,
127
145
            dwLo,
128
146
            shm->ipcname);
 
147
#endif
129
148
        if (lpSA != NULL) {
130
149
            _PR_NT_FreeSecurityDescriptorACL(pSD, pACL);
131
150
        }
156
175
            }
157
176
        }
158
177
    } else {
 
178
#ifdef WINCE
 
179
        PR_SetError( PR_NOT_IMPLEMENTED_ERROR, 0 );
 
180
        shm->handle = NULL;  /* OpenFileMapping not supported */
 
181
#else
159
182
        shm->handle = OpenFileMapping( FILE_MAP_WRITE, TRUE, shm->ipcname );
 
183
#endif
160
184
        if ( NULL == shm->handle ) {
161
185
            _PR_MD_MAP_DEFAULT_ERROR( GetLastError());
162
186
            PR_LOG(_pr_shm_lm, PR_LOG_DEBUG,