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
49ef7223
Commit
49ef7223
authored
22 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Use realpath_r for FreeBSD builds... appears to fail on rare occasions in
release builds.
parent
d24195c5
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/xpdev/dirwrap.h
+3
-2
3 additions, 2 deletions
src/xpdev/dirwrap.h
src/xpdev/threadwrap.c
+2
-1
2 additions, 1 deletion
src/xpdev/threadwrap.c
src/xpdev/threadwrap.h
+1
-1
1 addition, 1 deletion
src/xpdev/threadwrap.h
with
6 additions
and
4 deletions
src/xpdev/dirwrap.h
+
3
−
2
View file @
49ef7223
...
...
@@ -61,8 +61,9 @@ extern "C" {
#include
<glob.h>
/* POSIX.2 directory pattern matching function */
#define MKDIR(dir) mkdir(dir,0777)
#if defined(__OpenBSD__) && defined(_THREADWRAP_H)
/* realpath() not threadsafe on OpenBSD */
#if defined(BSD) && defined(_THREADWRAP_H)
/* realpath() not threadsafe on OpenBSD -or- FreeBSD */
/* (On FreeBSD it only fails in release builds! */
#define FULLPATH(a,r,l) realpath_r(r,a)
/* defined in threadwrap.c */
#else
#define FULLPATH(a,r,l) realpath(r,a)
...
...
This diff is collapsed.
Click to expand it.
src/xpdev/threadwrap.c
+
2
−
1
View file @
49ef7223
...
...
@@ -84,8 +84,9 @@ ulong _beginthread(void( *start_address )( void * )
/****************************************************************************/
/* Thread-safe (reentrant) version of realpath() - required for OpenBSD */
/* And for NON-DEBUG FreeBSD builds (on 4.7 anyways) */
/****************************************************************************/
#if defined(
__Open
BSD
__
)
#if defined(BSD)
char
*
realpath_r
(
const
char
*
pathname
,
char
*
resolvedname
)
{
static
pthread_mutex_t
mutex
=
PTHREAD_MUTEX_INITIALIZER
;
...
...
This diff is collapsed.
Click to expand it.
src/xpdev/threadwrap.h
+
1
−
1
View file @
49ef7223
...
...
@@ -56,7 +56,7 @@ extern "C" {
ulong
_beginthread
(
void
(
*
start_address
)(
void
*
)
,
unsigned
stack_size
,
void
*
arglist
);
#if defined(
__Open
BSD
__
)
/* thread-safe version of realpath for
Open
BSD */
#if defined(BSD)
/* thread-safe version of realpath for BSD */
char
*
realpath_r
(
const
char
*
pathname
,
char
*
resolvedname
);
#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