Current-Users archive

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

Re: More build.sh ctf fallout on a linux host



Your new patch works for building tools on a NetBSD build host even without the u_longlong_t type defined in the build host's /usr/include/sys/types.h file. It also works on Debian Linux 8. Perhaps this patch will enable removal of the u_longlong_t and longlong_t data types from src/sys/sys/types.h which is installed as /usr/include/sys/types.h.

I am testing a 'build.sh release' overnight and will see if that succeeds without these data types in /usr/include/sys/types.h.

It might be desirable to remove these data types from the <sys/types.h> header file because /usr/include/sys/types.h adds this comment to discourage use of these data types:

/*
 * The types longlong_t and u_longlong_t exist for use with the
 * Sun-derived XDR routines involving these types, and their usage
 * in other contexts is discouraged.  Further note that these types
 * may not be equivalent to "long long" and "unsigned long long",
 * they are only guaranteed to be signed and unsigned 64-bit types
 * respectively.  Portable programs that need 64-bit types should use
 * the C99 types int64_t and uint64_t instead.
 */

typedef    int64_t        longlong_t;    /* for XDR */
typedef    uint64_t    u_longlong_t;    /* for XDR */

Chuck Zmudzinski


On 06/12/2018 06:01 PM, maya%netbsd.org@localhost wrote:
blah, oops. Given the comment I'm not sure ulonglong_t is even
necessary, it doesn't appear anywhere.

Does reverting the previous and adding this (which upstream might
accept, they seem to just forget to remove it) help?

Works for building tools under netbsd.

Index: ./osnet/dist/uts/common/rpc/types.h
===================================================================
RCS file: /cvsroot/src/external/cddl/osnet/dist/uts/common/rpc/types.h,v
retrieving revision 1.2
diff -u -r1.2 types.h
--- ./osnet/dist/uts/common/rpc/types.h	10 Apr 2015 22:44:20 -0000	1.2
+++ ./osnet/dist/uts/common/rpc/types.h	12 Jun 2018 21:55:19 -0000
@@ -49,13 +49,6 @@
  typedef int bool_t;
  typedef int enum_t;
-/*
- * The ulonglong_t type was introduced to workaround an rpcgen bug
- * that has been fixed, this next typedef will be removed in a future release.
- * Do *NOT* use!
- */
-typedef u_longlong_t ulonglong_t;
-
  #if defined(_LP64) || defined(_I32LPx)
  typedef	uint32_t rpcprog_t;
  typedef	uint32_t rpcvers_t;




Home | Main Index | Thread Index | Old Index