summaryrefslogtreecommitdiff
path: root/libc/private/__bionic_get_shell_path.h
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2019-03-21 21:11:41 -0700
committerElliott Hughes <enh@google.com>2019-03-25 17:28:22 -0700
commit886370c2402e6fcf6ac613a8603f99fff66cd20c (patch)
tree55973f92a11704c20bc09aa8a74c2094c7b1c2a7 /libc/private/__bionic_get_shell_path.h
parentebdf4c19f9e034d7ec8e0e57539890d5c93eaed1 (diff)
Fix internal uses of _PATH_BSHELL.
We regressed on this recently: code under the upstream-* directories has _PATH_BSHELL defined as a call to __bionic_get_shell_path(). In our own code, we may as well just call it directly. Bug: https://issuetracker.google.com/129030706 Test: ran tests Change-Id: Ic2423f521272be95e67f94771772fe8072636ef0
Diffstat (limited to 'libc/private/__bionic_get_shell_path.h')
-rw-r--r--libc/private/__bionic_get_shell_path.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/libc/private/__bionic_get_shell_path.h b/libc/private/__bionic_get_shell_path.h
new file mode 100644
index 000000000..171c14a58
--- /dev/null
+++ b/libc/private/__bionic_get_shell_path.h
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#pragma once
+
+extern "C" const char* __bionic_get_shell_path();