aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcvpcs <root@cvpcs.org>2010-06-03 11:35:50 -0500
committercvpcs <root@cvpcs.org>2010-06-03 11:35:50 -0500
commit2af1b46ccbe23735463cb083dd2533971dbe5e6d (patch)
treedbe832e311c9cfe805c416399d52952d5f6f26f8
parentb07ea81ee80575d1be8d88cb29116974f0e78f9d (diff)
downloadandroid_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.mk7
-rw-r--r--config.h4
-rw-r--r--src/files.c5
-rw-r--r--src/text.c2
4 files changed, 15 insertions, 3 deletions
diff --git a/Android.mk b/Android.mk
index f401e87d..cc14dec7 100644
--- a/Android.mk
+++ b/Android.mk
@@ -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)
diff --git a/config.h b/config.h
index 8f82d2ec..fe7830dd 100644
--- a/config.h
+++ b/config.h
@@ -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);
}
diff --git a/src/text.c b/src/text.c
index fecd1801..fe052558 100644
--- a/src/text.c
+++ b/src/text.c
@@ -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);