pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/m4



Module Name:    pkgsrc
Committed By:   jmcneill
Date:           Tue Mar 13 20:26:43 UTC 2018

Modified Files:
        pkgsrc/devel/m4: distinfo
Added Files:
        pkgsrc/devel/m4/patches: patch-lib_getprogname.c

Log Message:
Fix IRIX build by providing a getprogname implementation.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 pkgsrc/devel/m4/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/m4/patches/patch-lib_getprogname.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/m4/distinfo
diff -u pkgsrc/devel/m4/distinfo:1.42 pkgsrc/devel/m4/distinfo:1.43
--- pkgsrc/devel/m4/distinfo:1.42       Fri Aug 25 05:28:53 2017
+++ pkgsrc/devel/m4/distinfo    Tue Mar 13 20:26:42 2018
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.42 2017/08/25 05:28:53 adam Exp $
+$NetBSD: distinfo,v 1.43 2018/03/13 20:26:42 jmcneill Exp $
 
 SHA1 (m4-1.4.18.tar.gz) = 2f76f8105a45b05c8cfede97b3193cd88b31c657
 RMD160 (m4-1.4.18.tar.gz) = 16396a6ffbb2105cdd0a36c773b44d16854ed740
 SHA512 (m4-1.4.18.tar.gz) = 29254dd4267a093e8d9da3a26df8b02564044cdb4506be539ec1aff4e5d406477bcf32f5e813c840f3aec77293bfe2cdde18f6a21724a7e0bfff646ec88b74ae
 Size (m4-1.4.18.tar.gz) = 2006643 bytes
 SHA1 (patch-isnan.c) = a960f35e5168bed47c5924e36bfb254dc1a44621
+SHA1 (patch-lib_getprogname.c) = 3a8e7c028342ef3a9f86839f1a5ae36571a65f12
 SHA1 (patch-lib_stdio.in.h) = 21557ea9d86dbeb36062df4e62cb71735b06480b
 SHA1 (patch-lib_vasnprintf.c) = 2bced6c121efc9bc5894174c7745ba89e8f53033

Added files:

Index: pkgsrc/devel/m4/patches/patch-lib_getprogname.c
diff -u /dev/null pkgsrc/devel/m4/patches/patch-lib_getprogname.c:1.1
--- /dev/null   Tue Mar 13 20:26:43 2018
+++ pkgsrc/devel/m4/patches/patch-lib_getprogname.c     Tue Mar 13 20:26:43 2018
@@ -0,0 +1,52 @@
+$NetBSD: patch-lib_getprogname.c,v 1.1 2018/03/13 20:26:43 jmcneill Exp $
+
+--- lib/getprogname.c.orig     Tue Mar 13 15:45:15 AST 2018
++++ lib/getprogname.c  Tue Mar 13 15:49:41 AST 2018
+@@ -43,6 +43,14 @@
+ # include <string.h>
+ #endif
+ 
++#ifdef __sgi
++# include <string.h>
++# include <unistd.h>
++# include <stdio.h>
++# include <fcntl.h>
++# include <sys/procfs.h>
++#endif
++
+ #include "dirname.h"
+ 
+ #ifndef HAVE_GETPROGNAME             /* not Mac OS X, FreeBSD, NetBSD, OpenBSD >= 5.4, Cygwin */
+@@ -143,6 +151,32 @@
+       free (buf.ps_pathptr);
+     }
+   return p;
++# elif defined __sgi
++  char filename[50];
++  int fd;
++
++  sprintf (filename, "/proc/pinfo/%d", (int) getpid ());
++  fd = open (filename, O_RDONLY);
++  if (0 <= fd)
++    {
++      prpsinfo_t buf;
++      int ioctl_ok = 0 <= ioctl (fd, PIOCPSINFO, &buf);
++      close (fd);
++      if (ioctl_ok)
++      {
++        char *name = buf.pr_fname;
++        char *namesize = sizeof buf.pr_fname;
++        char *namenul = memchr (name, '\0', namesize);
++        size_t namelen = namenul ? namenul - name : namesize;
++        char *namecopy = malloc (namelen + 1);
++        if (namecopy)
++          {
++            namecopy[namelen] = 0;
++            return memcpy (namecopy, name, namelen);
++          }
++      }
++    }
++  return NULL;
+ # else
+ #  error "getprogname module not ported to this OS"
+ # endif



Home | Main Index | Thread Index | Old Index