Permalink
Browse files

Updated erl_nif_compat.h with license header.

  • Loading branch information...
1 parent 97c3fc1 commit 97821f9111dd4ec83087aa71d3a1f3421f4e6f38 @davisp davisp committed Apr 5, 2011
Showing with 47 additions and 3 deletions.
  1. +22 −1 LICENSE
  2. +25 −2 c_src/erl_nif_compat.h
View
23 LICENSE
@@ -1,7 +1,7 @@
eep0018
=======
-Files: c_src/*.c c_src/*.h src/* test/*.t test/*.erl
+Files: c_src/*.c src/* test/*.t test/*.erl
Copyright 2011 Paul J. Davis <paul.joseph.davis@gmail.com>
@@ -26,6 +26,27 @@ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
+erl_nif_compat.h
+================
+
+Files: c_src/erl_nif_compat.h
+
+Copyright (c) 2010-2011 Basho Technologies, Inc.
+
+This file is provided to you under the Apache License,
+Version 2.0 (the "License"); you may not use this file
+except in compliance with the License. You may obtain
+a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+
Yajl
====
View
27 c_src/erl_nif_compat.h
@@ -1,3 +1,20 @@
+/* Copyright (c) 2010-2011 Basho Technologies, Inc.
+ *
+ * This file is provided to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain
+ * a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+*/
+
#ifndef ERL_NIF_COMPAT_H_
#define ERL_NIF_COMPAT_H_
@@ -17,9 +34,15 @@ extern "C" {
#define enif_free_compat enif_free
#define enif_get_atom_compat enif_get_atom
+#define enif_cond_create erl_drv_cond_create
+#define enif_cond_destroy erl_drv_cond_destroy
+#define enif_cond_signal erl_drv_cond_signal
+#define enif_cond_broadcast erl_drv_cond_broadcast
+#define enif_cond_wait erl_drv_cond_wait
+#define ErlNifCond ErlDrvCond
#endif /* R13B04 */
-#if ERL_NIF_MAJOR_VERSION == 2 && ERL_NIF_MINOR_VERSION == 0
+#if ERL_NIF_MAJOR_VERSION == 2 && ERL_NIF_MINOR_VERSION >= 0
#define enif_open_resource_type_compat(E, N, D, F, T) \
enif_open_resource_type(E, NULL, N, D, F, T)
@@ -50,4 +73,4 @@ extern "C" {
}
#endif /* __cplusplus */
-#endif /* ERL_NIF_COMPAT_H_ */
+#endif /* ERL_NIF_COMPAT_H_ */

0 comments on commit 97821f9

Please sign in to comment.