You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.1 KiB
41 lines
1.1 KiB
Patchvsubmitted as pull request:
|
|
|
|
https://github.com/LonnyGomes/hexcurse/pull/18
|
|
|
|
diff -u -r ../hexcurse-hexcurse-1.58/src/getopt.c ./src/getopt.c
|
|
--- ../hexcurse-hexcurse-1.58/src/getopt.c 2014-02-26 19:26:34.000000000 -0500
|
|
+++ ./src/getopt.c 2015-08-23 07:53:55.917711262 -0400
|
|
@@ -32,16 +32,6 @@
|
|
#undef optind
|
|
#undef alloca
|
|
|
|
-/* The following modification was submited by Claudio Fanin. This change *
|
|
- * enables hexcurse to be compiled with SGI's proprietary compiler */
|
|
-#ifdef _SGIAPI
|
|
-#include <alloca.h>
|
|
-#endif
|
|
-#ifndef __alloca
|
|
-#define __alloca alloca
|
|
-#endif
|
|
-/* end of modification */
|
|
-
|
|
#ifdef HAVE_OPTIND
|
|
extern char* optarg;
|
|
#else
|
|
@@ -85,7 +75,7 @@
|
|
char **argv;
|
|
{
|
|
int nonopts_size = (last_nonopt - first_nonopt) * sizeof (char *);
|
|
- char **temp = (char **) __alloca (nonopts_size);
|
|
+ char **temp = (char **) malloc(nonopts_size);
|
|
|
|
/* Interchange the two blocks of data in ARGV. */
|
|
|
|
@@ -95,6 +85,7 @@
|
|
my_bcopy ((char *) temp,
|
|
(char *) &argv[first_nonopt + optind - last_nonopt],
|
|
nonopts_size);
|
|
+ free(temp);
|
|
|
|
/* Update records for the slots the non-options now occupy. */
|
|
|
|
|