diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-01-02 21:01:38 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-01-02 21:01:38 +0100 |
commit | f7d30133221896638f7bf4f66c504255c4b14f48 (patch) | |
tree | 5f3e07a049f388a3a309a615b8884318f6668a98 /nsprpub/pr/src/memory/prshm.c | |
parent | 26b297510a11758727438df4669357a2a2bc42ce (diff) | |
download | UXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar UXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar.gz UXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar.lz UXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar.xz UXP-f7d30133221896638f7bf4f66c504255c4b14f48.zip |
Issue #1338 - Part 1: Update NSPR to 4.24
Diffstat (limited to 'nsprpub/pr/src/memory/prshm.c')
-rw-r--r-- | nsprpub/pr/src/memory/prshm.c | 54 |
1 files changed, 29 insertions, 25 deletions
diff --git a/nsprpub/pr/src/memory/prshm.c b/nsprpub/pr/src/memory/prshm.c index 59237e6e7..7a587cd5d 100644 --- a/nsprpub/pr/src/memory/prshm.c +++ b/nsprpub/pr/src/memory/prshm.c @@ -20,39 +20,39 @@ extern PRLogModuleInfo *_pr_shm_lm; /* Posix implementation is in pr/src/md/unix/uxshm.c */ #elif defined PR_HAVE_WIN32_NAMED_SHARED_MEMORY /* Win32 implementation is in pr/src/md/windows/w32shm.c */ -#else -/* -** there is no named_shared_memory +#else +/* +** there is no named_shared_memory */ extern PRSharedMemory* _MD_OpenSharedMemory( const char *name, PRSize size, PRIntn flags, PRIntn mode ) { PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0); return NULL; -} +} extern void * _MD_AttachSharedMemory( PRSharedMemory *shm, PRIntn flags ) { PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0); return NULL; -} +} extern PRStatus _MD_DetachSharedMemory( PRSharedMemory *shm, void *addr ) { PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0); return PR_FAILURE; -} +} extern PRStatus _MD_CloseSharedMemory( PRSharedMemory *shm ) { PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0); return PR_FAILURE; -} +} extern PRStatus _MD_DeleteSharedMemory( const char *name ) { PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0); return PR_FAILURE; -} +} #endif /* HAVE_SYSV_NAMED_SHARED_MEMORY */ /* @@ -60,14 +60,16 @@ extern PRStatus _MD_DeleteSharedMemory( const char *name ) ** */ PR_IMPLEMENT( PRSharedMemory * ) - PR_OpenSharedMemory( - const char *name, - PRSize size, - PRIntn flags, - PRIntn mode +PR_OpenSharedMemory( + const char *name, + PRSize size, + PRIntn flags, + PRIntn mode ) { - if (!_pr_initialized) _PR_ImplicitInitialization(); + if (!_pr_initialized) { + _PR_ImplicitInitialization(); + } return( _PR_MD_OPEN_SHARED_MEMORY( name, size, flags, mode )); } /* end PR_OpenSharedMemory() */ @@ -76,9 +78,9 @@ PR_IMPLEMENT( PRSharedMemory * ) ** */ PR_IMPLEMENT( void * ) - PR_AttachSharedMemory( - PRSharedMemory *shm, - PRIntn flags +PR_AttachSharedMemory( + PRSharedMemory *shm, + PRIntn flags ) { return( _PR_MD_ATTACH_SHARED_MEMORY( shm, flags )); @@ -89,9 +91,9 @@ PR_IMPLEMENT( void * ) ** */ PR_IMPLEMENT( PRStatus ) - PR_DetachSharedMemory( - PRSharedMemory *shm, - void *addr +PR_DetachSharedMemory( + PRSharedMemory *shm, + void *addr ) { return( _PR_MD_DETACH_SHARED_MEMORY( shm, addr )); @@ -102,8 +104,8 @@ PR_IMPLEMENT( PRStatus ) ** */ PR_IMPLEMENT( PRStatus ) - PR_CloseSharedMemory( - PRSharedMemory *shm +PR_CloseSharedMemory( + PRSharedMemory *shm ) { return( _PR_MD_CLOSE_SHARED_MEMORY( shm )); @@ -114,11 +116,13 @@ PR_IMPLEMENT( PRStatus ) ** */ PR_EXTERN( PRStatus ) - PR_DeleteSharedMemory( - const char *name +PR_DeleteSharedMemory( + const char *name ) { - if (!_pr_initialized) _PR_ImplicitInitialization(); + if (!_pr_initialized) { + _PR_ImplicitInitialization(); + } return(_PR_MD_DELETE_SHARED_MEMORY( name )); } /* end PR_DestroySharedMemory() */ /* end prshm.c */ |