Changeset a376c9e in mainline for uspace/app/pcc/cc


Ignore:
Timestamp:
2011-04-14T21:02:28Z (15 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
12831ed7
Parents:
3daba9de
Message:

Make the pcc frontend build

Location:
uspace/app/pcc/cc
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/pcc/cc/cc/cc.c

    r3daba9de ra376c9e  
    285285 * Wide char defines.
    286286 */
     287 #if 0
    287288#if WCHAR_TYPE == USHORT
    288289#define WCT "short unsigned int"
     
    306307#error WCHAR_TYPE not defined or invalid
    307308#endif
     309 #endif
     310
     311#define WCT "int"
     312#define WCM "2147483647"
     313
    308314
    309315#ifdef GCC_COMPAT
     
    13271333}
    13281334
     1335#elif defined(__helenos__)
     1336
     1337#include <task.h>
     1338
     1339int callsys(char *f, char *v[])
     1340{
     1341        size_t len;
     1342        char *path = NULL;
     1343        const char *s;
     1344        int t;
     1345        task_exit_t texit;
     1346        int retval;
     1347       
     1348        task_id_t tid;
     1349       
     1350        if (vflag) {
     1351                fprintf(stderr, "%s ", f);
     1352                for (t = 1; v[t]; t++)
     1353                        fprintf(stderr, "%s ", v[t]);
     1354                fprintf(stderr, "\n");
     1355        }
     1356       
     1357        if (Bflag) {
     1358                len = strlen (Bflag) + 8;
     1359                path = malloc (len);
     1360                if (path == NULL) {
     1361                        error("callsys: malloc failed");
     1362                        exit(1);
     1363                }
     1364                if ((s = strrchr(f, '/'))) {
     1365                        strlcpy(path, Bflag, len);
     1366                        strlcat(path, s, len);
     1367                        if (task_spawnv(&tid, path, v) == 0)
     1368                                goto _wait;
     1369                }
     1370        }
     1371       
     1372        if (task_spawnv(&tid, f, v) == 0)
     1373                goto _wait;
     1374       
     1375        if ((s = strrchr(f, '/')) && task_spawnv (&tid, s + 1, v) == 0)
     1376                goto _wait;
     1377       
     1378        errorx(8, "Can't find %s\n", f);
     1379        return 0;
     1380       
     1381_wait:
     1382       
     1383       
     1384        if (task_wait (tid, &texit, &retval) != 0) {
     1385                error("Couldn't wait on task");
     1386                return 0;
     1387        }
     1388       
     1389        return retval;
     1390}
     1391
    13291392#else
    13301393
  • uspace/app/pcc/cc/cpp/Makefile

    r3daba9de ra376c9e  
    3030MIPDIR = ../../mip
    3131ARCHDIR = ../../arch/$(PLATFORM)
    32 EXTRA_CFLAGS = -I$(MIPDIR) -I$(ARCHDIR)
     32EXTRA_CFLAGS = -I$(MIPDIR) -I$(ARCHDIR) -w
    3333EXTRA_CLEAN = y.tab.c y.tab.h
    3434DEFS = -DCPP_DEBUG -Dfree=free -DCPPBUF=16384
Note: See TracChangeset for help on using the changeset viewer.