summaryrefslogtreecommitdiff
path: root/variable.h
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2006-11-18 20:53:44 +0000
committerPaul Smith <psmith@gnu.org>2006-11-18 20:53:44 +0000
commite4da30858037b431880263676e8f90b1f8412a38 (patch)
tree2605109d089f52e373bd976391dca85774ae3b21 /variable.h
parent7595f38f62afa7ac3451018d865fb251e3ce91c3 (diff)
downloadgunmake-e4da30858037b431880263676e8f90b1f8412a38.tar.gz
Fix from Eli for incorrect value of $(MAKE) on Cygwin.
A few changes from char* to void* where appropriate, and removing of unnecessary casts. Much more work on const-ifying the codebase. This round involves some code changes to make it correct. NOTE!! There will almost certainly be problems on the non-POSIX ports that will need to be addressed after the const changes are finished: they will need to be const-ified properly and there may need to be some changes to allocate memory, etc. as well. The next (last?) big push for this, still to come, is const-ifying the filenames in struct file, struct dep, etc. This will allow us to store file names in the string cache and finally resolve Savannah bug #15182 (make uses too much memory), among other advantages.
Diffstat (limited to 'variable.h')
-rw-r--r--variable.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/variable.h b/variable.h
index 783fb62..937a88e 100644
--- a/variable.h
+++ b/variable.h
@@ -109,20 +109,20 @@ extern char *variable_buffer;
extern struct variable_set_list *current_variable_set_list;
/* expand.c */
-char *variable_buffer_output (char *ptr, char *string, unsigned int length);
-char *variable_expand (char *line);
-char *variable_expand_for_file (char *line, struct file *file);
-char *allocated_variable_expand_for_file (char *line, struct file *file);
+char *variable_buffer_output (char *ptr, const char *string, unsigned int length);
+char *variable_expand (const char *line);
+char *variable_expand_for_file (const char *line, struct file *file);
+char *allocated_variable_expand_for_file (const char *line, struct file *file);
#define allocated_variable_expand(line) \
allocated_variable_expand_for_file (line, (struct file *) 0)
char *expand_argument (const char *str, const char *end);
-char *variable_expand_string (char *line, char *string, long length);
+char *variable_expand_string (char *line, const char *string, long length);
void install_variable_buffer (char **bufp, unsigned int *lenp);
void restore_variable_buffer (char *buf, unsigned int len);
/* function.c */
-int handle_function (char **op, char **stringp);
-int pattern_matches (char *pattern, char *percent, char *str);
+int handle_function (char **op, const char **stringp);
+int pattern_matches (const char *pattern, const char *percent, const char *str);
char *subst_expand (char *o, char *text, char *subst, char *replace,
unsigned int slen, unsigned int rlen, int by_word);
char *patsubst_expand (char *o, char *text, char *pattern, char *replace,
@@ -159,7 +159,7 @@ struct variable *lookup_variable_in_set (const char *name, unsigned int length,
const struct variable_set *set);
struct variable *define_variable_in_set (const char *name, unsigned int length,
- char *value,
+ const char *value,
enum variable_origin origin,
int recursive,
struct variable_set *set,