Page MenuHomeFreeBSD

D31607.id93943.diff
No OneTemporary

D31607.id93943.diff

diff --git a/usr.sbin/crunch/crunchgen/crunchgen.c b/usr.sbin/crunch/crunchgen/crunchgen.c
--- a/usr.sbin/crunch/crunchgen/crunchgen.c
+++ b/usr.sbin/crunch/crunchgen/crunchgen.c
@@ -96,8 +96,8 @@
char tempfname[MAXPATHLEN], cachename[MAXPATHLEN], curfilename[MAXPATHLEN];
bool tempfname_initialized = false;
char outhdrname[MAXPATHLEN] ; /* user-supplied header for *.mk */
-char *objprefix; /* where are the objects ? */
-char *path_make;
+const char *objprefix; /* where are the objects ? */
+const char *path_make;
int linenum = -1;
int goterror = 0;
@@ -123,7 +123,7 @@
void parse_conf_file(void);
void gen_outputs(void);
-extern char *crunched_skel[];
+extern const char *crunched_skel[];
int
@@ -721,7 +721,7 @@
char *obj, *cp;
int fd, rc;
FILE *f;
- char *objvar="OBJS";
+ const char *objvar="OBJS";
strlst_t *s;
char line[MAXLINELEN];
@@ -912,7 +912,7 @@
void
gen_output_cfile(void)
{
- char **cp;
+ const char **cp;
FILE *outcf;
prog_t *p;
strlst_t *s;
diff --git a/usr.sbin/crunch/crunchgen/mkskel.sh b/usr.sbin/crunch/crunchgen/mkskel.sh
--- a/usr.sbin/crunch/crunchgen/mkskel.sh
+++ b/usr.sbin/crunch/crunchgen/mkskel.sh
@@ -4,7 +4,7 @@
cat <<!EOF
/* File created via mkskel.sh */
-char *crunched_skel[] = {
+const char *crunched_skel[] = {
!EOF
sed 's/\\/&&/g' $* | sed 's/"/\\"/g' | sed 's/.*/ "&",/'

File Metadata

Mime Type
text/plain
Expires
Sun, Jan 19, 5:26 PM (12 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15906295
Default Alt Text
D31607.id93943.diff (1 KB)

Event Timeline