Changeset 23552
- Timestamp:
- 03/12/08 15:13:32 (9 months ago)
- Location:
- trunk/launchd/src
- Files:
-
- 2 modified
-
launchd_core_logic.c (modified) (2 diffs)
-
liblaunch.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/launchd/src/launchd_core_logic.c
r23550 r23552 1210 1210 { 1211 1211 const char *const *argv_tmp = argv; 1212 char tmp_path[PATH_MAX]; 1212 1213 char auto_label[1000]; 1213 1214 const char *bn = NULL; … … 1230 1231 1231 1232 if (unlikely(label == AUTO_PICK_LEGACY_LABEL)) { 1232 bn = prog ? prog : basename((char *)argv[0]); /* prog for auto labels is kp.kp_kproc.p_comm */ 1233 if (prog) { 1234 bn = prog; 1235 } else { 1236 strlcpy(tmp_path, argv[0], sizeof(tmp_path)); 1237 bn = basename(tmp_path); /* prog for auto labels is kp.kp_kproc.p_comm */ 1238 } 1233 1239 snprintf(auto_label, sizeof(auto_label), "%s.%s", sizeof(void *) == 8 ? "0xdeadbeeffeedface" : "0xbabecafe", bn); 1234 1240 label = auto_label; -
trunk/launchd/src/liblaunch.c
r23551 r23552 40 40 #include <pwd.h> 41 41 #include <assert.h> 42 43 #ifdef __LP64__ 44 /* workaround: 5723161 */ 45 #ifndef __DARWIN_ALIGN32 46 #define __DARWIN_ALIGN32(x) (((size_t)(x) + 3) & ~3) 47 #endif 48 #undef CMSG_DATA 49 #define CMSG_DATA(cmsg) \ 50 ((uint8_t *)(cmsg) + __DARWIN_ALIGN32(sizeof(struct cmsghdr))) 51 #undef CMSG_SPACE 52 #define CMSG_SPACE(l) \ 53 (__DARWIN_ALIGN32(sizeof(struct cmsghdr)) + __DARWIN_ALIGN32(l)) 54 #undef CMSG_LEN 55 #define CMSG_LEN(l) \ 56 (__DARWIN_ALIGN32(sizeof(struct cmsghdr)) + (l)) 57 #endif 42 58 43 59 #include "libbootstrap_public.h" … … 120 136 }; 121 137 }; 122 int fd;123 mach_port_tmp;124 int err;125 long longnumber;126 uint 32_t boolean; /* We'd use 'bool' but this struct needs to be used under Rosetta, and sizeof(bool) is different between PowerPC and Intel */138 int64_t fd; 139 uint64_t mp; 140 uint64_t err; 141 int64_t number; 142 uint64_t boolean; /* We'd use 'bool' but this struct needs to be used under Rosetta, and sizeof(bool) is different between PowerPC and Intel */ 127 143 double float_num; 128 144 };

