Re: Review Request 127205: Add stubs to allow compilation on Android.

2016-03-15 Thread Andreas Cord-Landwehr

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127205/
---

(Updated March 15, 2016, 8:53 p.m.)


Status
--

This change has been marked as submitted.


Review request for KDE Frameworks, Aleix Pol Gonzalez and Alex Richardson.


Changes
---

Submitted with commit 3bcdff64ccaf545ea9ff05495a2069bc053ae672 by Andreas 
Cord-Landwehr to branch master.


Repository: kcoreaddons


Description
---

Android's libc implementation lacks several features required by the Unix 
backend implementation. This patch allows compilation by adding stubs for all 
missing struct members and functions. Result of this patch is that on Android 
KUser returns empty GUID and UID lists.


Diffs
-

  CMakeLists.txt 06af956 
  src/lib/CMakeLists.txt cf57f09 
  src/lib/util/kuser_unix.cpp de5acde 

Diff: https://git.reviewboard.kde.org/r/127205/diff/


Testing
---

Compilation tested on Linux and Android.


Thanks,

Andreas Cord-Landwehr

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 127205: Add stubs to allow compilation on Android.

2016-03-08 Thread Andreas Cord-Landwehr

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127205/
---

(Updated März 8, 2016, 7:47 nachm.)


Review request for KDE Frameworks, Aleix Pol Gonzalez and Alex Richardson.


Repository: kcoreaddons


Description
---

Android's libc implementation lacks several features required by the Unix 
backend implementation. This patch allows compilation by adding stubs for all 
missing struct members and functions. Result of this patch is that on Android 
KUser returns empty GUID and UID lists.


Diffs (updated)
-

  CMakeLists.txt 06af956 
  src/lib/CMakeLists.txt cf57f09 
  src/lib/util/kuser_unix.cpp de5acde 

Diff: https://git.reviewboard.kde.org/r/127205/diff/


Testing
---

Compilation tested on Linux and Android.


Thanks,

Andreas Cord-Landwehr

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 127205: Add stubs to allow compilation on Android.

2016-03-08 Thread Alex Richardson

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127205/#review93290
---


Fix it, then Ship it!




Looks good


src/lib/util/kuser_unix.cpp (line 38)


I'd say these should be static inline so that the compiler doesn't need to 
emit a copy of the function in the library.


- Alex Richardson


On March 2, 2016, 8:18 p.m., Andreas Cord-Landwehr wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127205/
> ---
> 
> (Updated March 2, 2016, 8:18 p.m.)
> 
> 
> Review request for KDE Frameworks, Aleix Pol Gonzalez and Alex Richardson.
> 
> 
> Repository: kcoreaddons
> 
> 
> Description
> ---
> 
> Android's libc implementation lacks several features required by the Unix 
> backend implementation. This patch allows compilation by adding stubs for all 
> missing struct members and functions. Result of this patch is that on Android 
> KUser returns empty GUID and UID lists.
> 
> 
> Diffs
> -
> 
>   CMakeLists.txt da67071 
>   src/lib/CMakeLists.txt cf57f09 
>   src/lib/util/kuser_unix.cpp de5acde 
> 
> Diff: https://git.reviewboard.kde.org/r/127205/diff/
> 
> 
> Testing
> ---
> 
> Compilation tested on Linux and Android.
> 
> 
> Thanks,
> 
> Andreas Cord-Landwehr
> 
>

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 127205: Add stubs to allow compilation on Android.

2016-03-02 Thread Andreas Cord-Landwehr

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127205/
---

(Updated März 2, 2016, 8:18 nachm.)


Review request for KDE Frameworks, Aleix Pol Gonzalez and Alex Richardson.


Changes
---

Changes:
- everywhere use __BIONIC__ instead of Q_OS_ANDROID
- change macros to noop functions


Repository: kcoreaddons


Description
---

Android's libc implementation lacks several features required by the Unix 
backend implementation. This patch allows compilation by adding stubs for all 
missing struct members and functions. Result of this patch is that on Android 
KUser returns empty GUID and UID lists.


Diffs (updated)
-

  CMakeLists.txt da67071 
  src/lib/CMakeLists.txt cf57f09 
  src/lib/util/kuser_unix.cpp de5acde 

Diff: https://git.reviewboard.kde.org/r/127205/diff/


Testing
---

Compilation tested on Linux and Android.


Thanks,

Andreas Cord-Landwehr

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 127205: Add stubs to allow compilation on Android.

2016-03-02 Thread Alex Richardson

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127205/#review93073
---



Looks good to me.

I'd prefer inline noop functions to macros, but I don't really mind.


src/lib/util/kuser_unix.cpp (line 68)


I'd change this to `__BIONIC__` too


- Alex Richardson


On March 1, 2016, 9:38 p.m., Andreas Cord-Landwehr wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127205/
> ---
> 
> (Updated March 1, 2016, 9:38 p.m.)
> 
> 
> Review request for KDE Frameworks, Aleix Pol Gonzalez and Alex Richardson.
> 
> 
> Repository: kcoreaddons
> 
> 
> Description
> ---
> 
> Android's libc implementation lacks several features required by the Unix 
> backend implementation. This patch allows compilation by adding stubs for all 
> missing struct members and functions. Result of this patch is that on Android 
> KUser returns empty GUID and UID lists.
> 
> 
> Diffs
> -
> 
>   CMakeLists.txt da67071 
>   src/lib/CMakeLists.txt cf57f09 
>   src/lib/util/kuser_unix.cpp de5acde 
> 
> Diff: https://git.reviewboard.kde.org/r/127205/diff/
> 
> 
> Testing
> ---
> 
> Compilation tested on Linux and Android.
> 
> 
> Thanks,
> 
> Andreas Cord-Landwehr
> 
>

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 127205: Add stubs to allow compilation on Android.

2016-03-01 Thread Aleix Pol Gonzalez

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127205/#review93050
---


Ship it!




Nothing should change when we're not on Android. Let's see where this goes. :)

- Aleix Pol Gonzalez


On March 1, 2016, 10:38 p.m., Andreas Cord-Landwehr wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127205/
> ---
> 
> (Updated March 1, 2016, 10:38 p.m.)
> 
> 
> Review request for KDE Frameworks, Aleix Pol Gonzalez and Alex Richardson.
> 
> 
> Repository: kcoreaddons
> 
> 
> Description
> ---
> 
> Android's libc implementation lacks several features required by the Unix 
> backend implementation. This patch allows compilation by adding stubs for all 
> missing struct members and functions. Result of this patch is that on Android 
> KUser returns empty GUID and UID lists.
> 
> 
> Diffs
> -
> 
>   CMakeLists.txt da67071 
>   src/lib/CMakeLists.txt cf57f09 
>   src/lib/util/kuser_unix.cpp de5acde 
> 
> Diff: https://git.reviewboard.kde.org/r/127205/diff/
> 
> 
> Testing
> ---
> 
> Compilation tested on Linux and Android.
> 
> 
> Thanks,
> 
> Andreas Cord-Landwehr
> 
>

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 127205: Add stubs to allow compilation on Android.

2016-03-01 Thread Andreas Cord-Landwehr

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127205/
---

(Updated März 1, 2016, 9:38 nachm.)


Review request for KDE Frameworks, Aleix Pol Gonzalez and Alex Richardson.


Changes
---

Incorporate all comments. Compilation tested on Linux, Android and Windows.


Repository: kcoreaddons


Description
---

Android's libc implementation lacks several features required by the Unix 
backend implementation. This patch allows compilation by adding stubs for all 
missing struct members and functions. Result of this patch is that on Android 
KUser returns empty GUID and UID lists.


Diffs (updated)
-

  CMakeLists.txt da67071 
  src/lib/CMakeLists.txt cf57f09 
  src/lib/util/kuser_unix.cpp de5acde 

Diff: https://git.reviewboard.kde.org/r/127205/diff/


Testing
---

Compilation tested on Linux and Android.


Thanks,

Andreas Cord-Landwehr

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 127205: Add stubs to allow compilation on Android.

2016-03-01 Thread Alex Richardson


> On March 1, 2016, 12:26 a.m., Aleix Pol Gonzalez wrote:
> > src/lib/CMakeLists.txt, line 116
> > 
> >
> > Why does pthread make a difference?
> 
> Andreas Cord-Landwehr wrote:
> Bionic provides native built-in support for (limited set of) pthread 
> functionality. So no linking is required:
> 
> http://mobilepearls.com/labs/native-android-api/#pthreads

Should be possible to use the CMake builtin `find_package(Threads)` and link to 
`Threads::Threads` instead of using `pthread` directly. We might even be able 
to get rid of the if(WIN32) this way, but I haven't got a Windows system to 
test.


- Alex


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127205/#review92959
---


On Feb. 28, 2016, 10:14 a.m., Andreas Cord-Landwehr wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127205/
> ---
> 
> (Updated Feb. 28, 2016, 10:14 a.m.)
> 
> 
> Review request for KDE Frameworks, Aleix Pol Gonzalez and Alex Richardson.
> 
> 
> Repository: kcoreaddons
> 
> 
> Description
> ---
> 
> Android's libc implementation lacks several features required by the Unix 
> backend implementation. This patch allows compilation by adding stubs for all 
> missing struct members and functions. Result of this patch is that on Android 
> KUser returns empty GUID and UID lists.
> 
> 
> Diffs
> -
> 
>   src/lib/CMakeLists.txt cf57f0947f13b126f658774209363480013a2e2a 
>   src/lib/util/kuser_unix.cpp de5acde07f4cb8425f03c455bc55d03dfd2579e9 
> 
> Diff: https://git.reviewboard.kde.org/r/127205/diff/
> 
> 
> Testing
> ---
> 
> Compilation tested on Linux and Android.
> 
> 
> Thanks,
> 
> Andreas Cord-Landwehr
> 
>

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 127205: Add stubs to allow compilation on Android.

2016-02-29 Thread Andreas Cord-Landwehr


> On März 1, 2016, 12:26 vorm., Aleix Pol Gonzalez wrote:
> > src/lib/CMakeLists.txt, line 116
> > 
> >
> > Why does pthread make a difference?

Bionic provides native built-in support for (limited set of) pthread 
functionality. So no linking is required:

http://mobilepearls.com/labs/native-android-api/#pthreads


> On März 1, 2016, 12:26 vorm., Aleix Pol Gonzalez wrote:
> > src/lib/util/kuser_unix.cpp, line 37
> > 
> >
> > In glib they solved it using
> > __BIONIC__
> > https://mail.gnome.org/archives/commits-list/2012-November/msg07198.html
> > 
> > If you look at the pwd.h file Android offers, you can see it says:
> > ```
> > #if 0 /* MISSING FROM BIONIC */
> > int getpwnam_r(const char*, struct passwd*, char*, size_t, struct 
> > passwd**);
> > int getpwuid_r(uid_t, struct passwd*, char*, size_t, struct passwd**);
> > struct passwd* getpwent(void);
> > int setpwent(void);
> > #endif /* MISSING */
> > ```
> > So it might make sense.

OK, both works for me. Will change the ifdef to __BIONIC__ then.


- Andreas


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127205/#review92959
---


On Feb. 28, 2016, 10:14 vorm., Andreas Cord-Landwehr wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127205/
> ---
> 
> (Updated Feb. 28, 2016, 10:14 vorm.)
> 
> 
> Review request for KDE Frameworks, Aleix Pol Gonzalez and Alex Richardson.
> 
> 
> Repository: kcoreaddons
> 
> 
> Description
> ---
> 
> Android's libc implementation lacks several features required by the Unix 
> backend implementation. This patch allows compilation by adding stubs for all 
> missing struct members and functions. Result of this patch is that on Android 
> KUser returns empty GUID and UID lists.
> 
> 
> Diffs
> -
> 
>   src/lib/CMakeLists.txt cf57f0947f13b126f658774209363480013a2e2a 
>   src/lib/util/kuser_unix.cpp de5acde07f4cb8425f03c455bc55d03dfd2579e9 
> 
> Diff: https://git.reviewboard.kde.org/r/127205/diff/
> 
> 
> Testing
> ---
> 
> Compilation tested on Linux and Android.
> 
> 
> Thanks,
> 
> Andreas Cord-Landwehr
> 
>

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Re: Review Request 127205: Add stubs to allow compilation on Android.

2016-02-29 Thread Aleix Pol Gonzalez

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127205/#review92959
---




src/lib/CMakeLists.txt (line 114)


Why does pthread make a difference?



src/lib/util/kuser_unix.cpp (line 37)


In glib they solved it using
__BIONIC__
https://mail.gnome.org/archives/commits-list/2012-November/msg07198.html

If you look at the pwd.h file Android offers, you can see it says:
```
#if 0 /* MISSING FROM BIONIC */
int getpwnam_r(const char*, struct passwd*, char*, size_t, struct passwd**);
int getpwuid_r(uid_t, struct passwd*, char*, size_t, struct passwd**);
struct passwd* getpwent(void);
int setpwent(void);
#endif /* MISSING */
```
So it might make sense.


- Aleix Pol Gonzalez


On Feb. 28, 2016, 11:14 a.m., Andreas Cord-Landwehr wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127205/
> ---
> 
> (Updated Feb. 28, 2016, 11:14 a.m.)
> 
> 
> Review request for KDE Frameworks, Aleix Pol Gonzalez and Alex Richardson.
> 
> 
> Repository: kcoreaddons
> 
> 
> Description
> ---
> 
> Android's libc implementation lacks several features required by the Unix 
> backend implementation. This patch allows compilation by adding stubs for all 
> missing struct members and functions. Result of this patch is that on Android 
> KUser returns empty GUID and UID lists.
> 
> 
> Diffs
> -
> 
>   src/lib/CMakeLists.txt cf57f0947f13b126f658774209363480013a2e2a 
>   src/lib/util/kuser_unix.cpp de5acde07f4cb8425f03c455bc55d03dfd2579e9 
> 
> Diff: https://git.reviewboard.kde.org/r/127205/diff/
> 
> 
> Testing
> ---
> 
> Compilation tested on Linux and Android.
> 
> 
> Thanks,
> 
> Andreas Cord-Landwehr
> 
>

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


Review Request 127205: Add stubs to allow compilation on Android.

2016-02-28 Thread Andreas Cord-Landwehr

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127205/
---

Review request for KDE Frameworks, Aleix Pol Gonzalez and Alex Richardson.


Repository: kcoreaddons


Description
---

Android's libc implementation lacks several features required by the Unix 
backend implementation. This patch allows compilation by adding stubs for all 
missing struct members and functions. Result of this patch is that on Android 
KUser returns empty GUID and UID lists.


Diffs
-

  src/lib/CMakeLists.txt cf57f0947f13b126f658774209363480013a2e2a 
  src/lib/util/kuser_unix.cpp de5acde07f4cb8425f03c455bc55d03dfd2579e9 

Diff: https://git.reviewboard.kde.org/r/127205/diff/


Testing
---

Compilation tested on Linux and Android.


Thanks,

Andreas Cord-Landwehr

___
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel