diff options
| author | cvpcs <root@cvpcs.org> | 2010-06-03 11:35:50 -0500 |
|---|---|---|
| committer | cvpcs <root@cvpcs.org> | 2010-06-03 11:35:50 -0500 |
| commit | 2af1b46ccbe23735463cb083dd2533971dbe5e6d (patch) | |
| tree | dbe832e311c9cfe805c416399d52952d5f6f26f8 | |
| parent | b07ea81ee80575d1be8d88cb29116974f0e78f9d (diff) | |
| download | android_external_nano-2af1b46ccbe23735463cb083dd2533971dbe5e6d.tar.gz android_external_nano-2af1b46ccbe23735463cb083dd2533971dbe5e6d.tar.bz2 android_external_nano-2af1b46ccbe23735463cb083dd2533971dbe5e6d.zip | |
fixed the build to compile against bionic
| -rw-r--r-- | Android.mk | 7 | ||||
| -rw-r--r-- | config.h | 4 | ||||
| -rw-r--r-- | src/files.c | 5 | ||||
| -rw-r--r-- | src/text.c | 2 |
4 files changed, 15 insertions, 3 deletions
@@ -22,13 +22,18 @@ LOCAL_SRC_FILES:= \ src/utils.c \ src/winio.c LOCAL_C_INCLUDES += \ - $(LOCAL_PATH) + $(LOCAL_PATH) \ + external/clearsilver \ + external/clearsilver/util/regex \ + external/libncurses/include LOCAL_CFLAGS += \ -DHAVE_CONFIG_H \ -DLOCALEDIR=\"/data/locale\" \ -DSYSCONFDIR=\"/system/etc\" LOCAL_SHARED_LIBRARIES += \ libncurses +LOCAL_STATIC_LIBRARIES += \ + libclearsilverregex LOCAL_MODULE := nano LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES) include $(BUILD_EXECUTABLE) @@ -66,10 +66,10 @@ /* #undef HAVE_DOPRNT */ /* Define to 1 if you have the `getdelim' function. */ -#define HAVE_GETDELIM 1 +/* #undef HAVE_GETDELIM */ /* Define to 1 if you have the `getline' function. */ -#define HAVE_GETLINE 1 +/* #undef HAVE_GETLINE */ /* Define to 1 if you have the <getopt.h> header file. */ #define HAVE_GETOPT_H 1 diff --git a/src/files.c b/src/files.c index 70cdc95f..2d4c4dba 100644 --- a/src/files.c +++ b/src/files.c @@ -2213,11 +2213,16 @@ char *real_dir_from_tilde(const char *buf) tilde_dir = mallocstrncpy(NULL, buf, i + 1); tilde_dir[i] = '\0'; +#ifndef __BIONIC__ do { userdata = getpwent(); } while (userdata != NULL && strcmp(userdata->pw_name, tilde_dir + 1) != 0); endpwent(); +#else + userdata = NULL; +#endif + if (userdata != NULL) tilde_dir = mallocstrcpy(tilde_dir, userdata->pw_dir); } @@ -1268,8 +1268,10 @@ bool do_wrap(filestruct *line, bool undoing) null_at(&line->data, wrap_loc); if (prepending) { +#ifndef NANO_TINY if (!undoing) update_undo(SPLIT); +#endif /* If we're prepending, copy the text from the next line, minus * the indentation that we already copied above. */ strcat(new_line, next_line); |
