Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
libuv
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
Hamidreza Anbaraki
libuv
Commits
224584c5
Commit
224584c5
authored
13 years ago
by
Ben Noordhuis
Browse files
Options
Downloads
Patches
Plain Diff
sunos: check that event ports supports fs watching
parent
26806e2b
No related branches found
Branches containing commit
Tags
node-v0.6.1
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/uv-private/uv-unix.h
+6
-2
6 additions, 2 deletions
include/uv-private/uv-unix.h
src/unix/internal.h
+14
-0
14 additions, 0 deletions
src/unix/internal.h
src/unix/sunos.c
+24
-2
24 additions, 2 deletions
src/unix/sunos.c
with
44 additions
and
4 deletions
include/uv-private/uv-unix.h
+
6
−
2
View file @
224584c5
...
...
@@ -204,10 +204,14 @@ typedef void* uv_lib_t;
#include
<sys/port.h>
#include
<port.h>
#define UV_FS_EVENT_PRIVATE_FIELDS \
#ifdef PORT_SOURCE_FILE
# define UV_FS_EVENT_PRIVATE_FIELDS \
ev_io event_watcher; \
uv_fs_event_cb cb; \
file_obj_t fo; \
file_obj_t fo;
#else
/* !PORT_SOURCE_FILE */
# define UV_FS_EVENT_PRIVATE_FIELDS
#endif
#else
...
...
This diff is collapsed.
Click to expand it.
src/unix/internal.h
+
14
−
0
View file @
224584c5
...
...
@@ -27,6 +27,12 @@
#include
<stddef.h>
/* offsetof */
#undef HAVE_FUTIMES
#undef HAVE_PIPE2
#undef HAVE_ACCEPT4
#undef HAVE_KQUEUE
#undef HAVE_PORTS_FS
#if defined(__linux__)
#include
<linux/version.h>
...
...
@@ -49,6 +55,14 @@
#endif
/* __linux__ */
#if defined(__sun)
# include <sys/port.h>
# include <port.h>
# ifdef PORT_SOURCE_FILE
# define HAVE_PORTS_FS 1
# endif
#endif
/* __sun */
#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun)
# define HAVE_FUTIMES 1
#endif
...
...
This diff is collapsed.
Click to expand it.
src/unix/sunos.c
+
24
−
2
View file @
224584c5
...
...
@@ -30,10 +30,13 @@
#include
<sys/loadavg.h>
#include
<sys/time.h>
#include
<sys/port.h>
#include
<unistd.h>
#include
<kstat.h>
#include
<port.h>
#if HAVE_PORTS_FS
# include <sys/port.h>
# include <port.h>
#endif
uint64_t
uv_hrtime
()
{
...
...
@@ -85,6 +88,7 @@ void uv_loadavg(double avg[3]) {
}
#if HAVE_PORTS_FS
static
void
uv__fs_event_rearm
(
uv_fs_event_t
*
handle
)
{
if
(
port_associate
(
handle
->
fd
,
PORT_SOURCE_FILE
,
...
...
@@ -173,3 +177,21 @@ void uv__fs_event_destroy(uv_fs_event_t* handle) {
handle
->
filename
=
NULL
;
handle
->
fo
.
fo_name
=
NULL
;
}
#else
/* !HAVE_PORTS_FS */
int
uv_fs_event_init
(
uv_loop_t
*
loop
,
uv_fs_event_t
*
handle
,
const
char
*
filename
,
uv_fs_event_cb
cb
,
int
flags
)
{
uv__set_sys_error
(
loop
,
ENOSYS
);
return
-
1
;
}
void
uv__fs_event_destroy
(
uv_fs_event_t
*
handle
)
{
assert
(
0
&&
"unreachable"
);
/* should never be called */
}
#endif
/* HAVE_PORTS_FS */
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