summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root>2012-04-02 23:46:11 +0000
committerroot <root>2012-04-02 23:46:11 +0000
commit77cb55a8ee86104c6f3035bb8565e125fd59a3f3 (patch)
treefe1c893fe70212a9c8cd61ef4d493929e5ad3dea
parent895be78a9e5ecfd127a9c2e212956c0da179b553 (diff)
*** empty log message ***
-rw-r--r--Changes1
-rw-r--r--ev.38
-rw-r--r--ev.h6
-rw-r--r--ev.pod8
4 files changed, 19 insertions, 4 deletions
diff --git a/Changes b/Changes
index 34d7080..76e5c86 100644
--- a/Changes
+++ b/Changes
@@ -5,7 +5,6 @@ TODO: EV_STANDALONE == NO_HASSEL (do not use clock_gettime in ev_standalone)
TODO: document WSA_EV_USE_SOCKET in win32 part
TODO: ^ OR use WSASend/WSARecv on the handle, which always works
-TODO: use __OPTIMIZE__ or __OPTIMIZE_SIZE__?
- fix event_base_loop return code, add event_get_callback, event_base_new,
event_base_get_method calls to improve libevent 1.x emulation and add
diff --git a/ev.3 b/ev.3
index 36a39b5..81bc30b 100644
--- a/ev.3
+++ b/ev.3
@@ -4728,7 +4728,7 @@ backend, use this:
.Ve
.Sp
The actual value is a bitset, it can be a combination of the following
-values:
+values (by default, all of these are enabled):
.RS 4
.ie n .IP "1 \- faster/larger code" 4
.el .IP "\f(CW1\fR \- faster/larger code" 4
@@ -4741,6 +4741,9 @@ code size by roughly 30% on amd64).
When optimising for size, use of compiler flags such as \f(CW\*(C`\-Os\*(C'\fR with
gcc is recommended, as well as \f(CW\*(C`\-DNDEBUG\*(C'\fR, as libev contains a number of
assertions.
+.Sp
+The default is off when \f(CW\*(C`_\|_OPTIMIZE_SIZE_\|_\*(C'\fR is defined by your compiler
+(e.g. gcc with \f(CW\*(C`\-Os\*(C'\fR).
.ie n .IP "2 \- faster/larger data structures" 4
.el .IP "\f(CW2\fR \- faster/larger data structures" 4
.IX Item "2 - faster/larger data structures"
@@ -4748,6 +4751,9 @@ Replaces the small 2\-heap for timer management by a faster 4\-heap, larger
hash table sizes and so on. This will usually further increase code size
and can additionally have an effect on the size of data structures at
runtime.
+.Sp
+The default is off when \f(CW\*(C`_\|_OPTIMIZE_SIZE_\|_\*(C'\fR is defined by your compiler
+(e.g. gcc with \f(CW\*(C`\-Os\*(C'\fR).
.ie n .IP "4 \- full \s-1API\s0 configuration" 4
.el .IP "\f(CW4\fR \- full \s-1API\s0 configuration" 4
.IX Item "4 - full API configuration"
diff --git a/ev.h b/ev.h
index 335e341..1be861b 100644
--- a/ev.h
+++ b/ev.h
@@ -56,7 +56,11 @@ EV_CPP(extern "C" {)
#endif
#ifndef EV_FEATURES
-# define EV_FEATURES 0x7f
+# if defined __OPTIMIZE_SIZE__
+# define EV_FEATURES 0x7c
+# else
+# define EV_FEATURES 0x7f
+# endif
#endif
#define EV_FEATURE_CODE ((EV_FEATURES) & 1)
diff --git a/ev.pod b/ev.pod
index e185fa5..17eb91f 100644
--- a/ev.pod
+++ b/ev.pod
@@ -4622,7 +4622,7 @@ backend, use this:
#define EV_ASYNC_ENABLE 1
The actual value is a bitset, it can be a combination of the following
-values:
+values (by default, all of these are enabled):
=over 4
@@ -4637,6 +4637,9 @@ When optimising for size, use of compiler flags such as C<-Os> with
gcc is recommended, as well as C<-DNDEBUG>, as libev contains a number of
assertions.
+The default is off when C<__OPTIMIZE_SIZE__> is defined by your compiler
+(e.g. gcc with C<-Os>).
+
=item C<2> - faster/larger data structures
Replaces the small 2-heap for timer management by a faster 4-heap, larger
@@ -4644,6 +4647,9 @@ hash table sizes and so on. This will usually further increase code size
and can additionally have an effect on the size of data structures at
runtime.
+The default is off when C<__OPTIMIZE_SIZE__> is defined by your compiler
+(e.g. gcc with C<-Os>).
+
=item C<4> - full API configuration
This enables priorities (sets C<EV_MAXPRI>=2 and C<EV_MINPRI>=-2), and