[launchd-changes] [23444] trunk/launchd/src
source_changes at macosforge.org
source_changes at macosforge.org
Tue Oct 23 08:41:40 PDT 2007
Revision: 23444
http://trac.macosforge.org/projects/launchd/changeset/23444
Author: zarzycki at apple.com
Date: 2007-10-23 08:41:39 -0700 (Tue, 23 Oct 2007)
Log Message:
-----------
Misc updates.
Modified Paths:
--------------
trunk/launchd/src/launchd_runtime.c
trunk/launchd/src/launchd_runtime.h
Modified: trunk/launchd/src/launchd_runtime.c
===================================================================
--- trunk/launchd/src/launchd_runtime.c 2007-10-23 15:40:55 UTC (rev 23443)
+++ trunk/launchd/src/launchd_runtime.c 2007-10-23 15:41:39 UTC (rev 23444)
@@ -959,7 +959,7 @@
audit_token_to_au32(*au_tok, /* audit UID */ NULL, &ldc->euid,
&ldc->egid, &ldc->uid, &ldc->gid, &ldc->pid,
- &ldc->asid, /* au_tid_t */ NULL);
+ /* au_asid_t */ NULL, /* au_tid_t */ NULL);
return true;
}
Modified: trunk/launchd/src/launchd_runtime.h
===================================================================
--- trunk/launchd/src/launchd_runtime.h 2007-10-23 15:40:55 UTC (rev 23443)
+++ trunk/launchd/src/launchd_runtime.h 2007-10-23 15:41:39 UTC (rev 23444)
@@ -24,17 +24,59 @@
#include <sys/types.h>
#include <bsm/libbsm.h>
#include <stdbool.h>
+#include <stdint.h>
+#include <float.h>
#include <syslog.h>
#include "launchd_runtime_kill.h"
+#if 0
+
+/* I need to do more testing of these macros */
+
+#define min_of_type(x) \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), long double), LDBL_MIN, \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), double), DBL_MIN, \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), float), FLT_MIN, \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), char), 0, \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), signed char), INT8_MIN, \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), short), INT16_MIN, \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), int), INT32_MIN, \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), long), (__builtin_choose_expr(sizeof(x) == 4, INT32_MIN, INT64_MIN)), \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), long long), INT64_MIN, \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), unsigned char), 0, \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), unsigned short), 0, \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), unsigned int), 0, \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), unsigned long), 0, \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), unsigned long long), 0, \
+ (void)0))))))))))))))
+
+#define max_of_type(x) \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), long double), LDBL_MAX, \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), double), DBL_MAX, \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), float), FLT_MAX, \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), char), UINT8_MAX, \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), signed char), INT8_MAX, \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), short), INT16_MIN, \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), int), INT32_MAX, \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), long), (__builtin_choose_expr(sizeof(x) == 4, INT32_MAX, INT64_MAX)), \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), long long), INT64_MAX, \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), unsigned char), UINT8_MAX, \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), unsigned short), UINT16_MAX, \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), unsigned int), UINT32_MAX, \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), unsigned long), (__builtin_choose_expr(sizeof(x) == 4, UINT32_MAX, UINT64_MAX)), \
+ __builtin_choose_expr(__builtin_types_compatible_p(typeof(x), unsigned long long), UINT64_MAX, \
+ (void)0))))))))))))))
+
+#endif
+
+
struct ldcred {
uid_t euid;
uid_t uid;
gid_t egid;
gid_t gid;
pid_t pid;
- au_asid_t asid;
};
/*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20071023/7736a2e2/attachment.html
More information about the launchd-changes
mailing list