Toggle navigation
Toggle navigation
This project
Loading...
Sign in
UT
/
clsync
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
redmine
2014-10-08 16:38:13 +0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
22cad276c691f775c77219895341843bb3d381ed
22cad276
1 parent
d4686535
Commented out posix-hacks.c on Linux
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
posix-hacks.c
posix-hacks.h
posix-hacks.c
View file @
22cad27
...
...
@@ -17,6 +17,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef __FreeBSD__
#define _GNU_SOURCE
#include <stdio.h>
...
...
@@ -85,8 +87,11 @@ int posixhacks_deinit() {
while
(
i
<
(
FOPEN_MAX
+
1
)
/
2
)
{
close
(
reserved_fd
[
(
i
<<
1
)
]);
close
(
reserved_fd
[
(
i
<<
1
)
+
1
]);
i
++
;
}
return
0
;
}
#endif
...
...
posix-hacks.h
View file @
22cad27
...
...
@@ -17,14 +17,20 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __POSIX_HACKS_C
# define fopen posixhacks_fopen
# define fdopen posixhacks_fdopen
# define fclose posixhacks_fclose
#endif
#ifdef __FreeBSD__
# ifndef __POSIX_HACKS_C
# define fopen posixhacks_fopen
# define fdopen posixhacks_fdopen
# define fclose posixhacks_fclose
# endif
extern
int
posixhacks_init
();
extern
FILE
*
posixhacks_fopen
(
const
char
*
path
,
const
char
*
mode
);
extern
int
posixhacks_fclose
(
FILE
*
fp
);
extern
int
posixhacks_deinit
();
#else
# define posixhacks_init() (0)
# define posixhacks_deinit() (0)
#endif
...
...
Please
register
or
login
to post a comment