#include <errno.h>
#include <inttypes.h>
#include <locale.h>
+#ifdef __APPLE__
+#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
}
} else if (buf[sizeof(u_int)] == 'L') {
*kind = (*kind & ~CTLTYPE) | CTLTYPE_LONG;
+ if (buf[sizeof(u_int)+1] == 'U') {
+ *kind = (*kind & ~CTLTYPE) | CTLTYPE_ULONG;
+ }
}
break;
case CTLTYPE_QUAD:
bzero(name, BUFSIZ);
qoid[0] = 0;
memcpy(qoid + 2, oid, nlen * sizeof(int));
+ fmt = (char *)buf;
+ oidfmt(oid, nlen, fmt, &kind);
+
+#ifdef __APPLE__
+ if (!show_masked && (kind & CTLFLAG_MASKED)) {
+ return (1);
+ }
+#endif
#ifdef __APPLE__
// Support for CTL_USER
return (0);
}
val[len] = '\0';
- fmt = (char *)buf;
- oidfmt(oid, nlen, fmt, &kind);
p = val;
ctltype = (kind & CTLTYPE);
sign = ctl_sign[ctltype];
intlen = ctl_size[ctltype];
-#ifdef __APPLE__
- if (!show_masked && (kind & CTLFLAG_MASKED)) {
- free(oval);
- return (1);
- }
-#endif
-
switch (ctltype) {
case CTLTYPE_STRING:
if (!nflag)
static int
sysctl_all(int *oid, int len)
{
+#ifdef __APPLE__
+#endif
+
int name1[22], name2[22];
int i, j;
size_t l1, l2;