Changeset View
Changeset View
Standalone View
Standalone View
tools/build/cross-build/progname.c
Show All 30 Lines | |||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | * 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 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
* SUCH DAMAGE. | * SUCH DAMAGE. | ||||
*/ | */ | ||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
#include <stdlib.h> | #include <stdlib.h> | ||||
#ifdef __GLIBC__ | #ifdef __linux__ | ||||
jrtc27: The ifdef should just be dropped; Makefile.boot already makes the addition of the source file… | |||||
impAuthorUnsubmitted Done Inline ActionsAh. That's a better solution. I'd missed we'd done that. I'll do a follow-up commit. I have one or two others too. imp: Ah. That's a better solution. I'd missed we'd done that. I'll do a follow-up commit. I have one… | |||||
jrtc27Unsubmitted Not Done Inline ActionsYeah; see the comments on the GitHub PR from myself and later Alex jrtc27: Yeah; see the comments on the GitHub PR from myself and later Alex | |||||
impAuthorUnsubmitted Done Inline ActionsI see that I missed them now... imp: I see that I missed them now... | |||||
extern const char *__progname; | extern const char *__progname; | ||||
const char * | const char * | ||||
getprogname(void) | getprogname(void) | ||||
{ | { | ||||
return (__progname); | return (__progname); | ||||
} | } | ||||
void | void | ||||
setprogname(const char *progname) | setprogname(const char *progname) | ||||
{ | { | ||||
__progname = progname; | __progname = progname; | ||||
} | } | ||||
#endif /* __GLIBC__ */ | #endif /* __linux__ */ |
The ifdef should just be dropped; Makefile.boot already makes the addition of the source file conditional on it being Linux