|
@@ -588,14 +588,14 @@ begin
|
|
result:=0;
|
|
result:=0;
|
|
exit;
|
|
exit;
|
|
end;
|
|
end;
|
|
-{$ifdef FPC_SUPPORTS_UNALIGNED}
|
|
|
|
|
|
+{$ifdef FPC_UNALIGNED_FIXED}
|
|
if bufsize-bufidx>=sizeof(word) then
|
|
if bufsize-bufidx>=sizeof(word) then
|
|
begin
|
|
begin
|
|
- result:=Unaligned(pword(@buf[bufidx])^);
|
|
|
|
|
|
+ result:=Unaligned(pword(@buf[bufidx]))^;
|
|
inc(bufidx,sizeof(word));
|
|
inc(bufidx,sizeof(word));
|
|
end
|
|
end
|
|
else
|
|
else
|
|
-{$endif FPC_SUPPORTS_UNALIGNED}
|
|
|
|
|
|
+{$endif FPC_UNALIGNED_FIXED}
|
|
readdata(result,sizeof(word));
|
|
readdata(result,sizeof(word));
|
|
if change_endian then
|
|
if change_endian then
|
|
result:=swapendian(result);
|
|
result:=swapendian(result);
|
|
@@ -611,14 +611,14 @@ begin
|
|
getlongint:=0;
|
|
getlongint:=0;
|
|
exit;
|
|
exit;
|
|
end;
|
|
end;
|
|
-{$ifdef FPC_SUPPORTS_UNALIGNED}
|
|
|
|
|
|
+{$ifdef FPC_UNALIGNED_FIXED}
|
|
if bufsize-bufidx>=sizeof(longint) then
|
|
if bufsize-bufidx>=sizeof(longint) then
|
|
begin
|
|
begin
|
|
- result:=Unaligned(plongint(@buf[bufidx])^);
|
|
|
|
|
|
+ result:=Unaligned(plongint(@buf[bufidx]))^;
|
|
inc(bufidx,sizeof(longint));
|
|
inc(bufidx,sizeof(longint));
|
|
end
|
|
end
|
|
else
|
|
else
|
|
-{$endif FPC_SUPPORTS_UNALIGNED}
|
|
|
|
|
|
+{$endif FPC_UNALIGNED_FIXED}
|
|
readdata(result,sizeof(longint));
|
|
readdata(result,sizeof(longint));
|
|
if change_endian then
|
|
if change_endian then
|
|
result:=swapendian(result);
|
|
result:=swapendian(result);
|
|
@@ -634,14 +634,14 @@ begin
|
|
result:=0;
|
|
result:=0;
|
|
exit;
|
|
exit;
|
|
end;
|
|
end;
|
|
-{$ifdef FPC_SUPPORTS_UNALIGNED}
|
|
|
|
|
|
+{$ifdef FPC_UNALIGNED_FIXED}
|
|
if bufsize-bufidx>=sizeof(int64) then
|
|
if bufsize-bufidx>=sizeof(int64) then
|
|
begin
|
|
begin
|
|
result:=Unaligned(pint64(@buf[bufidx])^);
|
|
result:=Unaligned(pint64(@buf[bufidx])^);
|
|
inc(bufidx,sizeof(int64));
|
|
inc(bufidx,sizeof(int64));
|
|
end
|
|
end
|
|
else
|
|
else
|
|
-{$endif FPC_SUPPORTS_UNALIGNED}
|
|
|
|
|
|
+{$endif FPC_UNALIGNED_FIXED}
|
|
readdata(result,sizeof(int64));
|
|
readdata(result,sizeof(int64));
|
|
if change_endian then
|
|
if change_endian then
|
|
result:=swapendian(result);
|
|
result:=swapendian(result);
|