New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #14761: compile-leopard.patch

File compile-leopard.patch, 4.6 KB (added by openspecies@…, 4 years ago)
  • pfind/Makefile

    old new  
    11PROG= pfind 
    22DPADD+= ../proctools/libproctools.a 
    3 LDADD= -L${MAKEOBJDIR} -lproctools -lkvm 
     3LDADD= -L${MAKEOBJDIR} -lproctools 
    44CLEANFILES+= pfind.cat1 
    55 
    66.if defined(OLDKVM) 
  • pgrep/Makefile

    old new  
    11PROG= pgrep 
    22DPADD+= ../proctools/libproctools.a 
    3 LDADD= -L${MAKEOBJDIR} -lproctools -lkvm 
     3LDADD= -L${MAKEOBJDIR} -lproctools 
    44CLEANFILES+= pgrep.cat1 
    55 
    66.if defined(OLDKVM) 
  • pkill/Makefile

    old new  
    11PROG=   pkill 
    22DPADD+= ../proctools/libproctools.a 
    3 LDADD= -L${MAKEOBJDIR} -lproctools -lkvm 
     3LDADD= -L${MAKEOBJDIR} -lproctools 
    44CLEANFILES+= pkill.cat1 
    55 
    66.if defined(OLDKVM) 
  • proctools/fmt.

    old new  
    77#include <sys/sysctl.h> 
    88#include <sys/user.h> 
    99 
     10#if defined(USE_KVM) 
    1011#include <kvm.h> 
     12#endif 
     13 
    1114#include <stdio.h> 
    1215#include <stdlib.h> 
    1316#include <string.h> 
     
    2730        return ((cp = strrchr(arg0, '/')) != NULL ? cp + 1 : arg0); 
    2831} 
    2932 
     33#if defined(USE_KVM) 
    3034void 
    3135fmt_argv(kd, ki) 
    3236        kvm_t *kd; 
     
    5155                fmt_putc(')', &left); 
    5256        } 
    5357} 
     58#endif 
    5459 
    5560void 
    5661fmt_puts(s, leftp) 
  • proctools/proctools.

    old new  
    55 
    66#include <sys/cdefs.h> 
    77#include <stdio.h> 
     8 
     9#if defined(USE_KVM) 
    810#include <kvm.h> 
     11#else 
     12#define USE_SYSCTL 
     13#endif 
    914 
    1015#if !defined(USE_KVM) && !defined(USE_SYSCTL) 
    1116#       if defined(KVM_NO_FILES) 
  • proctools/proctools.

    old new  
    2323 
    2424extern char *cmdpart(char *); 
    2525extern void  fmt_puts(char *, int *); 
     26 
     27#if defined(USE_KVM) 
    2628extern void  fmt_argv(kvm_t *kd, struct kinfo_proc *ki); 
     29#endif 
    2730 
    2831static char  dbuf[DUMPBUFSZ]; 
    2932 
     
    919922                                                                matched = !strcmp(name, pattern); 
    920923                                                } 
    921924                                                else { 
    922                                                         matched = regexec(&regex, name, 0, NULL, NULL) == 0; 
     925                                                        matched = regexec(&regex, name, 0, NULL, 0) == 0; 
    923926                                                } 
    924927                                        } 
    925928                                        else { 
     
    960963                                                } 
    961964                                        } 
    962965                                        else 
    963                                                 if (regexec(&regex, name, 0, NULL, NULL) == 0) 
     966                                                if (regexec(&regex, name, 0, NULL, 0) == 0) 
    964967                                                        pushProcList(proctoolslist, kp); 
    965968                                } 
    966969                                else 
     
    995998                                                                matched = !strcmp(name, pattern); 
    996999                                                } 
    9971000                                                else { 
    998                                                         matched = regexec(&regex, name, 0, NULL, NULL) == 0; 
     1001                                                        matched = regexec(&regex, name, 0, NULL, 0) == 0; 
    9991002                                                } 
    10001003                                        } 
    10011004                                        else { 
     
    10371040                                                } 
    10381041                                        } 
    10391042                                        else 
    1040                                                 if (regexec(&regex, name, 0, NULL, NULL) == REG_NOMATCH) 
     1043                                                if (regexec(&regex, name, 0, NULL, 0) == REG_NOMATCH) 
    10411044                                                        pushProcList(proctoolslist, kp); 
    10421045                                } 
    10431046                                else 
  • pfind/pfind.

     				
    old new  
    434434PFIND_EVAL(pfind_pri_any) 
    435435{ 
    436436        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); 
    438438        if (!result) { 
    439439                const char *args; 
    440440                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); 
    442442                /* do not free(args) */ 
    443443        } 
    444444        (*expression)->parent->result = (*expression)->result = (*expression)->invert_after ^ result; 
     
    450450        const char *args; 
    451451        int result; 
    452452        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); 
    454454        (*expression)->parent->result = (*expression)->result = (*expression)->invert_after ^ result; 
    455455        /* do not free(args) */ 
    456456        return 0; 
     
    490490                        (*expression)->parent->result = (*expression)->result = (*expression)->invert_after ^ !strcmp(proctoolslist->name, (*expression)->optarg.str); 
    491491        } 
    492492        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); 
    494494        } 
    495495        return 0; 
    496496}