Changeset 8c0c060 in freewrt for tools


Ignore:
Timestamp:
Sep 17, 2009, 9:26:26 AM (16 years ago)
Author:
Thorsten Glaser <tg@…>
Branches:
freewrt_1_0, freewrt_2_0
Children:
83f943b
Parents:
a72a15a
Message:

sync with MirBSD (upstream), mostly for this change:

Commit ID: 1004AB1E3EE37BBC83D
CVSROOT: /cvs
Module name: src
Changes by: tg@… 2009/09/17 07:24:00 UTC

Modified files:

bin/pax : options.c

Log message:
don't call an internal function "getline", even if it's static, since
apparently, with its SUSv3 specification, it can be exposed without
using -D_GNU_SOURCE, leading to a confirmed build failure on Gentoo
GNU/Linux; caught by «neclimdul:#FreeWRT»

git-svn-id: svn://www.freewrt.org/branches/freewrt_1_0@3875 afb5a338-a214-0410-bd46-81f09a774fd1

Location:
tools/paxmirabilis/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • tools/paxmirabilis/src/cpio.1

    ra72a15a r8c0c060  
    1 .\"     $MirOS: src/bin/pax/cpio.1,v 1.17 2008/03/14 17:05:06 tg Exp $
     1.\"     $MirOS: src/bin/pax/cpio.1,v 1.18 2008/11/08 23:03:35 tg Exp $
    22.\"     $OpenBSD: cpio.1,v 1.26 2007/05/31 19:19:15 jmc Exp $
    33.\"
    4 .\" Copyright (c) 2005 Thorsten Glaser <tg@66h.42h.de>
     4.\" Copyright (c) 2005 Thorsten Glaser <tg@mirbsd.org>
    55.\" Copyright (c) 1997 SigmaSoft, Th. Lockert
    66.\" All rights reserved.
     
    6262.\" with -mandoc, it might implement .Mx itself, but we want to
    6363.\" use our own definition. And .Dd must come *first*, always.
    64 .Dd $Mdocdate: March 14 2008 $
     64.Dd $Mdocdate: November 8 2008 $
    6565.\"
    6666.\" Implement .Mx (MirBSD)
  • tools/paxmirabilis/src/cpio.c

    ra72a15a r8c0c060  
    1 /**     $MirOS: src/bin/pax/cpio.c,v 1.12 2007/02/17 05:07:12 tg Exp $ */
     1/**     $MirOS: src/bin/pax/cpio.c,v 1.13 2008/11/08 23:03:37 tg Exp $ */
    22/*      $OpenBSD: cpio.c,v 1.17 2004/04/16 22:50:23 deraadt Exp $       */
    33/*      $NetBSD: cpio.c,v 1.5 1995/03/21 09:07:13 cgd Exp $     */
    44
    55/*-
    6  * Copyright (c) 2005 Thorsten Glaser <tg@66h.42h.de>
     6 * Copyright (c) 2005 Thorsten Glaser <tg@mirbsd.org>
    77 * Copyright (c) 1992 Keith Muller.
    88 * Copyright (c) 1992, 1993
     
    5050
    5151__SCCSID("@(#)cpio.c    8.1 (Berkeley) 5/31/93");
    52 __RCSID("$MirOS: src/bin/pax/cpio.c,v 1.12 2007/02/17 05:07:12 tg Exp $");
     52__RCSID("$MirOS: src/bin/pax/cpio.c,v 1.13 2008/11/08 23:03:37 tg Exp $");
    5353
    5454static int rd_nm(ARCHD *, int);
  • tools/paxmirabilis/src/options.c

    ra72a15a r8c0c060  
    33
    44/*-
    5  * Copyright (c) 2005, 2006, 2007 Thorsten Glaser <tg@66h.42h.de>
     5 * Copyright (c) 2005, 2006, 2007 Thorsten Glaser <tg@mirbsd.org>
    66 * Copyright (c) 1992 Keith Muller.
    77 * Copyright (c) 1992, 1993
     
    5757
    5858__SCCSID("@(#)options.c 8.2 (Berkeley) 4/18/94");
    59 __RCSID("$MirOS: src/bin/pax/options.c,v 1.27 2008/10/29 17:00:07 tg Exp $");
     59__RCSID("$MirOS: src/bin/pax/options.c,v 1.29 2009/09/17 07:24:00 tg Exp $");
    6060
    6161#ifdef __GLIBC__
     
    7575static int c_frmt(const void *, const void *);
    7676static off_t str_offt(char *);
    77 static char *getline(FILE *fp);
     77static char *get_line(FILE *fp);
    7878static void pax_options(int, char **);
    7979static void pax_usage(void) __attribute__((noreturn));
     
    8888static void process_M(const char *, void (*)(void));
    8989
    90 /* errors from getline */
    91 #define GETLINE_FILE_CORRUPT 1
    92 #define GETLINE_OUT_OF_MEM 2
    93 static int getline_error;
     90/* errors from get_line */
     91#define GET_LINE_FILE_CORRUPT 1
     92#define GET_LINE_OUT_OF_MEM 2
     93static int get_line_error;
    9494
    9595
     
    925925                                                tar_usage();
    926926                                        }
    927                                         while ((str = getline(fp)) != NULL) {
     927                                        while ((str = get_line(fp)) != NULL) {
    928928                                                if (pat_add(str, dir) < 0)
    929929                                                        tar_usage();
     
    932932                                        if (strcmp(file, "-") != 0)
    933933                                                fclose(fp);
    934                                         if (getline_error) {
     934                                        if (get_line_error) {
    935935                                                paxwarn(1, "Problem with file '%s'", file);
    936936                                                tar_usage();
     
    10221022                                        tar_usage();
    10231023                                }
    1024                                 while ((str = getline(fp)) != NULL) {
     1024                                while ((str = get_line(fp)) != NULL) {
    10251025                                        if (ftree_add(str, 0) < 0)
    10261026                                                tar_usage();
     
    10281028                                if (strcmp(file, "-") != 0)
    10291029                                        fclose(fp);
    1030                                 if (getline_error) {
     1030                                if (get_line_error) {
    10311031                                        paxwarn(1, "Problem with file '%s'",
    10321032                                            file);
     
    12531253                                        cpio_usage();
    12541254                                }
    1255                                 while ((str = getline(fp)) != NULL) {
     1255                                while ((str = get_line(fp)) != NULL) {
    12561256                                        pat_add(str, NULL);
    12571257                                }
    12581258                                fclose(fp);
    1259                                 if (getline_error) {
     1259                                if (get_line_error) {
    12601260                                        paxwarn(1, "Problem with file '%s'", optarg);
    12611261                                        cpio_usage();
     
    13651365                         */
    13661366                        maxflt = 0;
    1367                         while ((str = getline(stdin)) != NULL) {
     1367                        while ((str = get_line(stdin)) != NULL) {
    13681368                                ftree_add(str, 0);
    13691369                        }
    1370                         if (getline_error) {
     1370                        if (get_line_error) {
    13711371                                paxwarn(1, "Problem while reading stdin");
    13721372                                cpio_usage();
     
    15941594
    15951595char *
    1596 getline(FILE *f)
     1596get_line(FILE *f)
    15971597{
    15981598        char *name, *temp;
     
    16011601        name = fgetln(f, &len);
    16021602        if (!name) {
    1603                 getline_error = ferror(f) ? GETLINE_FILE_CORRUPT : 0;
     1603                get_line_error = ferror(f) ? GET_LINE_FILE_CORRUPT : 0;
    16041604                return(0);
    16051605        }
     
    16081608        temp = malloc(len);
    16091609        if (!temp) {
    1610                 getline_error = GETLINE_OUT_OF_MEM;
     1610                get_line_error = GET_LINE_OUT_OF_MEM;
    16111611                return(0);
    16121612        }
  • tools/paxmirabilis/src/tables.c

    ra72a15a r8c0c060  
    33
    44/*-
    5  * Copyright (c) 2005 Thorsten Glaser <tg@66h.42h.de>
     5 * Copyright (c) 2005 Thorsten Glaser <tg@mirbsd.org>
    66 * Copyright (c) 1992 Keith Muller.
    77 * Copyright (c) 1992, 1993
     
    5050
    5151__SCCSID("@(#)tables.c  8.1 (Berkeley) 5/31/93");
    52 __RCSID("$MirOS: src/bin/pax/tables.c,v 1.8 2007/10/23 20:07:42 tg Exp $");
     52__RCSID("$MirOS: src/bin/pax/tables.c,v 1.9 2008/11/08 23:03:38 tg Exp $");
    5353
    5454/*
  • tools/paxmirabilis/src/tables.h

    ra72a15a r8c0c060  
    1 /**     $MirOS: src/bin/pax/tables.h,v 1.3 2007/10/23 20:07:42 tg Exp $ */
     1/**     $MirOS: src/bin/pax/tables.h,v 1.4 2008/11/08 23:03:39 tg Exp $ */
    22/*      $OpenBSD: tables.h,v 1.8 2006/08/05 23:05:13 ray Exp $  */
    33/*      $NetBSD: tables.h,v 1.3 1995/03/21 09:07:47 cgd Exp $   */
    44
    55/*-
    6  * Copyright (c) 2005 Thorsten Glaser <tg@66h.42h.de>
     6 * Copyright (c) 2005 Thorsten Glaser <tg@mirbsd.org>
    77 * Copyright (c) 1992 Keith Muller.
    88 * Copyright (c) 1992, 1993
Note: See TracChangeset for help on using the changeset viewer.