Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37040663
en ru br
ALT Linux repositórios
S:1.4.27-alt1
5.0: 1.4.14-alt1
4.1: 1.4.11-alt1
4.0: 1.4.10-alt2
3.0: 1.4.6-alt1

Group :: Desenvolvimento/C
RPM: gcc-common

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

#include <stdio.h>
#include <errno.h>
#include <error.h>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>

extern const char *__progname;

int
main (int ac, char **argv)
{
char *suffix = "", *target_name, *bin_name, *path;
const char *call_name = __progname;
const char *version = getenv ("GCC_VERSION");
const char *use_ccache = getenv ("GCC_USE_CCACHE");

if (!strcmp (__progname, "gcc_wrapper"))
error (EXIT_FAILURE, 0, "try gcc instead");

if (!strcmp (__progname, "cc"))
call_name = "gcc";
else if (!strcmp (__progname, "c++"))
call_name = "g++";
else if (!strcmp (__progname, "tree1"))
call_name = "gtreelang";
else if (!strcmp (__progname, "f77") ||
!strcmp (__progname, "g77") ||
!strcmp (__progname, "f95"))
call_name = "gfortran";
else if (!strcmp (__progname, "jar"))
call_name = "fastjar";
else if (!strcmp (__progname, "rmic"))
call_name = "grmic";
else if (!strcmp (__progname, "rmiregistry"))
call_name = "grmiregistry";

while (version && *version && isspace (*version))
version++;

while (use_ccache && *use_ccache && isspace (*use_ccache))
use_ccache++;

if (version && *version)
{
if (asprintf (&suffix, "-%s", version) < 0)
error (EXIT_FAILURE, errno, "asprintf");
}

if (asprintf (&target_name, "%s-%s%s", TARGET, call_name, suffix) < 0)
error (EXIT_FAILURE, errno, "asprintf");

if (use_ccache && *use_ccache)
bin_name = "ccache";
else
bin_name = target_name;

if (asprintf (&path, "%s/%s", BINDIR, bin_name) < 0)
error (EXIT_FAILURE, errno, "asprintf");

argv[0] = target_name;
execv (path, argv);
perror (path);
return EXIT_FAILURE;
}
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009