> * On 2017-10-02 at 12:55 BST, Toomas Soome wrote: > >>> On 1 Oct 2017, at 19:25, Igor Kozhukhov <[email protected]> wrote: >>> >>> Hi All, >>> >>> i’d like proposed try to update sys/typs.h by changes what are available in >>> FreeBSD for better portality: >>> >>> igor@z172:~/users/igor/dilos-illumos$ g diff >>> diff --git a/usr/src/uts/common/sys/types.h b/usr/src/uts/common/sys/types.h >>> index dcb2c86283..a2e37263b8 100644 >>> --- a/usr/src/uts/common/sys/types.h >>> +++ b/usr/src/uts/common/sys/types.h >>> @@ -58,6 +58,11 @@ >>> #include <sys/types32.h> >>> #endif >>> >>> +typedef uint8_t u_int8_t; /* unsigned integrals >>> (deprecated) */ >>> +typedef uint16_t u_int16_t; >>> +typedef uint32_t u_int32_t; >>> +typedef uint64_t u_int64_t; >>> + >>> #ifdef __cplusplus >>> extern "C" { >>> #endif >>> >>> >>> i have found several userland apps what are needs where changes and I >>> understand - they are deprocated, but it can helps and reduce additional >>> patches in userland apps with portability and builds based on illumos env. >>> >>> If you are agreed - i can file a bug for it. >>> >> >> I have different kind of question — the u_* types inFreeBSD at least are >> deprecated and handled quite the same way as we do - when you step on it, >> fix it:) so the actual question is, how many cases (approximately) there are >> and perhaps it is just wiser to use the strategy to fix things at the point >> of origin. Note, I have done such fixing myself and helped to get it done >> for illumos. Depending on the volume of the work, it still may be reasonable >> to have those types defined, but in my opinion, the focus should be on real >> fixes in any case - even if we do have this (temporary and deprecated) list >> of typedefs. > > In pkgsrc we have 67 packages where we have already fixed this by > defining -Du_int*=uint* in CPPFLAGS. It is unknown how many of these > 67 still require the workaround, it's possible that many of them have > already been fixed upstream. > > According to the most recent bulk build report there are 32 further > potential packages where adding them might help fix the build. > > This is out of 19,303 total packages. > > Regardless of whether illumos decides to add these typedefs, we will > still have to add them to pkgsrc to support older systems, so it would > be appreciated if this was done in a way that avoids redefinitions.
Jonathan, thanks for confirmation. and yes - right now i’m using the same workaround with updates of CPPFAGS like: CPPFLAGS += -Du_int64_t=uint64_t -Du_int32_t=uint32_t -Du_int16_t=uint16_t -Du_int8_t=uint8_t but, i’d like reduce it and do not update every application with new upgrade - it is why i have started this topic. i have done updates on my illumos tree with tests by builds on intel and SPARC and you have found my updates: https://bitbucket.org/dilos/dilos-illumos/commits/bb991155bcfc2a5b4234df5dd237cb211221a816 <https://bitbucket.org/dilos/dilos-illumos/commits/bb991155bcfc2a5b4234df5dd237cb211221a816> https://bitbucket.org/dilos/dilos-illumos/commits/aaa394f5fc2ab8499bbddaa4ac4f1d3abda82006 <https://bitbucket.org/dilos/dilos-illumos/commits/aaa394f5fc2ab8499bbddaa4ac4f1d3abda82006> as you can see - we are using redefined types on illumos tree instead of fix it. we have some ported apps to illumos tree and we can do it if needed, but for reduce changes in original apps, will be better to add definitions like others platforms - it is my opinion. -Igor > Regards, > > -- > Jonathan Perkin - Joyent, Inc. - www.joyent.com <http://www.joyent.com/> > > ------------------------------------------ > illumos-developer > Archives: > https://illumos.topicbox.com/groups/developer/discussions/T49e04d512870b674-M07471df63e342d957a620f37 > > <https://illumos.topicbox.com/groups/developer/discussions/T49e04d512870b674-M07471df63e342d957a620f37> > Powered by Topicbox: https://topicbox.com <https://topicbox.com/> ------------------------------------------ openzfs-developer Archives: https://openzfs.topicbox.com/groups/developer/discussions/T0cc9a914d001ea54-M89cd559fac6aec81bf08706f Powered by Topicbox: https://topicbox.com
