Last century, there was a reason to have these internal integer
data typedefs (from header.h):
/* XXX hpux needs -Ae in CFLAGS to grok this */
typedef long long int int_64;
typedef int int_32;
typedef short int int_16;
typedef char int_8;
/* XXX hpux needs -Ae in CFLAGS to grok this */
typedef unsigned long long int uint_64;
typedef unsigned int uint_32;
typedef unsigned short uint_16;
typedef unsigned char uint_8;
I see no reason not to switch to <stdint.h> types (as rpm.org has
recently done).
At the same time, I believe its time to clarify the signedness of
integer
data types in rpm headers, making all integers in rpm header tags
"unsigned".
The instant win is that the limit on file size in a package moves
from 2Gb to 4Gb.
The general win is that the signedness of integer data types becomes
well defined.
Here are the current integer tags known to rpm, I don't see any tags
that
need to be signed:
$ rpm -v --querytags | grep ' int'
ARCHIVESIZE 1046 int32
BUILDCPUCLOCK 1176 int32
BUILDTIME 1006 int32
CACHECTIME 1136 int32
CACHEPKGMTIME 1139 int32
CACHEPKGSIZE 1138 int32
CAPABILITY 1105 int32
CHANGELOGTIME 1080 int32
CONFLICTATTRSX 1189 int32
CONFLICTFLAGS 1053 int32
DBINSTANCE 1195 int32
DEPENDSDICT 1145 int32
DIRINDEXES 1116 int32
ENHANCESFLAGS 1161 int32
EPOCH 1003 int32
E 1003 int32
FILECLASS 1141 int32
FILECOLORS 1140 int32
FILEDEPENDSN 1144 int32
FILEDEPENDSX 1143 int32
FILEDEVICES 1095 int32
FILEDIGESTALGOS 1177 int32
FILEFLAGS 1037 int32
FILEINODES 1096 int32
FILEMODES 1030 int16
FILEMTIMES 1034 int32
FILERDEVS 1033 int16
FILESIZES 1028 int32
FILEVERIFYFLAGS 1045 int32
FILEXATTRSX 1187 int32
INSTALLCOLOR 1127 int32
INSTALLTID 1128 int32
INSTALLTIME 1008 int32
OBSOLETEATTRSX 1190 int32
OBSOLETEFLAGS 1114 int32
ORIGDIRINDEXES 1119 int32
PACKAGECOLOR 1184 int32
PACKAGEPREFCOLOR 1185 int32
PATCHESFLAGS 1134 int32
PRIORITY 1162 int32
PROVIDEATTRSX 1191 int32
PROVIDEFLAGS 1112 int32
REMOVETID 1129 int32
REQUIREATTRSX 1192 int32
REQUIREFLAGS 1048 int32
SCRIPTMETRICS 1175 int32
SCRIPTSTATES 1174 int32
SIGSIZE 257 int32
SIZE 1009 int32
SOURCEPACKAGE 1106 int32
SUGGESTSFLAGS 1158 int32
TRIGGERFLAGS 1068 int32
TRIGGERINDEX 1069 int32
XMAJOR 1179 int32
XMINOR 1180 int32
So I'm gonna do the following:
1) convert to using <stdint.h> types
2) change all pointers to tag integer data to be unsigned.
Opinions?
73 de Jeff
Received on Sat Oct 27 19:03:13 2007