~ubuntu-branches/ubuntu/raring/unzip/raring

« back to all changes in this revision

Viewing changes to unix/unxcfg.h.orig

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2007-03-31 13:10:40 UTC
  • Revision ID: james.westby@ubuntu.com-20070331131040-6njlb2747u81bggk
Tags: 5.52-9ubuntu3
Apply patch from https://bugzilla.altlinux.org/long_list.cgi?buglist=4871
to support UTF-8 file names. Ubuntu #10979.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  Copyright (c) 1990-2005 Info-ZIP.  All rights reserved.
 
3
 
 
4
  See the accompanying file LICENSE, version 2000-Apr-09 or later
 
5
  (the contents of which are also included in unzip.h) for terms of use.
 
6
  If, for some reason, all these files are missing, the Info-ZIP license
 
7
  also may be found at:  ftp://ftp.info-zip.org/pub/infozip/license.html
 
8
*/
 
9
/*---------------------------------------------------------------------------
 
10
    Unix specific configuration section:
 
11
  ---------------------------------------------------------------------------*/
 
12
 
 
13
#ifndef __unxcfg_h
 
14
#define __unxcfg_h
 
15
 
 
16
#include <sys/types.h>          /* off_t, time_t, dev_t, ... */
 
17
#include <sys/stat.h>
 
18
#include <unistd.h>
 
19
 
 
20
#ifndef COHERENT
 
21
#  include <fcntl.h>            /* O_BINARY for open() w/o CR/LF translation */
 
22
#else /* COHERENT */
 
23
#  ifdef _I386
 
24
#    include <fcntl.h>          /* Coherent 4.0.x, Mark Williams C */
 
25
#  else
 
26
#    include <sys/fcntl.h>      /* Coherent 3.10, Mark Williams C */
 
27
#  endif
 
28
#  define SHORT_SYMS
 
29
#  ifndef __COHERENT__          /* Coherent 4.2 has tzset() */
 
30
#    define tzset  settz
 
31
#  endif
 
32
#endif /* ?COHERENT */
 
33
 
 
34
#ifndef NO_PARAM_H
 
35
#  ifdef NGROUPS_MAX
 
36
#    undef NGROUPS_MAX      /* SCO bug:  defined again in <sys/param.h> */
 
37
#  endif
 
38
#  ifdef BSD
 
39
#    define TEMP_BSD        /* may be defined again in <sys/param.h> */
 
40
#    undef BSD
 
41
#  endif
 
42
#  include <sys/param.h>    /* conflict with <sys/types.h>, some systems? */
 
43
#  ifdef TEMP_BSD
 
44
#    undef TEMP_BSD
 
45
#    ifndef BSD
 
46
#      define BSD
 
47
#    endif
 
48
#  endif
 
49
#endif /* !NO_PARAM_H */
 
50
 
 
51
#ifdef __osf__
 
52
#  define DIRENT
 
53
#  ifdef BSD
 
54
#    undef BSD
 
55
#  endif
 
56
#endif /* __osf__ */
 
57
 
 
58
#ifdef __CYGWIN__
 
59
#  include <unistd.h>
 
60
#  define DIRENT
 
61
#  define HAVE_TERMIOS_H
 
62
#  ifndef timezone
 
63
#    define timezone _timezone
 
64
#  endif
 
65
#endif
 
66
 
 
67
#ifdef BSD
 
68
#  include <sys/time.h>
 
69
#  include <sys/timeb.h>
 
70
#  if (defined(_AIX) || defined(__GLIBC__) || defined(__GNU__))
 
71
#    include <time.h>
 
72
#  endif
 
73
#else
 
74
#  include <time.h>
 
75
   struct tm *gmtime(), *localtime();
 
76
#endif
 
77
 
 
78
#if (defined(BSD4_4) || (defined(SYSV) && defined(MODERN)))
 
79
#  include <unistd.h>           /* this includes utime.h on SGIs */
 
80
#  if (defined(BSD4_4) || defined(linux) || defined(__GLIBC__))
 
81
#    include <utime.h>
 
82
#    define GOT_UTIMBUF
 
83
#  endif
 
84
#  if (!defined(GOT_UTIMBUF) && defined(__GNU__))
 
85
#    include <utime.h>
 
86
#    define GOT_UTIMBUF
 
87
#  endif
 
88
#endif
 
89
#if (defined(__DGUX__) && !defined(GOT_UTIMBUF))
 
90
   /* DG/UX requires this because of a non-standard struct utimebuf */
 
91
#  include <utime.h>
 
92
#  define GOT_UTIMBUF
 
93
#endif
 
94
 
 
95
#if (defined(V7) || defined(pyr_bsd))
 
96
#  define strchr   index
 
97
#  define strrchr  rindex
 
98
#endif
 
99
#ifdef V7
 
100
#  define O_RDONLY 0
 
101
#  define O_WRONLY 1
 
102
#  define O_RDWR   2
 
103
#endif
 
104
 
 
105
#ifdef MINIX
 
106
#  include <stdio.h>
 
107
#endif
 
108
#if (!defined(HAVE_STRNICMP) & !defined(NO_STRNICMP))
 
109
#  define NO_STRNICMP
 
110
#endif
 
111
#ifndef DATE_FORMAT
 
112
#  define DATE_FORMAT DF_MDY    /* GRR:  customize with locale.h somehow? */
 
113
#endif
 
114
#define lenEOL          1
 
115
#ifdef EBCDIC
 
116
#  define PutNativeEOL  *q++ = '\n';
 
117
#else
 
118
#  define PutNativeEOL  *q++ = native(LF);
 
119
#endif
 
120
#define SCREENSIZE(ttrows, ttcols)  screensize(ttrows, ttcols)
 
121
#define SCREENWIDTH     80
 
122
#define SCREENLWRAP     1
 
123
#define USE_EF_UT_TIME
 
124
#define SET_DIR_ATTRIB
 
125
#if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP))   /* GRR 970513 */
 
126
#  define TIMESTAMP
 
127
#endif
 
128
#define RESTORE_UIDGID
 
129
 
 
130
/* Static variables that we have to add to Uz_Globs: */
 
131
#define SYSTEM_SPECIFIC_GLOBALS \
 
132
    int created_dir, renamed_fullpath;\
 
133
    char *rootpath, *buildpath, *end;\
 
134
    ZCONST char *wildname;\
 
135
    char *dirname, matchname[FILNAMSIZ];\
 
136
    int rootlen, have_dirname, dirnamelen, notfirstcall;\
 
137
    zvoid *wild_dir;
 
138
 
 
139
/* created_dir, and renamed_fullpath are used by both mapname() and    */
 
140
/*    checkdir().                                                      */
 
141
/* rootlen, rootpath, buildpath and end are used by checkdir().        */
 
142
/* wild_dir, dirname, wildname, matchname[], dirnamelen, have_dirname, */
 
143
/*    and notfirstcall are used by do_wild().                          */
 
144
 
 
145
#endif /* !__unxcfg_h */