Permalink
Browse files

fixed the build to compile against bionic

  • Loading branch information...
1 parent b07ea81 commit 2af1b46ccbe23735463cb083dd2533971dbe5e6d @cvpcs cvpcs committed Jun 3, 2010
Showing with 15 additions and 3 deletions.
  1. +6 −1 Android.mk
  2. +2 −2 config.h
  3. +5 −0 src/files.c
  4. +2 −0 src/text.c
View
@@ -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)
View
@@ -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
View
@@ -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);
}
View
@@ -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);

0 comments on commit 2af1b46

Please sign in to comment.