Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 52db49b6 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "libbase: a slightly cleaner solution to libbase's `off64_t` problem."

parents a0dcfc2a 46e0cc27
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@
#include <sys/types.h>
#include <string>

#include "android-base/off64_t.h"

#if !defined(_WIN32) && !defined(O_BINARY)
/** Windows needs O_BINARY, but Unix never mangles line endings. */
#define O_BINARY 0
@@ -30,11 +32,6 @@
#define O_CLOEXEC O_NOINHERIT
#endif

#if defined(__APPLE__)
/** Mac OS has always had a 64-bit off_t, so it doesn't have off64_t. */
typedef off_t off64_t;
#endif

namespace android {
namespace base {

+1 −5
Original line number Diff line number Diff line
@@ -16,12 +16,8 @@

#pragma once

#if __APPLE__
/* Temporary Mac build fix for off64_t. TODO: refactor into `portability.h`. */
#include "android-base/file.h"
#endif

#include "android-base/macros.h"
#include "android-base/off64_t.h"

#include <sys/types.h>

+22 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2018 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#pragma once

#if defined(__APPLE__)
/** Mac OS has always had a 64-bit off_t, so it doesn't have off64_t. */
typedef off_t off64_t;
#endif