Ticket #14761: compile-leopard.patch
File compile-leopard.patch, 4.6 KB (added by openspecies@…, 16 years ago) |
---|
-
pfind/Makefile
old new 1 1 PROG= pfind 2 2 DPADD+= ../proctools/libproctools.a 3 LDADD= -L${MAKEOBJDIR} -lproctools -lkvm3 LDADD= -L${MAKEOBJDIR} -lproctools 4 4 CLEANFILES+= pfind.cat1 5 5 6 6 .if defined(OLDKVM) -
pgrep/Makefile
old new 1 1 PROG= pgrep 2 2 DPADD+= ../proctools/libproctools.a 3 LDADD= -L${MAKEOBJDIR} -lproctools -lkvm3 LDADD= -L${MAKEOBJDIR} -lproctools 4 4 CLEANFILES+= pgrep.cat1 5 5 6 6 .if defined(OLDKVM) -
pkill/Makefile
old new 1 1 PROG= pkill 2 2 DPADD+= ../proctools/libproctools.a 3 LDADD= -L${MAKEOBJDIR} -lproctools -lkvm3 LDADD= -L${MAKEOBJDIR} -lproctools 4 4 CLEANFILES+= pkill.cat1 5 5 6 6 .if defined(OLDKVM) -
proctools/fmt.
old new 7 7 #include <sys/sysctl.h> 8 8 #include <sys/user.h> 9 9 10 #if defined(USE_KVM) 10 11 #include <kvm.h> 12 #endif 13 11 14 #include <stdio.h> 12 15 #include <stdlib.h> 13 16 #include <string.h> … … 27 30 return ((cp = strrchr(arg0, '/')) != NULL ? cp + 1 : arg0); 28 31 } 29 32 33 #if defined(USE_KVM) 30 34 void 31 35 fmt_argv(kd, ki) 32 36 kvm_t *kd; … … 51 55 fmt_putc(')', &left); 52 56 } 53 57 } 58 #endif 54 59 55 60 void 56 61 fmt_puts(s, leftp) -
proctools/proctools.
old new 5 5 6 6 #include <sys/cdefs.h> 7 7 #include <stdio.h> 8 9 #if defined(USE_KVM) 8 10 #include <kvm.h> 11 #else 12 #define USE_SYSCTL 13 #endif 9 14 10 15 #if !defined(USE_KVM) && !defined(USE_SYSCTL) 11 16 # if defined(KVM_NO_FILES) -
proctools/proctools.
old new 23 23 24 24 extern char *cmdpart(char *); 25 25 extern void fmt_puts(char *, int *); 26 27 #if defined(USE_KVM) 26 28 extern void fmt_argv(kvm_t *kd, struct kinfo_proc *ki); 29 #endif 27 30 28 31 static char dbuf[DUMPBUFSZ]; 29 32 … … 919 922 matched = !strcmp(name, pattern); 920 923 } 921 924 else { 922 matched = regexec(®ex, name, 0, NULL, NULL) == 0;925 matched = regexec(®ex, name, 0, NULL, 0) == 0; 923 926 } 924 927 } 925 928 else { … … 960 963 } 961 964 } 962 965 else 963 if (regexec(®ex, name, 0, NULL, NULL) == 0)966 if (regexec(®ex, name, 0, NULL, 0) == 0) 964 967 pushProcList(proctoolslist, kp); 965 968 } 966 969 else … … 995 998 matched = !strcmp(name, pattern); 996 999 } 997 1000 else { 998 matched = regexec(®ex, name, 0, NULL, NULL) == 0;1001 matched = regexec(®ex, name, 0, NULL, 0) == 0; 999 1002 } 1000 1003 } 1001 1004 else { … … 1037 1040 } 1038 1041 } 1039 1042 else 1040 if (regexec(®ex, name, 0, NULL, NULL) == REG_NOMATCH)1043 if (regexec(®ex, name, 0, NULL, 0) == REG_NOMATCH) 1041 1044 pushProcList(proctoolslist, kp); 1042 1045 } 1043 1046 else -
pfind/pfind.
old new 434 434 PFIND_EVAL(pfind_pri_any) 435 435 { 436 436 int result; 437 result = !regexec(&(*expression)->optarg.re.r, proctoolslist->name, 0, NULL, NULL);437 result = !regexec(&(*expression)->optarg.re.r, proctoolslist->name, 0, NULL, 0); 438 438 if (!result) { 439 439 const char *args; 440 440 args = getProcArgs(baton, proctoolslist); 441 result = args && !regexec(&(*expression)->optarg.re.r, args, 0, NULL, NULL);441 result = args && !regexec(&(*expression)->optarg.re.r, args, 0, NULL, 0); 442 442 /* do not free(args) */ 443 443 } 444 444 (*expression)->parent->result = (*expression)->result = (*expression)->invert_after ^ result; … … 450 450 const char *args; 451 451 int result; 452 452 args = getProcArgs(baton, proctoolslist); 453 result = args && !regexec(&(*expression)->optarg.re.r, args, 0, NULL, NULL);453 result = args && !regexec(&(*expression)->optarg.re.r, args, 0, NULL, 0); 454 454 (*expression)->parent->result = (*expression)->result = (*expression)->invert_after ^ result; 455 455 /* do not free(args) */ 456 456 return 0; … … 490 490 (*expression)->parent->result = (*expression)->result = (*expression)->invert_after ^ !strcmp(proctoolslist->name, (*expression)->optarg.str); 491 491 } 492 492 else { 493 (*expression)->parent->result = (*expression)->result = (*expression)->invert_after ^ !regexec(&(*expression)->optarg.re.r, proctoolslist->name, 0, NULL, NULL);493 (*expression)->parent->result = (*expression)->result = (*expression)->invert_after ^ !regexec(&(*expression)->optarg.re.r, proctoolslist->name, 0, NULL, 0); 494 494 } 495 495 return 0; 496 496 }