Changeset 97c7682 in mainline for uspace/lib/posix/getopt.h


Ignore:
Timestamp:
2012-07-14T11:18:40Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
804d9b6
Parents:
0747468 (diff), f0348c8 (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:

Merge mainline changes.

Text conflict in boot/arch/arm32/Makefile.inc:

Trivial conflict around ifeq condition.

Text conflict in kernel/arch/arm32/include/mm/page.h:

Added defines and set_pt_levelx_present function.
COnflict looked horrible because of the armv4/v7 split.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/getopt.h

    r0747468 r97c7682  
    11/*
    2  * Copyright (c) 2009 Lukas Mejdrech
     2 * Copyright (c) 2012 Vojtech Horky
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup udp
     29/** @addtogroup libposix
    3030 * @{
    3131 */
     32/** @file Command line argument parsing.
     33 */
     34#ifndef POSIX_GETOPT_H
     35#define POSIX_GETOPT_H
    3236
    33 /** @file
    34  * UDP header definition.
    35  * Based on the RFC 768.
    36  */
     37#include "unistd.h"
    3738
    38 #ifndef NET_UDP_HEADER_H_
    39 #define NET_UDP_HEADER_H_
     39/* Option Arguments */
     40#define no_argument        0
     41#define required_argument  1
     42#define optional_argument  2
    4043
    41 #include <sys/types.h>
     44#ifndef LIBPOSIX_INTERNAL
     45struct option {
     46        const char *name;
     47        int has_arg;
     48        int *flag;
     49        int val;
     50};
     51#endif
    4252
    43 /** UDP header size in bytes. */
    44 #define UDP_HEADER_SIZE         sizeof(udp_header_t)
     53extern int posix_getopt_long(int, char * const [], const char *, const struct option *, int *);
    4554
    46 /** Type definition of the user datagram header.
    47  * @see udp_header
    48  */
    49 typedef struct udp_header udp_header_t;
    5055
    51 /** User datagram header. */
    52 struct udp_header {
    53         uint16_t source_port;
    54         uint16_t destination_port;
    55         uint16_t total_length;
    56         uint16_t checksum;
    57 } __attribute__ ((packed));
     56#ifndef LIBPOSIX_INTERNAL
     57        #define getopt_long posix_getopt_long
     58#endif
     59
    5860
    5961#endif
    60 
    61 /** @}
     62/**
     63 * @}
    6264 */
Note: See TracChangeset for help on using the changeset viewer.