Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
8d7f02c2
Commit
8d7f02c2
authored
23 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Eliminated Win32 version of sem_getvalue (didn't work correctly).
Switched from #ifdef to #if defined.
parent
2434cd3f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/xpdev/threadwrap.h
+11
-11
11 additions, 11 deletions
src/xpdev/threadwrap.h
with
11 additions
and
11 deletions
src/xpdev/threadwrap.h
+
11
−
11
View file @
8d7f02c2
...
...
@@ -40,20 +40,20 @@
#include
"gen_defs.h"
/* HANDLE */
#ifdef
DLLEXPORT
#undef DLLEXPORT
#if
def
ined(
DLLEXPORT
)
#undef DLLEXPORT
#endif
#ifdef
DLLCALL
#undef DLLCALL
#if
def
ined(
DLLCALL
)
#undef DLLCALL
#endif
#ifdef
_WIN32
#ifdef
WRAPPER_DLL
#if
def
ined(
_WIN32
)
#if
def
ined(
WRAPPER_DLL
)
#define DLLEXPORT __declspec(dllexport)
#else
#define DLLEXPORT __declspec(dllimport)
#endif
#ifdef
__BORLANDC__
#if
def
ined(
__BORLANDC__
)
#define DLLCALL __stdcall
#else
#define DLLCALL
...
...
@@ -63,11 +63,11 @@
#define DLLCALL
#endif
#ifdef
__cplusplus
#if
def
ined(
__cplusplus
)
extern
"C"
{
#endif
#ifdef
__unix__
#if
def
ined(
__unix__
)
#include
<pthread.h>
/* POSIX threads and mutexes */
#include
<semaphore.h>
/* POSIX semaphores */
...
...
@@ -85,7 +85,7 @@ extern "C" {
#define sem_wait(psem) WaitForSingleObject(*(psem),INFINITE)
#define sem_post(psem) ReleaseSemaphore(*(psem),1,NULL)
#define sem_destroy(psem) CloseHandle(*(psem))
DLLEXPORT
int
DLLCALL
sem_getvalue
(
sem_t
*
,
int
*
val
);
/* No Win32 implementation for sem_getvalue() */
/* POSIX mutexes */
typedef
HANDLE
pthread_mutex_t
;
...
...
@@ -101,7 +101,7 @@ extern "C" {
#endif
#ifdef
__cplusplus
#if
def
ined(
__cplusplus
)
}
#endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment