aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/src/disk_log.hrl
diff options
context:
space:
mode:
authorKostis Sagonas <[email protected]>2010-02-14 17:08:05 +0200
committerBjörn Gustavsson <[email protected]>2010-03-07 13:26:35 +0100
commit8fef4ffec7245102407ccf73afb5c5c4a42a4ee3 (patch)
treeb82ef911624292f28bbf9cf480dd9ae98e099dfd /lib/kernel/src/disk_log.hrl
parentda70b2b0eca09f572e3275240ba60f1da6b679c4 (diff)
downloadotp-8fef4ffec7245102407ccf73afb5c5c4a42a4ee3.tar.gz
otp-8fef4ffec7245102407ccf73afb5c5c4a42a4ee3.tar.bz2
otp-8fef4ffec7245102407ccf73afb5c5c4a42a4ee3.zip
file.hrl: Move out type declarations
Having various type declarations in the file.hrl file was once upon a time necessary since the system could not really handle remote types. Now it can and these declarations should not be there but appear in file.erl instead. This means that files that need to use these types can refer to them using a remote type reference, and not having to include file.hrl - at least not for this reason.
Diffstat (limited to 'lib/kernel/src/disk_log.hrl')
-rw-r--r--lib/kernel/src/disk_log.hrl10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/kernel/src/disk_log.hrl b/lib/kernel/src/disk_log.hrl
index b0849145ca..4b40030bcf 100644
--- a/lib/kernel/src/disk_log.hrl
+++ b/lib/kernel/src/disk_log.hrl
@@ -44,17 +44,11 @@
-define(OPENED, <<6,7,8,9>>).
-define(CLOSED, <<99,88,77,11>>).
-%% Needed for the definition of fd()
+%% Needed for the definition of #file_info{}
%% Must use include_lib() so that we always can be sure to find
%% file.hrl. A relative path will not work in an installed system.
-include_lib("kernel/include/file.hrl").
-%% Ugly workaround. If we are building the bootstrap compiler,
-%% file.hrl does not define the fd() type.
--ifndef(FILE_HRL_).
--type fd() :: pid() | #file_descriptor{}.
--endif.
-
%%------------------------------------------------------------------------
%% Types -- alphabetically
%%------------------------------------------------------------------------
@@ -94,7 +88,7 @@
options = [] :: dlog_options()}).
-record(cache, %% Cache for logged terms (per file descriptor).
- {fd :: fd(), %% File descriptor.
+ {fd :: file:fd(), %% File descriptor.
sz = 0 :: non_neg_integer(), %% Number of bytes in the cache.
c = [] :: iodata()} %% The cache.
).