Ignore:
Timestamp:
2013-07-10T08:58:49Z (12 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3908355, 4c53333
Parents:
30c1b75 (diff), 98abd40 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Extending POSIX library

Merge from lp:~vojtech-horky/helenos/gcc-port.

This is work-in-progress merge from branch aimed at bringing GCC to run
inside HelenOS.

The most notable change is dealing with the name clashes in libposix and
libc. For ported applications, the libposix headers looks as normal
POSIX headers and there is no need to do preprocessor-based renaming inside
the ported application. The renaming is done inside object files instead.
See revision 1745 in lp:~vojtech-horky/helenos/gcc-port [1] for more
detailed explanation.
The solution is definitely not perfect but shall deal with the naming
conflicts in much safer manner than using the redefines.

There were some other changes as well, mostly small ones.

  • Add some functions, some as ToDo ones (i.e. empty implementation).
  • Add more POSIX headers, split some existing.

[1] http://bazaar.launchpad.net/~vojtech-horky/helenos/gcc-port/revision/1745

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/cmds/builtins/batch/batch.c

    r30c1b75 rc8bb1633  
    2929#include <stdio.h>
    3030#include <stdlib.h>
     31#include <stdbool.h>
     32#include <errno.h>
    3133#include "config.h"
    3234#include "util.h"
     
    4446        if (level == HELP_SHORT) {
    4547                printf(
    46                 "\n  batch [filename]\n"
     48                "\n  batch [filename] [-c]\n"
    4749                "  Issues commands stored in the file.\n"
    4850                "  Each command must correspond to the single line in the file.\n\n");
     
    5456                "  separate groups of commands. There is no support for comments,\n"
    5557                "  variables, recursion or other programming constructs - the `batch'\n"
    56                 "  command is indeed very trivial.\n\n");
     58                "  command is indeed very trivial.\n"
     59                "  If the filename is followed by -c, execution continues even if some\n"
     60                "  of the commands failed.\n\n");
    5761        }
    5862
     
    6569{
    6670        unsigned int argc;
     71        bool continue_despite_errors = false;
    6772
    6873        /* Count the arguments */
     
    7277                printf("%s - no input file provided.\n", cmdname);
    7378                return CMD_FAILURE;
     79        }
     80
     81        if (argc > 2) {
     82                if (str_cmp(argv[2], "-c") == 0)
     83                        continue_despite_errors = true;
    7484        }
    7585
     
    99109                                        rc = process_input(&fusr);
    100110                                        /* fusr->line was freed by process_input() */
     111                                        if ((rc != EOK) && continue_despite_errors) {
     112                                                /* Mute the error. */
     113                                                rc = EOK;
     114                                        }
    101115                                }
    102116                                if (rc == 0 && c != EOF) {
Note: See TracChangeset for help on using the changeset viewer.