View | Details | Raw Unified | Return to bug 14125
Collapse All | Expand All

(-)zip-2.32.orig/unix/Makefile (-1 / +2 lines)
Lines 50-55 Link Here
50
CFLAGS = -O2 $(CFLAGS_NOOPT)
50
CFLAGS = -O2 $(CFLAGS_NOOPT)
51
LFLAGS1 =
51
LFLAGS1 =
52
LFLAGS2 = -s
52
LFLAGS2 = -s
53
LDADD = -lnatspec
53
54
54
# object file lists
55
# object file lists
55
OBJZ = zip.o zipfile.o zipup.o fileio.o util.o globals.o crypt.o ttyio.o \
56
OBJZ = zip.o zipfile.o zipup.o fileio.o util.o globals.o crypt.o ttyio.o \
Lines 113-119 Link Here
113
zipsman: $(ZIPS) $(ZIPMANUAL)
114
zipsman: $(ZIPS) $(ZIPMANUAL)
114
115
115
zip$(EXE): $(OBJZ) $(OBJI) $(OBJA)
116
zip$(EXE): $(OBJZ) $(OBJI) $(OBJA)
116
	$(BIND) -o zip$(EXE) $(LFLAGS1) $(OBJZ) $(OBJI) $(OBJA) $(LFLAGS2)
117
	$(BIND) -o zip$(EXE) $(LFLAGS1) $(OBJZ) $(OBJI) $(OBJA) $(LFLAGS2) $(LDADD)
117
zipnote$(EXE): $(OBJN)
118
zipnote$(EXE): $(OBJN)
118
	$(BIND) -o zipnote$(EXE) $(LFLAGS1) $(OBJN) $(LFLAGS2)
119
	$(BIND) -o zipnote$(EXE) $(LFLAGS1) $(OBJN) $(LFLAGS2)
119
zipcloak$(EXE): $(OBJC)
120
zipcloak$(EXE): $(OBJC)
(-)zip-2.32.orig/unix/osdep.h (+3 lines)
Lines 19-21 Link Here
19
#if !defined(NO_EF_UT_TIME) && !defined(USE_EF_UT_TIME)
19
#if !defined(NO_EF_UT_TIME) && !defined(USE_EF_UT_TIME)
20
#  define USE_EF_UT_TIME
20
#  define USE_EF_UT_TIME
21
#endif
21
#endif
22
23
/* Set Windows code as archive type */
24
#  define OS_CODE  0x300
(-)zip-2.32.orig/unix/unix.c (+28 lines)
Lines 12-17 Link Here
12
12
13
#include <time.h>
13
#include <time.h>
14
14
15
#ifdef UNIX
16
#  include <natspec.h>
17
#  include <locale.h>
18
#endif
19
15
#if defined(MINIX) || defined(__mpexl)
20
#if defined(MINIX) || defined(__mpexl)
16
#  ifdef S_IWRITE
21
#  ifdef S_IWRITE
17
#    undef S_IWRITE
22
#    undef S_IWRITE
Lines 58-63 Link Here
58
63
59
/* Local functions */
64
/* Local functions */
60
local char *readd OF((DIR *));
65
local char *readd OF((DIR *));
66
local const char *oem_charset = NULL;
61
67
62
68
63
#ifdef NO_DIR                    /* for AT&T 3B1 */
69
#ifdef NO_DIR                    /* for AT&T 3B1 */
Lines 256-261 Link Here
256
  if (!pathput)
262
  if (!pathput)
257
    t = last(t, PATH_END);
263
    t = last(t, PATH_END);
258
264
265
#ifdef UNIX
266
  if (!oem_charset) {
267
    setlocale(LC_CTYPE, "");
268
    oem_charset = natspec_get_charset_by_locale(NATSPEC_DOSCS, "");
269
  }
270
  /* Convert to internal encoding */
271
  if ((n = natspec_convert(t, oem_charset, 0, 0)) == NULL)
272
    return NULL;
273
  return n;
274
#else
259
  /* Malloc space for internal name and copy it */
275
  /* Malloc space for internal name and copy it */
260
  if ((n = malloc(strlen(t) + 1)) == NULL)
276
  if ((n = malloc(strlen(t) + 1)) == NULL)
261
    return NULL;
277
    return NULL;
Lines 263-268 Link Here
263
279
264
  if (dosify)
280
  if (dosify)
265
    msname(n);
281
    msname(n);
282
#endif
266
283
267
#ifdef EBCDIC
284
#ifdef EBCDIC
268
  strtoasc(n, n);       /* here because msname() needs native coding */
285
  strtoasc(n, n);       /* here because msname() needs native coding */
Lines 283-290 Link Here
283
{
300
{
284
  char *x;              /* external file name */
301
  char *x;              /* external file name */
285
302
303
#ifdef UNIX
304
  if (!oem_charset) {
305
    oem_charset = natspec_get_charset_by_locale(NATSPEC_DOSCS, "");
306
    setlocale(LC_CTYPE, "");
307
  }
308
  /* Convert to internal encoding */
309
  if ((x = natspec_convert(n, 0, oem_charset, 0)) == NULL)
310
    return NULL;
311
  return x;
312
#else
286
  if ((x = malloc(strlen(n) + 1 + PAD)) == NULL)
313
  if ((x = malloc(strlen(n) + 1 + PAD)) == NULL)
287
    return NULL;
314
    return NULL;
315
#endif
288
#ifdef EBCDIC
316
#ifdef EBCDIC
289
  strtoebc(x, n);
317
  strtoebc(x, n);
290
#else
318
#else

Return to bug 14125