shithub: npe

Download patch

ref: 32dfa1f1f37e2128629703bd9371186d616478d2
parent: dc2a27ba8cbac9c58ebd316f91db66dabe5baed5
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Mon Aug 2 10:08:14 EDT 2021

export some of the private functions

--- a/include/npe/npe.h
+++ b/include/npe/npe.h
@@ -3,18 +3,35 @@
 
 #pragma lib "libnpe.a"
 
+#ifndef nil
 #include <u.h>
+#endif
+#ifndef nelem
 #include <libc.h>
+#endif
 
+#ifndef Nsec
+#define Nsec 1000000000ULL
+uvlong npe_nanosec(void);
+void npe_nsleep(uvlong ns);
+int npe_mkdirp(char *s, int perm);
+#endif
+
 /* programs quite often do not include these directly */
+#ifndef NULL
 #include </sys/include/stdio.h>
+#endif
+#ifndef isalpha
 #include </sys/include/ctype.h>
+#endif
 #include <stddef.h>
 
 /* some programs do not #include <strings.h> */
+#ifndef strcasecmp
 #define strcasecmp cistrcmp
 #define strncasecmp cistrncmp
 #define strcasestr cistrstr
+#endif
 
 #ifndef __attribute__
 #define __attribute__(a)
--- a/libnpe/_npe.h
+++ b/libnpe/_npe.h
@@ -1,11 +1,3 @@
-enum {
-	Nsec = 1000000000ULL,
-};
-
 #define ln2o1 1.4426950408889634073599
 #define hugeF 3.4028234e+38
 #define hugeD 1.79769313486231e+308
-
-uvlong npe_nanosec(void);
-void npe_nsleep(uvlong ns);
-int npe_mkdirp(char *s, int perm);